summaryrefslogtreecommitdiffstats
path: root/src/test/ui/enum
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
commit5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch)
tree35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /src/test/ui/enum
parentAdding debian version 1.66.0+dfsg1-1. (diff)
downloadrustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz
rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/enum')
-rw-r--r--src/test/ui/enum/issue-67945-2.rs2
-rw-r--r--src/test/ui/enum/issue-67945-2.stderr6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/enum/issue-67945-2.rs b/src/test/ui/enum/issue-67945-2.rs
index e5044468d..2eb123b73 100644
--- a/src/test/ui/enum/issue-67945-2.rs
+++ b/src/test/ui/enum/issue-67945-2.rs
@@ -1,7 +1,7 @@
#![feature(type_ascription)]
enum Bug<S> { //~ ERROR parameter `S` is never used
- Var = 0: S,
+ Var = type_ascribe!(0, S),
//~^ ERROR generic parameters may not be used
}
diff --git a/src/test/ui/enum/issue-67945-2.stderr b/src/test/ui/enum/issue-67945-2.stderr
index 4f5e236a3..63d3521af 100644
--- a/src/test/ui/enum/issue-67945-2.stderr
+++ b/src/test/ui/enum/issue-67945-2.stderr
@@ -1,8 +1,8 @@
error: generic parameters may not be used in const operations
- --> $DIR/issue-67945-2.rs:4:14
+ --> $DIR/issue-67945-2.rs:4:28
|
-LL | Var = 0: S,
- | ^ cannot perform const operation using `S`
+LL | Var = type_ascribe!(0, S),
+ | ^ cannot perform const operation using `S`
|
= note: type parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions