blob: 0c8385b5c483762847cb0ce0b3df48c2f00b9c43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// skip-filecheck
// compile-flags: -Z mir-opt-level=0 -C panic=abort
#![feature(string_deref_patterns)]
#![crate_type = "lib"]
// EMIT_MIR string.foo.PreCodegen.after.mir
pub fn foo(s: Option<String>) -> i32 {
match s {
Some("a") => 1234,
s => 4321,
}
}
|