diff --git a/tests/crashes/134355.rs b/tests/crashes/134355.rs deleted file mode 100644 index b662341e6b1b..000000000000 --- a/tests/crashes/134355.rs +++ /dev/null @@ -1,6 +0,0 @@ -//@ known-bug: #134355 - -//@compile-flags: --crate-type=lib -fn digit() -> str { - return { i32::MIN }; -} diff --git a/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr b/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr index ce64a022214e..e49c8c92d839 100644 --- a/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr +++ b/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr @@ -17,12 +17,20 @@ LL | type LineStream<'c, 'd> = impl Stream; | | | found 0 type parameters -error[E0271]: type mismatch resolving `::LineStreamFut<'a, Repr> == ()` +error[E0271]: type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to ()` --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43 | LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ +error[E0271]: type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to _` + --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43 + | +LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ + | + = note: the return type of a function must have a statically known size + error[E0271]: type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to _` --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:73 | @@ -35,7 +43,7 @@ error[E0271]: type mismatch resolving `::LineStreamFut<'a, Repr> normali LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ -error: aborting due to 5 previous errors +error: aborting due to 6 previous errors Some errors have detailed explanations: E0049, E0271, E0407. For more information about an error, try `rustc --explain E0049`. diff --git a/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs b/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs index cb32723b22dd..bb0c6215de29 100644 --- a/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs +++ b/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs @@ -28,9 +28,10 @@ impl X for Y { fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {} //~^ method `line_stream` is not a member of trait `X` //[current]~^^ ERROR `()` is not a future - //[next]~^^^ ERROR type mismatch resolving `::LineStreamFut<'a, Repr> == ()` //[next]~| ERROR type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to _` //[next]~| ERROR type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to _` + //[next]~| ERROR type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to ()` + //[next]~| ERROR type mismatch resolving `::LineStreamFut<'a, Repr> normalizes-to _` } pub fn main() {} diff --git a/tests/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr b/tests/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr index 041f343da904..f59be2febeb3 100644 --- a/tests/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr +++ b/tests/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr @@ -181,8 +181,9 @@ LL | fn hat() -> dyn std::fmt::Display { | help: consider returning an `impl Trait` instead of a `dyn Trait` | -LL | fn hat() -> impl std::fmt::Display { - | ~~~~ +LL - fn hat() -> dyn std::fmt::Display { +LL + fn hat() -> impl std::fmt::Display { + | help: alternatively, box the return type, and wrap all of the returned values in `Box::new` | LL ~ fn hat() -> Box { @@ -202,8 +203,9 @@ LL | fn pug() -> dyn std::fmt::Display { | help: consider returning an `impl Trait` instead of a `dyn Trait` | -LL | fn pug() -> impl std::fmt::Display { - | ~~~~ +LL - fn pug() -> dyn std::fmt::Display { +LL + fn pug() -> impl std::fmt::Display { + | help: alternatively, box the return type, and wrap all of the returned values in `Box::new` | LL ~ fn pug() -> Box {