name async generators something more human friendly in type error diagnostics
This commit is contained in:
parent
b05fd2a15d
commit
c28d86c53b
8 changed files with 103 additions and 17 deletions
|
@ -1366,8 +1366,8 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
Some(t) => Some(t),
|
||||
None => {
|
||||
let ty = parent_trait_ref.skip_binder().self_ty();
|
||||
let span =
|
||||
TyCategory::from_ty(ty).map(|(_, def_id)| self.tcx.def_span(def_id));
|
||||
let span = TyCategory::from_ty(self.tcx, ty)
|
||||
.map(|(_, def_id)| self.tcx.def_span(def_id));
|
||||
Some((ty.to_string(), span))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue