diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-15 18:49:43 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-16 13:09:10 +0100 |
| commit | 98ab898d30f0914aa9bc0c3864dc059d45c2c7fc (patch) | |
| tree | 8b41f7e56885dcf5fb510059c25c1a0cdae4d45a /tests/ui/inline-const/referencing-local-variables.rs | |
| parent | 76fd47124b8f8037b6187169b2cdf39139466952 (diff) | |
| download | rust-98ab898d30f0914aa9bc0c3864dc059d45c2c7fc.tar.gz rust-98ab898d30f0914aa9bc0c3864dc059d45c2c7fc.zip | |
tests: ui/inline-consts: add issue number to a test, 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.rs | 6 |
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() {} |
