@@ -107,62 +107,83 @@ LL | reuse Trait::foo2 { &self.0 }
107107 | ^^^^
108108
109109error: delegation with early bound generics is not supported yet
110- --> $DIR/not-supported.rs:74 :21
110+ --> $DIR/not-supported.rs:76 :21
111111 |
112112LL | pub fn opaque_arg(_: impl Trait) -> i32 { 0 }
113113 | --------------------------------------- callee defined here
114114...
115115LL | reuse to_reuse::opaque_arg;
116116 | ^^^^^^^^^^
117117
118- error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:82:5: 82:24>::{synthetic#0}`
119- --> $DIR/not-supported.rs:83:25
118+ warning: this function depends on never type fallback being `()`
119+ --> $DIR/not-supported.rs:80:9
120+ |
121+ LL | fn opaque_ret() -> impl Trait { unimplemented!() }
122+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123+ |
124+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
125+ = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
126+ = help: specify the types explicitly
127+ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
128+
129+ error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:86:5: 86:24>::{synthetic#0}`
130+ --> $DIR/not-supported.rs:87:25
120131 |
121132LL | reuse to_reuse::opaque_ret;
122133 | ^^^^^^^^^^
123134 |
124135note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
125- --> $DIR/not-supported.rs:83 :25
136+ --> $DIR/not-supported.rs:87 :25
126137 |
127138LL | reuse to_reuse::opaque_ret;
128139 | ^^^^^^^^^^
129- = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:82 :5: 82 :24>::{synthetic#0}`, completing the cycle
130- note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:82 :5: 82 :24>` is well-formed
131- --> $DIR/not-supported.rs:82 :5
140+ = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:86 :5: 86 :24>::{synthetic#0}`, completing the cycle
141+ note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:86 :5: 86 :24>` is well-formed
142+ --> $DIR/not-supported.rs:86 :5
132143 |
133144LL | impl ToReuse for u8 {
134145 | ^^^^^^^^^^^^^^^^^^^
135146 = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
136147
137- error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:85:5: 85:25>::{synthetic#0}`
138- --> $DIR/not-supported.rs:86:24
148+ warning: this function depends on never type fallback being `()`
149+ --> $DIR/not-supported.rs:72:9
150+ |
151+ LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
152+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153+ |
154+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
155+ = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
156+ = help: specify the types explicitly
157+
158+ error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:89:5: 89:25>::{synthetic#0}`
159+ --> $DIR/not-supported.rs:90:24
139160 |
140161LL | reuse ToReuse::opaque_ret;
141162 | ^^^^^^^^^^
142163 |
143164note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
144- --> $DIR/not-supported.rs:86 :24
165+ --> $DIR/not-supported.rs:90 :24
145166 |
146167LL | reuse ToReuse::opaque_ret;
147168 | ^^^^^^^^^^
148- = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:85 :5: 85 :25>::{synthetic#0}`, completing the cycle
149- note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:85 :5: 85 :25>` is well-formed
150- --> $DIR/not-supported.rs:85 :5
169+ = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:89 :5: 89 :25>::{synthetic#0}`, completing the cycle
170+ note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:89 :5: 89 :25>` is well-formed
171+ --> $DIR/not-supported.rs:89 :5
151172 |
152173LL | impl ToReuse for u16 {
153174 | ^^^^^^^^^^^^^^^^^^^^
154175 = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
155176
156177error: recursive delegation is not supported yet
157- --> $DIR/not-supported.rs:99 :22
178+ --> $DIR/not-supported.rs:103 :22
158179 |
159180LL | pub reuse to_reuse2::foo;
160181 | --- callee defined here
161182...
162183LL | reuse to_reuse1::foo;
163184 | ^^^
164185
165- error: aborting due to 16 previous errors
186+ error: aborting due to 16 previous errors; 2 warnings emitted
166187
167188Some errors have detailed explanations: E0049, E0195, E0391.
168189For more information about an error, try `rustc --explain E0049`.
0 commit comments