summary refs log tree commit diff
path: root/tests/ui/inline-const/referencing-local-variables.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-11-21 11:58:40 +0100
committerGitHub <noreply@github.com>2024-11-21 11:58:40 +0100
commit825985981fd031168d35904c662bcbc6227fc2e5 (patch)
tree3e7cd5a394c970f09e3b698cc02d37124da145e0 /tests/ui/inline-const/referencing-local-variables.rs
parentc064f6e1fc5e807b6c811205fb23f72bfce61d84 (diff)
parent98ab898d30f0914aa9bc0c3864dc059d45c2c7fc (diff)
downloadrust-825985981fd031168d35904c662bcbc6227fc2e5.tar.gz
rust-825985981fd031168d35904c662bcbc6227fc2e5.zip
Rollup merge of #133078 - matthiaskrgr:uiuiui, r=davidtwco
tests: ui/inline-consts: add issue number to a test, rename other tests

rename other tests from a_b_c to a-b-c
Diffstat (limited to 'tests/ui/inline-const/referencing-local-variables.rs')
-rw-r--r--tests/ui/inline-const/referencing-local-variables.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/inline-const/referencing-local-variables.rs b/tests/ui/inline-const/referencing-local-variables.rs
new file mode 100644
index 00000000000..f9f0fef07f0
--- /dev/null
+++ b/tests/ui/inline-const/referencing-local-variables.rs
@@ -0,0 +1,6 @@
+const fn test_me<T>(a: usize) -> usize {
+    const { a }
+    //~^ ERROR:  attempt to use a non-constant value in a constant
+}
+
+fn main() {}