@@ -25,19 +25,6 @@ LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
2525 = note: lifetimes appearing in an associated or opaque type are not considered constrained
2626 = note: consider introducing a named lifetime parameter
2727
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-
4128error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
4229 --> $DIR/constrain_inputs.rs:23:31
4330 |
@@ -47,19 +34,6 @@ LL | fn execute(ty: Ty<'_>) -> &str { ty() }
4734 = note: lifetimes appearing in an associated or opaque type are not considered constrained
4835 = note: consider introducing a named lifetime parameter
4936
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-
6337error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
6438 --> $DIR/constrain_inputs.rs:34:37
6539 |
@@ -78,6 +52,32 @@ LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
7852 = note: lifetimes appearing in an associated or opaque type are not considered constrained
7953 = note: consider introducing a named lifetime parameter
8054
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+
8181error: aborting due to 8 previous errors
8282
8383Some errors have detailed explanations: E0581, E0582.
0 commit comments