summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/assoc-static-semantic-fail.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/parser/assoc-static-semantic-fail.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/parser/assoc-static-semantic-fail.stderr')
-rw-r--r--tests/ui/parser/assoc-static-semantic-fail.stderr177
1 files changed, 177 insertions, 0 deletions
diff --git a/tests/ui/parser/assoc-static-semantic-fail.stderr b/tests/ui/parser/assoc-static-semantic-fail.stderr
new file mode 100644
index 000000000..8a74f49b9
--- /dev/null
+++ b/tests/ui/parser/assoc-static-semantic-fail.stderr
@@ -0,0 +1,177 @@
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:10:5
+ |
+LL | static IA: u8 = 0;
+ | ^^^^^^^^^^^^^^^^^^
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:12:5
+ |
+LL | static IB: u8;
+ | ^^^^^^^^^^^^^^
+
+error: a static item cannot be `default`
+ --> $DIR/assoc-static-semantic-fail.rs:15:5
+ |
+LL | default static IC: u8 = 0;
+ | ^^^^^^^ `default` because of this
+ |
+ = note: only associated `fn`, `const`, and `type` items can be `default`
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:15:5
+ |
+LL | default static IC: u8 = 0;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: a static item cannot be `default`
+ --> $DIR/assoc-static-semantic-fail.rs:18:16
+ |
+LL | pub(crate) default static ID: u8;
+ | ^^^^^^^ `default` because of this
+ |
+ = note: only associated `fn`, `const`, and `type` items can be `default`
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:18:5
+ |
+LL | pub(crate) default static ID: u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:25:5
+ |
+LL | static TA: u8 = 0;
+ | ^^^^^^^^^^^^^^^^^^
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:27:5
+ |
+LL | static TB: u8;
+ | ^^^^^^^^^^^^^^
+
+error: a static item cannot be `default`
+ --> $DIR/assoc-static-semantic-fail.rs:29:5
+ |
+LL | default static TC: u8 = 0;
+ | ^^^^^^^ `default` because of this
+ |
+ = note: only associated `fn`, `const`, and `type` items can be `default`
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:29:5
+ |
+LL | default static TC: u8 = 0;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: a static item cannot be `default`
+ --> $DIR/assoc-static-semantic-fail.rs:32:16
+ |
+LL | pub(crate) default static TD: u8;
+ | ^^^^^^^ `default` because of this
+ |
+ = note: only associated `fn`, `const`, and `type` items can be `default`
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:32:5
+ |
+LL | pub(crate) default static TD: u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:39:5
+ |
+LL | static TA: u8 = 0;
+ | ^^^^^^^^^^^^^^^^^^
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:41:5
+ |
+LL | static TB: u8;
+ | ^^^^^^^^^^^^^^
+
+error: a static item cannot be `default`
+ --> $DIR/assoc-static-semantic-fail.rs:44:5
+ |
+LL | default static TC: u8 = 0;
+ | ^^^^^^^ `default` because of this
+ |
+ = note: only associated `fn`, `const`, and `type` items can be `default`
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:44:5
+ |
+LL | default static TC: u8 = 0;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: a static item cannot be `default`
+ --> $DIR/assoc-static-semantic-fail.rs:47:9
+ |
+LL | pub default static TD: u8;
+ | ^^^^^^^ `default` because of this
+ |
+ = note: only associated `fn`, `const`, and `type` items can be `default`
+
+error: associated `static` items are not allowed
+ --> $DIR/assoc-static-semantic-fail.rs:47:5
+ |
+LL | pub default static TD: u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: associated constant in `impl` without body
+ --> $DIR/assoc-static-semantic-fail.rs:12:5
+ |
+LL | static IB: u8;
+ | ^^^^^^^^^^^^^-
+ | |
+ | help: provide a definition for the constant: `= <expr>;`
+
+error: associated constant in `impl` without body
+ --> $DIR/assoc-static-semantic-fail.rs:18:5
+ |
+LL | pub(crate) default static ID: u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
+ | |
+ | help: provide a definition for the constant: `= <expr>;`
+
+error[E0449]: unnecessary visibility qualifier
+ --> $DIR/assoc-static-semantic-fail.rs:32:5
+ |
+LL | pub(crate) default static TD: u8;
+ | ^^^^^^^^^^
+
+error: associated constant in `impl` without body
+ --> $DIR/assoc-static-semantic-fail.rs:41:5
+ |
+LL | static TB: u8;
+ | ^^^^^^^^^^^^^-
+ | |
+ | help: provide a definition for the constant: `= <expr>;`
+
+error: associated constant in `impl` without body
+ --> $DIR/assoc-static-semantic-fail.rs:47:5
+ |
+LL | pub default static TD: u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^-
+ | |
+ | help: provide a definition for the constant: `= <expr>;`
+
+error[E0449]: unnecessary visibility qualifier
+ --> $DIR/assoc-static-semantic-fail.rs:47:5
+ |
+LL | pub default static TD: u8;
+ | ^^^ `pub` not permitted here because it's implied
+
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/assoc-static-semantic-fail.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+ = help: consider using `min_specialization` instead, which is more stable and complete
+ = note: `#[warn(incomplete_features)]` on by default
+
+error: aborting due to 24 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0449`.