summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-44239.fixed
blob: e6c29cee97d2fa5a7c9303bd84d2502783d92a1b (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-rustfix
#![allow(dead_code, non_upper_case_globals)]
fn main() {
    const n: usize = 0;

    struct Foo;
    impl Foo {
        const N: usize = n;
        //~^ ERROR attempt to use a non-constant value
    }
}