mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
67f455afe1
When constant evaluation fails because its MIR is tainted by errors, suppress note indicating that erroneous constant was used, since those errors have to be fixed regardless of the constant being used or not.
6 lines
166 B
Rust
6 lines
166 B
Rust
fn main() {
|
|
const N: u32 = 1_000;
|
|
const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize; //~ ERROR cannot find value
|
|
let mut digits = [0u32; M];
|
|
}
|