about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-06-19 19:25:50 -0700
committerMichael Goulet <michael@errs.io>2022-06-19 19:44:00 -0700
commit047de83e028f50f21560a5805baaef3f697837f4 (patch)
tree0c1bf5da4152dd682f3afc53573cdbc74144a25a /compiler
parent018c319b211eb7e42f1c8afabdcce5b5272c0614 (diff)
downloadrust-047de83e028f50f21560a5805baaef3f697837f4.tar.gz
rust-047de83e028f50f21560a5805baaef3f697837f4.zip
Don't suggest adding Self as a type parameter
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index 6b0b83d2cb5..27bce60df2b 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -1807,7 +1807,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
         path: &[Segment],
     ) -> Option<(Span, &'static str, String, Applicability)> {
         let (ident, span) = match path {
-            [segment] if !segment.has_generic_args => {
+            [segment] if !segment.has_generic_args && segment.ident.name != kw::SelfUpper => {
                 (segment.ident.to_string(), segment.ident.span)
             }
             _ => return None,