1 // Checks that regions which appear in a trait object type are
2 // observed by the variance inference algorithm (and hence
3 // `TOption` is contavariant w/r/t `'a` and not bivariant).
7 #![feature(rustc_attrs)]
11 trait T { fn foo(&self); }
14 struct TOption<'a> { //~ ERROR [-]
15 v: Option<Box<dyn T + 'a>>,