diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-44239.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-44239.rs b/src/test/ui/issues/issue-44239.rs new file mode 100644 index 000000000..482ed194c --- /dev/null +++ b/src/test/ui/issues/issue-44239.rs @@ -0,0 +1,11 @@ +// run-rustfix +#![allow(dead_code, non_upper_case_globals)] +fn main() { + let n: usize = 0; + + struct Foo; + impl Foo { + const N: usize = n; + //~^ ERROR attempt to use a non-constant value + } +} |