Skip to content

Commit ea14c4a

Browse files
compiler-errorscuviper
authored andcommitted
Fix revert fallout
(cherry picked from commit 81d6660)
1 parent 4d1e502 commit ea14c4a

4 files changed

+18
-13
lines changed

tests/crashes/134355.rs

-6
This file was deleted.

tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr

+10-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@ LL | type LineStream<'c, 'd> = impl Stream;
1717
| |
1818
| found 0 type parameters
1919

20-
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == ()`
20+
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to ()`
2121
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43
2222
|
2323
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
2525

26+
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
27+
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43
28+
|
29+
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
31+
|
32+
= note: the return type of a function must have a statically known size
33+
2634
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
2735
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:73
2836
|
@@ -35,7 +43,7 @@ error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normali
3543
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
3644
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
3745

38-
error: aborting due to 5 previous errors
46+
error: aborting due to 6 previous errors
3947

4048
Some errors have detailed explanations: E0049, E0271, E0407.
4149
For more information about an error, try `rustc --explain E0049`.

tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ impl X for Y {
2828
fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
2929
//~^ method `line_stream` is not a member of trait `X`
3030
//[current]~^^ ERROR `()` is not a future
31-
//[next]~^^^ ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == ()`
3231
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
3332
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
33+
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to ()`
34+
//[next]~| ERROR type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
3435
}
3536

3637
pub fn main() {}

tests/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr

+6-4
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ LL | fn hat() -> dyn std::fmt::Display {
181181
|
182182
help: consider returning an `impl Trait` instead of a `dyn Trait`
183183
|
184-
LL | fn hat() -> impl std::fmt::Display {
185-
| ~~~~
184+
LL - fn hat() -> dyn std::fmt::Display {
185+
LL + fn hat() -> impl std::fmt::Display {
186+
|
186187
help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
187188
|
188189
LL ~ fn hat() -> Box<dyn std::fmt::Display> {
@@ -202,8 +203,9 @@ LL | fn pug() -> dyn std::fmt::Display {
202203
|
203204
help: consider returning an `impl Trait` instead of a `dyn Trait`
204205
|
205-
LL | fn pug() -> impl std::fmt::Display {
206-
| ~~~~
206+
LL - fn pug() -> dyn std::fmt::Display {
207+
LL + fn pug() -> impl std::fmt::Display {
208+
|
207209
help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
208210
|
209211
LL ~ fn pug() -> Box<dyn std::fmt::Display> {

0 commit comments

Comments
 (0)