Only suggest adding type param if path being resolved was a type
This commit is contained in:
parent
fc11ee02ee
commit
566202b975
3 changed files with 2 additions and 16 deletions
|
@ -3373,7 +3373,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||
sugg.to_string(),
|
||||
Applicability::MaybeIncorrect,
|
||||
))
|
||||
} else if res.is_none() {
|
||||
} else if res.is_none() && matches!(source, PathSource::Type) {
|
||||
this.report_missing_type_error(path)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue