Point at type on E0275 instead of whole field

This commit is contained in:
Esteban Küber 2020-07-10 14:54:48 -07:00
parent c88409de13
commit a15bda4036
2 changed files with 3 additions and 3 deletions

View file

@ -1326,7 +1326,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
.iter()
.map(|field| {
let field_ty = self.tcx.type_of(self.tcx.hir().local_def_id(field.hir_id));
let field_ty = self.normalize_associated_types_in(field.span, &field_ty);
let field_ty = self.normalize_associated_types_in(field.ty.span, &field_ty);
let field_ty = self.resolve_vars_if_possible(&field_ty);
debug!("non_enum_variant: type of field {:?} is {:?}", field, field_ty);
AdtField { ty: field_ty, span: field.span }

View file

@ -1,8 +1,8 @@
error[E0275]: overflow evaluating the requirement `RootDatabase: SourceDatabase`
--> $DIR/cycle-cache-err-60010.rs:27:5
--> $DIR/cycle-cache-err-60010.rs:27:13
|
LL | _parse: <ParseQuery as Query<RootDatabase>>::Data,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: required because of the requirements on the impl of `Query<RootDatabase>` for `ParseQuery`