]> git.lizzy.rs Git - rust.git/blob - tests/ui/variance/variance-object-types.rs
Auto merge of #107044 - cuviper:more-llvm-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / variance / variance-object-types.rs
1 #![feature(rustc_attrs)]
2
3
4 // For better or worse, associated types are invariant, and hence we
5 // get an invariant result for `'a`.
6 #[rustc_variance]
7 struct Foo<'a> { //~ ERROR [o]
8     x: Box<dyn Fn(i32) -> &'a i32 + 'static>
9 }
10
11 fn main() {
12 }