]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/constrain_inputs.stderr
Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic
[rust.git] / tests / ui / type-alias-impl-trait / constrain_inputs.stderr
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
3    |
4 LL |     fn execute(ty: Ty<'_>) -> &str { todo!() }
5    |                               ^^^^
6    |
7    = note: lifetimes appearing in an associated or opaque type are not considered constrained
8    = note: consider introducing a named lifetime parameter
9
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
12    |
13 LL |     type BadFnSig = fn(Ty<'_>) -> &str;
14    |                                   ^^^^
15    |
16    = note: lifetimes appearing in an associated or opaque type are not considered constrained
17    = note: consider introducing a named lifetime parameter
18
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
21    |
22 LL |     type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
23    |                                          ^^^^
24    |
25    = note: lifetimes appearing in an associated or opaque type are not considered constrained
26    = note: consider introducing a named lifetime parameter
27
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
30    |
31 LL |     fn execute(ty: Ty<'_>) -> &str { ty() }
32    |                               ^^^^
33    |
34    = note: lifetimes appearing in an associated or opaque type are not considered constrained
35    = note: consider introducing a named lifetime parameter
36
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
39    |
40 LL |     type BadFnSig = fn(Ty<&str>) -> &str;
41    |                                     ^^^^
42    |
43    = note: lifetimes appearing in an associated or opaque type are not considered constrained
44    = note: consider introducing a named lifetime parameter
45
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
48    |
49 LL |     type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
50    |                                            ^^^^
51    |
52    = note: lifetimes appearing in an associated or opaque type are not considered constrained
53    = note: consider introducing a named lifetime parameter
54
55 error: aborting due to 6 previous errors
56
57 Some errors have detailed explanations: E0581, E0582.
58 For more information about an error, try `rustc --explain E0581`.