diff options
| author | Michael Goulet <michael@errs.io> | 2023-01-15 16:33:08 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-01-15 16:33:08 +0000 |
| commit | 566202b97511b27e66312f67faacffb7272d7dbb (patch) | |
| tree | 5203c1e34d8280c7063861328a3e78a834ecc5e9 /compiler/rustc_resolve/src | |
| parent | fc11ee02ee91b32e23684cd478bca80fe5323b47 (diff) | |
| download | rust-566202b97511b27e66312f67faacffb7272d7dbb.tar.gz rust-566202b97511b27e66312f67faacffb7272d7dbb.zip | |
Only suggest adding type param if path being resolved was a type
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index ca43762aa21..6ca7cd3e713 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -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 |
