summaryrefslogtreecommitdiffstats
path: root/tests/ui/on-unimplemented/bad-annotation.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/on-unimplemented/bad-annotation.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/on-unimplemented/bad-annotation.stderr')
-rw-r--r--tests/ui/on-unimplemented/bad-annotation.stderr83
1 files changed, 83 insertions, 0 deletions
diff --git a/tests/ui/on-unimplemented/bad-annotation.stderr b/tests/ui/on-unimplemented/bad-annotation.stderr
new file mode 100644
index 000000000..a8d3c8680
--- /dev/null
+++ b/tests/ui/on-unimplemented/bad-annotation.stderr
@@ -0,0 +1,83 @@
+error: malformed `rustc_on_unimplemented` attribute input
+ --> $DIR/bad-annotation.rs:17:1
+ |
+LL | #[rustc_on_unimplemented]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+help: the following are the possible correct uses
+ |
+LL | #[rustc_on_unimplemented = "message"]
+ |
+LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
+ |
+
+error[E0230]: there is no parameter `C` on trait `BadAnnotation2`
+ --> $DIR/bad-annotation.rs:22:1
+ |
+LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0231]: only named substitution parameters are allowed
+ --> $DIR/bad-annotation.rs:27:1
+ |
+LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0232]: this attribute must have a valid value
+ --> $DIR/bad-annotation.rs:32:26
+ |
+LL | #[rustc_on_unimplemented(lorem="")]
+ | ^^^^^^^^ expected value here
+ |
+ = note: eg `#[rustc_on_unimplemented(message="foo")]`
+
+error[E0232]: this attribute must have a valid value
+ --> $DIR/bad-annotation.rs:36:26
+ |
+LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))]
+ | ^^^^^^^^^^^^^^^^^^^ expected value here
+ |
+ = note: eg `#[rustc_on_unimplemented(message="foo")]`
+
+error[E0232]: this attribute must have a valid value
+ --> $DIR/bad-annotation.rs:40:39
+ |
+LL | #[rustc_on_unimplemented(message="x", message="y")]
+ | ^^^^^^^^^^^ expected value here
+ |
+ = note: eg `#[rustc_on_unimplemented(message="foo")]`
+
+error[E0232]: this attribute must have a valid value
+ --> $DIR/bad-annotation.rs:44:39
+ |
+LL | #[rustc_on_unimplemented(message="x", on(desugared, message="y"))]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
+ |
+ = note: eg `#[rustc_on_unimplemented(message="foo")]`
+
+error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]`
+ --> $DIR/bad-annotation.rs:48:26
+ |
+LL | #[rustc_on_unimplemented(on(), message="y")]
+ | ^^^^ empty on-clause here
+
+error[E0232]: this attribute must have a valid value
+ --> $DIR/bad-annotation.rs:52:26
+ |
+LL | #[rustc_on_unimplemented(on="x", message="y")]
+ | ^^^^^^ expected value here
+ |
+ = note: eg `#[rustc_on_unimplemented(message="foo")]`
+
+error[E0232]: this attribute must have a valid value
+ --> $DIR/bad-annotation.rs:59:40
+ |
+LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message="y")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
+ |
+ = note: eg `#[rustc_on_unimplemented(message="foo")]`
+
+error: aborting due to 10 previous errors
+
+Some errors have detailed explanations: E0230, E0231, E0232.
+For more information about an error, try `rustc --explain E0230`.