@@ -6,15 +6,15 @@ fn bar1<'a, 'b>(
6
6
x : & ' a i32 ,
7
7
y : & ' b i32 ,
8
8
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
10
10
{
11
11
// If the bound in f's type would matter, the call below would (have to)
12
12
// be rejected.
13
13
f ( x, y) ;
14
14
}
15
15
16
16
fn 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
18
18
x : & ' a i32 ,
19
19
y : & ' b i32 ,
20
20
f : F )
@@ -29,7 +29,7 @@ fn bar3<'a, 'b, F>(
29
29
y : & ' b i32 ,
30
30
f : F )
31
31
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
33
33
{
34
34
// If the bound in f's type would matter, the call below would (have to)
35
35
// be rejected.
@@ -41,29 +41,29 @@ fn bar4<'a, 'b, F>(
41
41
y : & ' b i32 ,
42
42
f : F )
43
43
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
45
45
{
46
46
// If the bound in f's type would matter, the call below would (have to)
47
47
// be rejected.
48
48
f ( x, y) ;
49
49
}
50
50
51
51
struct 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
53
53
struct 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
55
55
struct 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
57
57
58
58
struct 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
60
60
61
61
type 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
63
63
64
64
fn main ( ) {
65
65
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
67
67
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
69
69
}
0 commit comments