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