summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-44239.rs
blob: 482ed194c7a1c117a19ad39219fbdc5691a24eb1 (plain)
1
2
3
4
5
6
7
8
9
10
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
    }
}