]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / nll / user-annotations / constant-in-expr-trait-item-1.rs
1 trait Foo<'a> {
2     const C: &'a u32;
3 }
4
5 impl<'a, T> Foo<'a> for T {
6     const C: &'a u32 = &22;
7 }
8
9 fn foo<'a>(_: &'a u32) -> &'static u32 {
10     <() as Foo<'a>>::C //~ ERROR
11 }
12
13 fn main() {
14 }