@@ -23,12 +23,12 @@ fn check_bound<'a,A:'a>(x: Inv<'a>, a: A) { }
2323
2424// In these case, `Self` inherits `'static`.
2525
26- trait InheritsFromStatic : ' static {
26+ trait InheritsFromStatic : Sized + ' static {
2727 fn foo1 < ' a > ( self , x : Inv < ' a > ) {
2828 check_bound ( x, self )
2929 }
3030}
31- trait InheritsFromStaticIndirectly : Static {
31+ trait InheritsFromStaticIndirectly : Sized + Static {
3232 fn foo1 < ' a > ( self , x : Inv < ' a > ) {
3333 check_bound ( x, self )
3434 }
@@ -37,21 +37,21 @@ trait InheritsFromStaticIndirectly : Static {
3737
3838// In these case, `Self` inherits `'a`.
3939
40- trait InheritsFromIs < ' a > : ' a {
40+ trait InheritsFromIs < ' a > : Sized + ' a {
4141 fn foo ( self , x : Inv < ' a > ) {
4242 check_bound ( x, self )
4343 }
4444}
4545
46- trait InheritsFromIsIndirectly < ' a > : Is < ' a > {
46+ trait InheritsFromIsIndirectly < ' a > : Sized + Is < ' a > {
4747 fn foo ( self , x : Inv < ' a > ) {
4848 check_bound ( x, self )
4949 }
5050}
5151
5252// In this case, `Self` inherits nothing.
5353
54- trait InheritsFromNothing < ' a > {
54+ trait InheritsFromNothing < ' a > : Sized {
5555 fn foo ( self , x : Inv < ' a > ) {
5656 check_bound ( x, self )
5757 //~^ ERROR parameter type `Self` may not live long enough
0 commit comments