summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-24968.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /tests/ui/resolve/issue-24968.stderr
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/resolve/issue-24968.stderr')
-rw-r--r--tests/ui/resolve/issue-24968.stderr57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-24968.stderr b/tests/ui/resolve/issue-24968.stderr
new file mode 100644
index 000000000..82f5a1d5b
--- /dev/null
+++ b/tests/ui/resolve/issue-24968.stderr
@@ -0,0 +1,57 @@
+error[E0411]: cannot find type `Self` in this scope
+ --> $DIR/issue-24968.rs:3:11
+ |
+LL | fn foo(_: Self) {
+ | --- ^^^^ `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[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: aborting due to 7 previous errors
+
+Some errors have detailed explanations: E0411, E0433.
+For more information about an error, try `rustc --explain E0411`.