2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2022-07-13 13:13:07 -05:00
|
|
|
//@ compile-flags: -Z mir-opt-level=0 -C panic=abort
|
|
|
|
|
2022-11-11 08:31:07 -06:00
|
|
|
#![feature(string_deref_patterns)]
|
2022-07-13 13:13:07 -05:00
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
// EMIT_MIR string.foo.PreCodegen.after.mir
|
|
|
|
pub fn foo(s: Option<String>) -> i32 {
|
|
|
|
match s {
|
|
|
|
Some("a") => 1234,
|
|
|
|
s => 4321,
|
|
|
|
}
|
|
|
|
}
|