Suggest importing the right kind of macro.
This commit is contained in:
parent
e7f7fe462a
commit
bcc5ecb969
4 changed files with 53 additions and 3 deletions
|
@ -950,9 +950,7 @@ impl<'a> Resolver<'a> {
|
|||
self.add_typo_suggestion(err, suggestion, ident.span);
|
||||
|
||||
let import_suggestions =
|
||||
self.lookup_import_candidates(ident, Namespace::MacroNS, parent_scope, |res| {
|
||||
matches!(res, Res::Def(DefKind::Macro(MacroKind::Bang), _))
|
||||
});
|
||||
self.lookup_import_candidates(ident, Namespace::MacroNS, parent_scope, is_expected);
|
||||
show_candidates(err, None, &import_suggestions, false, true);
|
||||
|
||||
if macro_kind == MacroKind::Derive && (ident.name == sym::Send || ident.name == sym::Sync) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue