1 error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
2 --> $DIR/constrain_inputs.rs:6:31
4 LL | fn execute(ty: Ty<'_>) -> &str { todo!() }
7 = note: lifetimes appearing in an associated or opaque type are not considered constrained
8 = note: consider introducing a named lifetime parameter
10 error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
11 --> $DIR/constrain_inputs.rs:9:35
13 LL | type BadFnSig = fn(Ty<'_>) -> &str;
16 = note: lifetimes appearing in an associated or opaque type are not considered constrained
17 = note: consider introducing a named lifetime parameter
19 error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types
20 --> $DIR/constrain_inputs.rs:11:42
22 LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
25 = note: lifetimes appearing in an associated or opaque type are not considered constrained
26 = note: consider introducing a named lifetime parameter
28 error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
29 --> $DIR/constrain_inputs.rs:18:31
31 LL | fn execute(ty: Ty<'_>) -> &str { ty() }
34 = note: lifetimes appearing in an associated or opaque type are not considered constrained
35 = note: consider introducing a named lifetime parameter
37 error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
38 --> $DIR/constrain_inputs.rs:27:37
40 LL | type BadFnSig = fn(Ty<&str>) -> &str;
43 = note: lifetimes appearing in an associated or opaque type are not considered constrained
44 = note: consider introducing a named lifetime parameter
46 error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types
47 --> $DIR/constrain_inputs.rs:29:44
49 LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
52 = note: lifetimes appearing in an associated or opaque type are not considered constrained
53 = note: consider introducing a named lifetime parameter
55 error: aborting due to 6 previous errors
57 Some errors have detailed explanations: E0581, E0582.
58 For more information about an error, try `rustc --explain E0581`.