2023-09-20 21:43:33 +00:00
|
|
|
//@ unit-test: 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;
|
|
|
|
}
|