The only non-obvious changes: - `building/storage_live_dead_in_statics.rs` has a `#[rustfmt::skip]` attribute to avoid reformating a table of data. - Two `.mir` files have slight changes involving line numbers. - In `unusual_item_types.rs` an `EMIT_MIR` annotation is moved to outside a function, which is the usual spot, because `tidy` complains if such a comment is indented. The commit also tweaks the comments in `rustfmt.toml`.
20 lines
537 B
Rust
20 lines
537 B
Rust
// skip-filecheck
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
|
//@ compile-flags: -C overflow-checks=on
|
|
|
|
struct Point {
|
|
x: u32,
|
|
y: u32,
|
|
}
|
|
|
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
|
// EMIT_MIR optimizes_into_variable.main.ScalarReplacementOfAggregates.diff
|
|
// EMIT_MIR optimizes_into_variable.main.GVN.diff
|
|
// EMIT_MIR optimizes_into_variable.main.SimplifyLocals-final.after.mir
|
|
// EMIT_MIR optimizes_into_variable.main.PreCodegen.after.mir
|
|
fn main() {
|
|
let x = 2 + 2;
|
|
let y = [0, 1, 2, 3, 4, 5][3];
|
|
let z = (Point { x: 12, y: 42 }).y;
|
|
}
|