1 // Check that we test WF conditions for fn return types in a trait definition. 2 3 #![feature(rustc_attrs)] 4 #![allow(dead_code)] 5 #![allow(unused_variables)] 6 7 struct Bar<T:Eq+?Sized> { value: Box<T> } 8 9 trait Foo { bar(&self) -> &Bar<Self>10 fn bar(&self) -> &Bar<Self>; 11 //~^ ERROR E0277 12 // 13 // Here, Eq ought to be implemented. 14 } 15 main()16fn main() { } 17