mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
817adda794
Five of the files being skipped here are because rustfmt is buggy (see
the error messages below). The others have clearly preferable manual
formatting.
error[internal]: left behind trailing whitespace
--> tests/fail/validity/transmute_through_ptr.rs:18:18:1
|
18 |
| ^^^^
|
warning: rustfmt has failed to format. See previous 1 errors.
error[internal]: left behind trailing whitespace
--> tests/fail/stacked_borrows/illegal_read2.rs:10:10:1
|
10 |
| ^^^^
|
warning: rustfmt has failed to format. See previous 1 errors.
error[internal]: left behind trailing whitespace
--> tests/fail/stacked_borrows/illegal_read5.rs:15:15:1
|
15 |
| ^^^^
|
warning: rustfmt has failed to format. See previous 1 errors.
error[internal]: left behind trailing whitespace
--> tests/fail/stacked_borrows/illegal_read1.rs:10:10:1
|
10 |
| ^^^^
|
warning: rustfmt has failed to format. See previous 1 errors.
error[internal]: left behind trailing whitespace
--> tests/fail/erroneous_const2.rs:9:9:1
|
9 |
| ^^^^
|
warning: rustfmt has failed to format. See previous 1 errors.
14 lines
428 B
Rust
14 lines
428 B
Rust
const X: u32 = 5;
|
|
const Y: u32 = 6;
|
|
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
|
|
//~^ERROR any use of this value
|
|
//~|WARN previously accepted
|
|
|
|
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
|
|
fn main() {
|
|
println!("{}", FOO); //~ERROR post-monomorphization error
|
|
//~|ERROR evaluation of constant value failed
|
|
//~|ERROR erroneous constant used
|
|
//~|WARN previously accepted
|
|
}
|