Files
rust/tests/ui/borrowck/string-literal-match-patterns-11869.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
297 B
Rust
Raw Normal View History

2025-07-24 17:22:54 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/11869
//@ check-pass
#![allow(dead_code)]
2014-10-02 21:52:06 +02:00
struct A {
a: String
}
fn borrow<'a>(binding: &'a A) -> &'a str {
match &*binding.a {
2014-10-02 21:52:06 +02:00
"in" => "in_",
"ref" => "ref_",
ident => ident
}
}
fn main() {}