error: MethodError<'tcx>,
args: Option<&'gcx [hir::Expr]>,
) {
+ let orig_span = span;
let mut span = span;
// Avoid suggestions when we don't know what's going on.
if rcvr_ty.references_error() {
}
} else {
err.span_label(span, format!("{} not found in `{}`", item_kind, ty_str));
- self.tcx.sess.trait_methods_not_found.borrow_mut().insert(span);
+ self.tcx.sess.trait_methods_not_found.borrow_mut().insert(orig_span);
}
if self.is_fn_ty(&rcvr_ty, span) {
--> $DIR/bad-assoc-pat.rs:21:24
|
LL | ($ty: ty) => ($ty::AssocItem)
- | -----^^^^^^^^^
- | |
- | associated item not found in `u8`
+ | ^^^^^^^^^ associated item not found in `u8`
...
LL | pat!(u8) => {}
| -------- in this macro invocation
--> $DIR/bad-assoc-pat.rs:32:16
|
LL | ty!()::AssocItem => {}
- | -------^^^^^^^^^
- | |
- | associated item not found in `u8`
+ | ^^^^^^^^^ associated item not found in `u8`
error: aborting due to 12 previous errors
--> $DIR/issue-58734.rs:20:12
|
LL | Trait::nonexistent(());
- | -------^^^^^^^^^^^
- | |
- | function or associated item not found in `dyn Trait`
+ | ^^^^^^^^^^^ function or associated item not found in `dyn Trait`
error: aborting due to previous error