2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: GVN
|
2019-09-24 21:08:22 -05:00
|
|
|
|
|
|
|
static FOO: u8 = 2;
|
|
|
|
|
2023-09-20 16:43:33 -05:00
|
|
|
// EMIT_MIR read_immutable_static.main.GVN.diff
|
2019-09-24 21:08:22 -05:00
|
|
|
fn main() {
|
2023-12-02 14:56:11 -06:00
|
|
|
// CHECK-LABEL: fn main(
|
|
|
|
// CHECK: debug x => [[x:_.*]];
|
|
|
|
// CHECK: [[x]] = const 4_u8;
|
2019-09-24 21:08:22 -05:00
|
|
|
let x = FOO + FOO;
|
|
|
|
}
|