summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/early
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /tests/ui/const-generics/early
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/const-generics/early')
-rw-r--r--tests/ui/const-generics/early/const-param-from-outer-fn.rs2
-rw-r--r--tests/ui/const-generics/early/const-param-from-outer-fn.stderr8
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/const-generics/early/const-param-from-outer-fn.rs b/tests/ui/const-generics/early/const-param-from-outer-fn.rs
index c3b418ee3..ee57f3c4f 100644
--- a/tests/ui/const-generics/early/const-param-from-outer-fn.rs
+++ b/tests/ui/const-generics/early/const-param-from-outer-fn.rs
@@ -1,6 +1,6 @@
fn foo<const X: u32>() {
fn bar() -> u32 {
- X //~ ERROR can't use generic parameters from outer function
+ X //~ ERROR can't use generic parameters from outer item
}
}
diff --git a/tests/ui/const-generics/early/const-param-from-outer-fn.stderr b/tests/ui/const-generics/early/const-param-from-outer-fn.stderr
index e3bf38b70..826f26579 100644
--- a/tests/ui/const-generics/early/const-param-from-outer-fn.stderr
+++ b/tests/ui/const-generics/early/const-param-from-outer-fn.stderr
@@ -1,12 +1,12 @@
-error[E0401]: can't use generic parameters from outer function
+error[E0401]: can't use generic parameters from outer item
--> $DIR/const-param-from-outer-fn.rs:3:9
|
LL | fn foo<const X: u32>() {
- | - const parameter from outer function
+ | - const parameter from outer item
LL | fn bar() -> u32 {
- | - help: try using a local generic parameter instead: `<X>`
+ | - help: try introducing a local generic parameter here: `<X>`
LL | X
- | ^ use of generic parameter from outer function
+ | ^ use of generic parameter from outer item
error: aborting due to previous error