mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
12 lines
218 B
Rust
12 lines
218 B
Rust
//@ 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
|
|
}
|
|
}
|