@@ -6,15 +6,15 @@ fn bar1<'a, 'b>(
66 x : & ' a i32 ,
77 y : & ' b i32 ,
88 f : for <' xa , ' xb : ' xa+' xa> fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 )
9- //~^ ERROR lifetime bounds cannot be used in this context
9+ //~^ ERROR bounds cannot be used in this context
1010{
1111 // If the bound in f's type would matter, the call below would (have to)
1212 // be rejected.
1313 f ( x, y) ;
1414}
1515
1616fn bar2 < ' a , ' b , F : for < ' xa , ' xb : ' xa > Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 > (
17- //~^ ERROR lifetime bounds cannot be used in this context
17+ //~^ ERROR bounds cannot be used in this context
1818 x : & ' a i32 ,
1919 y : & ' b i32 ,
2020 f : F )
@@ -29,7 +29,7 @@ fn bar3<'a, 'b, F>(
2929 y : & ' b i32 ,
3030 f : F )
3131 where F : for < ' xa , ' xb : ' xa > Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32
32- //~^ ERROR lifetime bounds cannot be used in this context
32+ //~^ ERROR bounds cannot be used in this context
3333{
3434 // If the bound in f's type would matter, the call below would (have to)
3535 // be rejected.
@@ -41,29 +41,29 @@ fn bar4<'a, 'b, F>(
4141 y : & ' b i32 ,
4242 f : F )
4343 where for < ' xa , ' xb : ' xa > F : Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32
44- //~^ ERROR lifetime bounds cannot be used in this context
44+ //~^ ERROR bounds cannot be used in this context
4545{
4646 // If the bound in f's type would matter, the call below would (have to)
4747 // be rejected.
4848 f ( x, y) ;
4949}
5050
5151struct S1 < F : for < ' xa , ' xb : ' xa > Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 > ( F ) ;
52- //~^ ERROR lifetime bounds cannot be used in this context
52+ //~^ ERROR bounds cannot be used in this context
5353struct S2 < F > ( F ) where F : for < ' xa , ' xb : ' xa > Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 ;
54- //~^ ERROR lifetime bounds cannot be used in this context
54+ //~^ ERROR bounds cannot be used in this context
5555struct S3 < F > ( F ) where for < ' xa , ' xb : ' xa > F : Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 ;
56- //~^ ERROR lifetime bounds cannot be used in this context
56+ //~^ ERROR bounds cannot be used in this context
5757
5858struct S_fnty ( for <' xa , ' xb : ' xa> fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 ) ;
59- //~^ ERROR lifetime bounds cannot be used in this context
59+ //~^ ERROR bounds cannot be used in this context
6060
6161type T1 = Box < dyn for < ' xa , ' xb : ' xa > Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 > ;
62- //~^ ERROR lifetime bounds cannot be used in this context
62+ //~^ ERROR bounds cannot be used in this context
6363
6464fn main ( ) {
6565 let _ : Option < for <' xa , ' xb : ' xa> fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 > = None ;
66- //~^ ERROR lifetime bounds cannot be used in this context
66+ //~^ ERROR bounds cannot be used in this context
6767 let _ : Option < Box < dyn for < ' xa , ' xb : ' xa > Fn ( & ' xa i32 , & ' xb i32 ) -> & ' xa i32 > > = None ;
68- //~^ ERROR lifetime bounds cannot be used in this context
68+ //~^ ERROR bounds cannot be used in this context
6969}
0 commit comments