@@ -4,47 +4,53 @@ error[E0581]: return type references an anonymous lifetime, which is not constra
4
4
LL | fn execute(ty: Ty<'_>) -> &str { todo!() }
5
5
| ^^^^
6
6
|
7
- = note: lifetimes appearing in an associated type are not considered constrained
7
+ = note: lifetimes appearing in an associated or opaque type are not considered constrained
8
+ = note: consider introducing a named lifetime parameter
8
9
9
10
error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
10
11
--> $DIR/constrain_inputs.rs:9:35
11
12
|
12
13
LL | type BadFnSig = fn(Ty<'_>) -> &str;
13
14
| ^^^^
14
15
|
15
- = note: lifetimes appearing in an associated type are not considered constrained
16
+ = note: lifetimes appearing in an associated or opaque type are not considered constrained
17
+ = note: consider introducing a named lifetime parameter
16
18
17
19
error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types
18
20
--> $DIR/constrain_inputs.rs:11:42
19
21
|
20
22
LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
21
23
| ^^^^
22
24
|
23
- = note: lifetimes appearing in an associated type are not considered constrained
25
+ = note: lifetimes appearing in an associated or opaque type are not considered constrained
26
+ = note: consider introducing a named lifetime parameter
24
27
25
28
error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
26
29
--> $DIR/constrain_inputs.rs:18:31
27
30
|
28
31
LL | fn execute(ty: Ty<'_>) -> &str { ty() }
29
32
| ^^^^
30
33
|
31
- = note: lifetimes appearing in an associated type are not considered constrained
34
+ = note: lifetimes appearing in an associated or opaque type are not considered constrained
35
+ = note: consider introducing a named lifetime parameter
32
36
33
37
error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
34
38
--> $DIR/constrain_inputs.rs:27:37
35
39
|
36
40
LL | type BadFnSig = fn(Ty<&str>) -> &str;
37
41
| ^^^^
38
42
|
39
- = note: lifetimes appearing in an associated type are not considered constrained
43
+ = note: lifetimes appearing in an associated or opaque type are not considered constrained
44
+ = note: consider introducing a named lifetime parameter
40
45
41
46
error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types
42
47
--> $DIR/constrain_inputs.rs:29:44
43
48
|
44
49
LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
45
50
| ^^^^
46
51
|
47
- = note: lifetimes appearing in an associated type are not considered constrained
52
+ = note: lifetimes appearing in an associated or opaque type are not considered constrained
53
+ = note: consider introducing a named lifetime parameter
48
54
49
55
error: aborting due to 6 previous errors
50
56
0 commit comments