let entry = spanned_predicates.entry(spans);
entry.or_insert_with(|| (path, tr_self_ty, Vec::new())).2.push(p);
}
+ Some(Node::Item(hir::Item {
+ kind: hir::ItemKind::Trait(rustc_ast::ast::IsAuto::Yes, ..),
+ span: item_span,
+ ..
+ })) => {
+ tcx.sess.delay_span_bug(
+ *item_span,
+ "auto trait is invoked with no method error, but no error reported?",
+ );
+ }
Some(_) => unreachable!(),
None => (),
}
if def_kind == DefKind::AssocFn && lev_candidate.fn_has_self_parameter {
err.span_suggestion(
span,
- &format!("there is a method with a similar name",),
+ "there is a method with a similar name",
lev_candidate.name,
Applicability::MaybeIncorrect,
);