diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs
index e7c8886f0544a..86dbcba6c0d51 100644
--- a/compiler/rustc_resolve/src/diagnostics.rs
+++ b/compiler/rustc_resolve/src/diagnostics.rs
@@ -1914,6 +1914,8 @@ impl<'a> Resolver<'a> {
                 };
             }
             (msg, None)
+        } else if ident.name == kw::SelfUpper {
+            ("`Self` is only available in impls, traits, and type definitions".to_string(), None)
         } else if ident.name.as_str().chars().next().map_or(false, |c| c.is_ascii_uppercase()) {
             // Check whether the name refers to an item in the value namespace.
             let binding = if let Some(ribs) = ribs {
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index 1a99bff610a02..27bce60df2b9b 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -332,6 +332,16 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
                 span,
                 "`Self` is only available in impls, traits, and type definitions".to_string(),
             );
+            if let Some(item_kind) = self.diagnostic_metadata.current_item {
+                err.span_label(
+                    item_kind.ident.span,
+                    format!(
+                        "`Self` not allowed in {} {}",
+                        item_kind.kind.article(),
+                        item_kind.kind.descr()
+                    ),
+                );
+            }
             return (err, Vec::new());
         }
         if is_self_value(path, ns) {
@@ -389,6 +399,15 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
                         );
                     }
                 }
+            } else if let Some(item_kind) = self.diagnostic_metadata.current_item {
+                err.span_label(
+                    item_kind.ident.span,
+                    format!(
+                        "`self` not allowed in {} {}",
+                        item_kind.kind.article(),
+                        item_kind.kind.descr()
+                    ),
+                );
             }
             return (err, Vec::new());
         }
@@ -1788,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,
diff --git a/src/test/ui/error-codes/E0411.stderr b/src/test/ui/error-codes/E0411.stderr
index c1c25e835c148..4c99f9fcbf1de 100644
--- a/src/test/ui/error-codes/E0411.stderr
+++ b/src/test/ui/error-codes/E0411.stderr
@@ -1,6 +1,8 @@
 error[E0411]: cannot find type `Self` in this scope
   --> $DIR/E0411.rs:2:6
    |
+LL | fn main() {
+   |    ---- `Self` not allowed in a function
 LL |     <Self>::foo;
    |      ^^^^ `Self` is only available in impls, traits, and type definitions
 
diff --git a/src/test/ui/lifetimes/issue-97194.rs b/src/test/ui/lifetimes/issue-97194.rs
index accb4a9983071..5f3560dbe946e 100644
--- a/src/test/ui/lifetimes/issue-97194.rs
+++ b/src/test/ui/lifetimes/issue-97194.rs
@@ -2,7 +2,7 @@ extern "C" {
     fn bget(&self, index: [usize; Self::DIM]) -> bool {
         //~^ ERROR incorrect function inside `extern` block
         //~| ERROR `self` parameter is only allowed in associated functions
-        //~| ERROR use of undeclared type `Self`
+        //~| ERROR failed to resolve: `Self`
         type T<'a> = &'a str;
     }
 }
diff --git a/src/test/ui/lifetimes/issue-97194.stderr b/src/test/ui/lifetimes/issue-97194.stderr
index 15ad5aadf9fdd..93bde285a9901 100644
--- a/src/test/ui/lifetimes/issue-97194.stderr
+++ b/src/test/ui/lifetimes/issue-97194.stderr
@@ -25,11 +25,11 @@ LL |     fn bget(&self, index: [usize; Self::DIM]) -> bool {
    |
    = note: associated functions are those in `impl` or `trait` definitions
 
-error[E0433]: failed to resolve: use of undeclared type `Self`
+error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
   --> $DIR/issue-97194.rs:2:35
    |
 LL |     fn bget(&self, index: [usize; Self::DIM]) -> bool {
-   |                                   ^^^^ use of undeclared type `Self`
+   |                                   ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/resolve/issue-24968.rs b/src/test/ui/resolve/issue-24968.rs
index 916b48205dc82..19e16abcee3cb 100644
--- a/src/test/ui/resolve/issue-24968.rs
+++ b/src/test/ui/resolve/issue-24968.rs
@@ -1,5 +1,30 @@
+// Also includes more Self usages per #93796
+
 fn foo(_: Self) {
 //~^ ERROR cannot find type `Self`
 }
 
+fn foo2() {
+    let x: Self;
+    //~^ ERROR cannot find type `Self`
+}
+
+type Foo<T>
+where
+    Self: Clone,
+//~^ ERROR cannot find type `Self`
+= Vec<T>;
+
+const FOO: Self = 0;
+//~^ ERROR cannot find type `Self`
+
+const FOO2: u32 = Self::bar();
+//~^ ERROR failed to resolve: `Self`
+
+static FOO_S: Self = 0;
+//~^ ERROR cannot find type `Self`
+
+static FOO_S2: u32 = Self::bar();
+//~^ ERROR failed to resolve: `Self`
+
 fn main() {}
diff --git a/src/test/ui/resolve/issue-24968.stderr b/src/test/ui/resolve/issue-24968.stderr
index c891952c42b60..7e539d258048e 100644
--- a/src/test/ui/resolve/issue-24968.stderr
+++ b/src/test/ui/resolve/issue-24968.stderr
@@ -1,9 +1,57 @@
+error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
+  --> $DIR/issue-24968.rs:21:19
+   |
+LL | const FOO2: u32 = Self::bar();
+   |                   ^^^^ `Self` is only available in impls, traits, and type definitions
+
+error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
+  --> $DIR/issue-24968.rs:27:22
+   |
+LL | static FOO_S2: u32 = Self::bar();
+   |                      ^^^^ `Self` is only available in impls, traits, and type definitions
+
 error[E0411]: cannot find type `Self` in this scope
-  --> $DIR/issue-24968.rs:1:11
+  --> $DIR/issue-24968.rs:3:11
    |
 LL | fn foo(_: Self) {
-   |           ^^^^ `Self` is only available in impls, traits, and type definitions
+   |    ---    ^^^^ `Self` is only available in impls, traits, and type definitions
+   |    |
+   |    `Self` not allowed in a function
+
+error[E0411]: cannot find type `Self` in this scope
+  --> $DIR/issue-24968.rs:8:12
+   |
+LL | fn foo2() {
+   |    ---- `Self` not allowed in a function
+LL |     let x: Self;
+   |            ^^^^ `Self` is only available in impls, traits, and type definitions
+
+error[E0411]: cannot find type `Self` in this scope
+  --> $DIR/issue-24968.rs:14:5
+   |
+LL | type Foo<T>
+   |      --- `Self` not allowed in a type alias
+LL | where
+LL |     Self: Clone,
+   |     ^^^^ `Self` is only available in impls, traits, and type definitions
+
+error[E0411]: cannot find type `Self` in this scope
+  --> $DIR/issue-24968.rs:18:12
+   |
+LL | const FOO: Self = 0;
+   |       ---  ^^^^ `Self` is only available in impls, traits, and type definitions
+   |       |
+   |       `Self` not allowed in a constant item
+
+error[E0411]: cannot find type `Self` in this scope
+  --> $DIR/issue-24968.rs:24:15
+   |
+LL | static FOO_S: Self = 0;
+   |        -----  ^^^^ `Self` is only available in impls, traits, and type definitions
+   |        |
+   |        `Self` not allowed in a static item
 
-error: aborting due to previous error
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0411`.
+Some errors have detailed explanations: E0411, E0433.
+For more information about an error, try `rustc --explain E0411`.
diff --git a/src/test/ui/type-alias/issue-62263-self-in-atb.rs b/src/test/ui/type-alias/issue-62263-self-in-atb.rs
index 1f64b4cfe5c83..91522d8912f79 100644
--- a/src/test/ui/type-alias/issue-62263-self-in-atb.rs
+++ b/src/test/ui/type-alias/issue-62263-self-in-atb.rs
@@ -3,6 +3,6 @@ pub trait Trait {
 }
 
 pub type Alias = dyn Trait<A = Self::A>;
-//~^ ERROR failed to resolve: use of undeclared type `Self` [E0433]
+//~^ ERROR failed to resolve: `Self`
 
 fn main() {}
diff --git a/src/test/ui/type-alias/issue-62263-self-in-atb.stderr b/src/test/ui/type-alias/issue-62263-self-in-atb.stderr
index d34b6ed5038bc..c20074dc27ce7 100644
--- a/src/test/ui/type-alias/issue-62263-self-in-atb.stderr
+++ b/src/test/ui/type-alias/issue-62263-self-in-atb.stderr
@@ -1,8 +1,8 @@
-error[E0433]: failed to resolve: use of undeclared type `Self`
+error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
   --> $DIR/issue-62263-self-in-atb.rs:5:32
    |
 LL | pub type Alias = dyn Trait<A = Self::A>;
-   |                                ^^^^ use of undeclared type `Self`
+   |                                ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/type-alias/issue-62305-self-assoc-ty.rs b/src/test/ui/type-alias/issue-62305-self-assoc-ty.rs
index 999902fb18b37..a4d9a285485e7 100644
--- a/src/test/ui/type-alias/issue-62305-self-assoc-ty.rs
+++ b/src/test/ui/type-alias/issue-62305-self-assoc-ty.rs
@@ -1,4 +1,4 @@
 type Alias = Self::Target;
-//~^ ERROR failed to resolve: use of undeclared type `Self` [E0433]
+//~^ ERROR failed to resolve: `Self`
 
 fn main() {}
diff --git a/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr b/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr
index 823a5fa50fc6d..f3da50df9269b 100644
--- a/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr
+++ b/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr
@@ -1,8 +1,8 @@
-error[E0433]: failed to resolve: use of undeclared type `Self`
+error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
   --> $DIR/issue-62305-self-assoc-ty.rs:1:14
    |
 LL | type Alias = Self::Target;
-   |              ^^^^ use of undeclared type `Self`
+   |              ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr b/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr
index cae41672eadb2..7e15e42e3ccd9 100644
--- a/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr
+++ b/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr
@@ -2,9 +2,9 @@ error[E0411]: cannot find type `Self` in this scope
   --> $DIR/issue-62364-self-ty-arg.rs:5:29
    |
 LL | type Alias<'a> = Struct<&'a Self>;
-   |              -              ^^^^ `Self` is only available in impls, traits, and type definitions
-   |              |
-   |              help: you might be missing a type parameter: `, Self`
+   |      -----                  ^^^^ `Self` is only available in impls, traits, and type definitions
+   |      |
+   |      `Self` not allowed in a type alias
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/use/use-self-type.rs b/src/test/ui/use/use-self-type.rs
index 370593b2eb22b..3b4ce42970197 100644
--- a/src/test/ui/use/use-self-type.rs
+++ b/src/test/ui/use/use-self-type.rs
@@ -4,7 +4,7 @@ impl S {
     fn f() {}
     fn g() {
         use Self::f; //~ ERROR unresolved import
-        pub(in Self::f) struct Z; //~ ERROR use of undeclared type `Self`
+        pub(in Self::f) struct Z; //~ ERROR failed to resolve: `Self`
     }
 }
 
diff --git a/src/test/ui/use/use-self-type.stderr b/src/test/ui/use/use-self-type.stderr
index d1469fb349078..e615394115119 100644
--- a/src/test/ui/use/use-self-type.stderr
+++ b/src/test/ui/use/use-self-type.stderr
@@ -1,14 +1,14 @@
-error[E0433]: failed to resolve: use of undeclared type `Self`
+error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
   --> $DIR/use-self-type.rs:7:16
    |
 LL |         pub(in Self::f) struct Z;
-   |                ^^^^ use of undeclared type `Self`
+   |                ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error[E0432]: unresolved import `Self`
   --> $DIR/use-self-type.rs:6:13
    |
 LL |         use Self::f;
-   |             ^^^^ use of undeclared type `Self`
+   |             ^^^^ `Self` is only available in impls, traits, and type definitions
 
 error: aborting due to 2 previous errors