summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/const-generics/assoc_const_eq_diagnostic.stderr')
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.stderr28
1 files changed, 20 insertions, 8 deletions
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
index 6d5cd4547..3d724bb16 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
@@ -16,30 +16,42 @@ LL | fn no_help() -> Mode::Cool {}
| not a type
| help: try using the variant's enum: `Mode`
-error: expected associated constant bound, found type
- --> $DIR/assoc_const_eq_diagnostic.rs:11:28
+error: expected constant, found type
+ --> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
- | ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
+ | ---- ^^^^^^^^^^ unexpected type
+ | |
+ | expected a constant because of this associated constant
|
-note: associated constant defined here
+note: the associated constant is defined here
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
LL | const MODE: Mode;
| ^^^^^^^^^^^^^^^^
+help: consider adding braces here
+ |
+LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
+ | + +
-error: expected associated constant bound, found type
- --> $DIR/assoc_const_eq_diagnostic.rs:11:28
+error: expected constant, found type
+ --> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
- | ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
+ | ---- ^^^^^^^^^^ unexpected type
+ | |
+ | expected a constant because of this associated constant
|
-note: associated constant defined here
+note: the associated constant is defined here
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
LL | const MODE: Mode;
| ^^^^^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider adding braces here
+ |
+LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
+ | + +
error: aborting due to 4 previous errors