@@ -25,19 +25,6 @@ LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
25
25
= note: lifetimes appearing in an associated or opaque type are not considered constrained
26
26
= note: consider introducing a named lifetime parameter
27
27
28
- error: item does not constrain `lifetime_params::Ty::{opaque#0}`
29
- --> $DIR/constrain_inputs.rs:8:8
30
- |
31
- LL | fn execute(ty: Ty<'_>) -> &str { todo!() }
32
- | ^^^^^^^
33
- |
34
- = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
35
- note: this opaque type is supposed to be constrained
36
- --> $DIR/constrain_inputs.rs:4:19
37
- |
38
- LL | type Ty<'a> = impl Sized;
39
- | ^^^^^^^^^^
40
-
41
28
error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
42
29
--> $DIR/constrain_inputs.rs:23:31
43
30
|
@@ -47,19 +34,6 @@ LL | fn execute(ty: Ty<'_>) -> &str { ty() }
47
34
= note: lifetimes appearing in an associated or opaque type are not considered constrained
48
35
= note: consider introducing a named lifetime parameter
49
36
50
- error: item does not constrain `lifetime_params_2::Ty::{opaque#0}`
51
- --> $DIR/constrain_inputs.rs:23:8
52
- |
53
- LL | fn execute(ty: Ty<'_>) -> &str { ty() }
54
- | ^^^^^^^
55
- |
56
- = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
57
- note: this opaque type is supposed to be constrained
58
- --> $DIR/constrain_inputs.rs:19:19
59
- |
60
- LL | type Ty<'a> = impl FnOnce() -> &'a str;
61
- | ^^^^^^^^^^^^^^^^^^^^^^^^
62
-
63
37
error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
64
38
--> $DIR/constrain_inputs.rs:34:37
65
39
|
@@ -78,6 +52,32 @@ LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
78
52
= note: lifetimes appearing in an associated or opaque type are not considered constrained
79
53
= note: consider introducing a named lifetime parameter
80
54
55
+ error: item does not constrain `lifetime_params::Ty::{opaque#0}`
56
+ --> $DIR/constrain_inputs.rs:8:8
57
+ |
58
+ LL | fn execute(ty: Ty<'_>) -> &str { todo!() }
59
+ | ^^^^^^^
60
+ |
61
+ = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
62
+ note: this opaque type is supposed to be constrained
63
+ --> $DIR/constrain_inputs.rs:4:19
64
+ |
65
+ LL | type Ty<'a> = impl Sized;
66
+ | ^^^^^^^^^^
67
+
68
+ error: item does not constrain `lifetime_params_2::Ty::{opaque#0}`
69
+ --> $DIR/constrain_inputs.rs:23:8
70
+ |
71
+ LL | fn execute(ty: Ty<'_>) -> &str { ty() }
72
+ | ^^^^^^^
73
+ |
74
+ = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
75
+ note: this opaque type is supposed to be constrained
76
+ --> $DIR/constrain_inputs.rs:19:19
77
+ |
78
+ LL | type Ty<'a> = impl FnOnce() -> &'a str;
79
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
80
+
81
81
error: aborting due to 8 previous errors
82
82
83
83
Some errors have detailed explanations: E0581, E0582.
0 commit comments