mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
20 lines
237 B
Rust
20 lines
237 B
Rust
//@ check-pass
|
|
|
|
trait Foo<'a> {
|
|
const C: &'a u32;
|
|
}
|
|
|
|
impl<'a, T> Foo<'a> for T {
|
|
const C: &'a u32 = &22;
|
|
}
|
|
|
|
fn foo() {
|
|
let a = 22;
|
|
match &a {
|
|
<() as Foo<'static>>::C => { }
|
|
&_ => { }
|
|
}
|
|
}
|
|
|
|
fn main() {}
|