blob: 0c8385b5c483762847cb0ce0b3df48c2f00b9c43 [file] [log] [blame]
Stephen Hines51393642024-02-02 00:10:59 -08001// skip-filecheck
Chris Wailes977026a2023-02-13 09:13:10 -08002// compile-flags: -Z mir-opt-level=0 -C panic=abort
3
4#![feature(string_deref_patterns)]
5#![crate_type = "lib"]
6
7// EMIT_MIR string.foo.PreCodegen.after.mir
8pub fn foo(s: Option<String>) -> i32 {
9 match s {
10 Some("a") => 1234,
11 s => 4321,
12 }
13}