mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-12 18:07:40 +00:00
13 lines
256 B
Rust
13 lines
256 B
Rust
![]() |
// compile-flags: -Z mir-opt-level=0 -C panic=abort
|
||
|
|
||
|
#![feature(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,
|
||
|
}
|
||
|
}
|