Skip to content

Commit 2185b0b

Browse files
committed
Point at type on E0275 instead of whole field
1 parent fe1d758 commit 2185b0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_typeck/check/wfcheck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13261326
.iter()
13271327
.map(|field| {
13281328
let field_ty = self.tcx.type_of(self.tcx.hir().local_def_id(field.hir_id));
1329-
let field_ty = self.normalize_associated_types_in(field.span, &field_ty);
1329+
let field_ty = self.normalize_associated_types_in(field.ty.span, &field_ty);
13301330
let field_ty = self.resolve_vars_if_possible(&field_ty);
13311331
debug!("non_enum_variant: type of field {:?} is {:?}", field, field_ty);
13321332
AdtField { ty: field_ty, span: field.span }

src/test/ui/traits/cycle-cache-err-60010.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0275]: overflow evaluating the requirement `RootDatabase: SourceDatabase`
2-
--> $DIR/cycle-cache-err-60010.rs:27:5
2+
--> $DIR/cycle-cache-err-60010.rs:27:13
33
|
44
LL | _parse: <ParseQuery as Query<RootDatabase>>::Data,
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: required because of the requirements on the impl of `Query<RootDatabase>` for `ParseQuery`
88

0 commit comments

Comments
 (0)