diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-21 11:58:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-21 11:58:40 +0100 |
| commit | 825985981fd031168d35904c662bcbc6227fc2e5 (patch) | |
| tree | 3e7cd5a394c970f09e3b698cc02d37124da145e0 /tests/ui/inline-const/referencing-local-variables.rs | |
| parent | c064f6e1fc5e807b6c811205fb23f72bfce61d84 (diff) | |
| parent | 98ab898d30f0914aa9bc0c3864dc059d45c2c7fc (diff) | |
| download | rust-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.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() {} |
