@@ -4,47 +4,53 @@ error[E0581]: return type references an anonymous lifetime, which is not constra
44LL | fn execute(ty: Ty<'_>) -> &str { todo!() }
55 | ^^^^
66 |
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
89
910error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
1011 --> $DIR/constrain_inputs.rs:9:35
1112 |
1213LL | type BadFnSig = fn(Ty<'_>) -> &str;
1314 | ^^^^
1415 |
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
1618
1719error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types
1820 --> $DIR/constrain_inputs.rs:11:42
1921 |
2022LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
2123 | ^^^^
2224 |
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
2427
2528error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
2629 --> $DIR/constrain_inputs.rs:18:31
2730 |
2831LL | fn execute(ty: Ty<'_>) -> &str { ty() }
2932 | ^^^^
3033 |
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
3236
3337error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
3438 --> $DIR/constrain_inputs.rs:27:37
3539 |
3640LL | type BadFnSig = fn(Ty<&str>) -> &str;
3741 | ^^^^
3842 |
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
4045
4146error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types
4247 --> $DIR/constrain_inputs.rs:29:44
4348 |
4449LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
4550 | ^^^^
4651 |
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
4854
4955error: aborting due to 6 previous errors
5056
0 commit comments