We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eafd7a6 commit 4334a72Copy full SHA for 4334a72
compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs
@@ -141,7 +141,10 @@ impl<'tcx> Visitor<'tcx> for TypeParamSpanVisitor<'tcx> {
141
match arg.kind {
142
hir::TyKind::Ref(_, ref mut_ty) => {
143
// We don't want to suggest looking into borrowing `&T` or `&Self`.
144
- hir::intravisit::walk_ty(self, mut_ty.ty);
+ match mut_ty.ty.kind {
145
+ hir::TyKind::Infer(()) => (),
146
+ _ => hir::intravisit::walk_ambig_ty(self, mut_ty.ty.as_ambig_ty()),
147
+ }
148
return;
149
}
150
hir::TyKind::Path(hir::QPath::Resolved(None, path)) => match &path.segments {
0 commit comments