2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: Derefer
|
2022-04-16 08:03:14 -05:00
|
|
|
// EMIT_MIR derefer_terminator_test.main.Derefer.diff
|
2023-06-08 02:18:34 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2022-07-12 08:02:17 -05:00
|
|
|
|
2022-04-16 08:03:14 -05:00
|
|
|
fn main() {
|
|
|
|
let b = foo();
|
|
|
|
let d = foo();
|
|
|
|
match ****(&&&&b) {
|
2024-06-02 19:18:33 -05:00
|
|
|
true => {
|
|
|
|
let x = 5;
|
|
|
|
}
|
2022-04-16 08:03:14 -05:00
|
|
|
false => {}
|
|
|
|
}
|
|
|
|
let y = 42;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo() -> bool {
|
|
|
|
true
|
|
|
|
}
|