about summary refs log tree commit diff
path: root/src/test/ui/impl-trait/nested_impl_trait.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/nested_impl_trait.stderr')
-rw-r--r--src/test/ui/impl-trait/nested_impl_trait.stderr18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/test/ui/impl-trait/nested_impl_trait.stderr b/src/test/ui/impl-trait/nested_impl_trait.stderr
index 248d1254ef7..a10e4ec3182 100644
--- a/src/test/ui/impl-trait/nested_impl_trait.stderr
+++ b/src/test/ui/impl-trait/nested_impl_trait.stderr
@@ -46,27 +46,21 @@ error[E0562]: `impl Trait` only allowed in function and inherent method return t
 LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
    |                                          ^^^^^^^^^^^^^^
 
-error[E0277]: `impl Into<u32>` doesn't implement `Debug`
+error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
   --> $DIR/nested_impl_trait.rs:5:70
    |
 LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
-   |                                                                      ^ `impl Into<u32>` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                                                                      ^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
    |
-help: consider further restricting this bound
-   |
-LL | fn bad_in_ret_position(x: impl Into<u32> + std::fmt::Debug) -> impl Into<impl Debug> { x }
-   |                                          +++++++++++++++++
+   = note: required because of the requirements on the impl of `Into<impl Debug>` for `impl Into<u32>`
 
-error[E0277]: `impl Into<u32>` doesn't implement `Debug`
+error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
   --> $DIR/nested_impl_trait.rs:18:58
    |
 LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
-   |                                                          ^ `impl Into<u32>` cannot be formatted using `{:?}` because it doesn't implement `Debug`
-   |
-help: consider further restricting this bound
+   |                                                          ^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
    |
-LL |     fn bad(x: impl Into<u32> + std::fmt::Debug) -> impl Into<impl Debug> { x }
-   |                              +++++++++++++++++
+   = note: required because of the requirements on the impl of `Into<impl Debug>` for `impl Into<u32>`
 
 error: aborting due to 8 previous errors