]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-57280.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / nll / issue-57280.rs
1 // check-pass
2
3 trait Foo {
4     const BLAH: &'static str;
5 }
6
7 struct Placeholder;
8
9 impl Foo for Placeholder {
10     const BLAH: &'static str = "hi";
11 }
12
13 fn foo(x: &str) {
14     match x {
15         <Placeholder as Foo>::BLAH => { }
16         _ => { }
17     }
18 }
19
20 fn main() {}