about summary refs log tree commit diff
path: root/tests/ui/impl-trait/nested_impl_trait.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/nested_impl_trait.stderr')
-rw-r--r--tests/ui/impl-trait/nested_impl_trait.stderr16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/ui/impl-trait/nested_impl_trait.stderr b/tests/ui/impl-trait/nested_impl_trait.stderr
index 1f9a2a5e9d6..f7c708a1dfa 100644
--- a/tests/ui/impl-trait/nested_impl_trait.stderr
+++ b/tests/ui/impl-trait/nested_impl_trait.stderr
@@ -46,19 +46,23 @@ error[E0277]: the trait bound `impl Into<u32>: Into<impl Debug>` is not satisfie
   --> $DIR/nested_impl_trait.rs:6:46
    |
 LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
-   |                                              ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Into<u32>`, which is required by `impl Into<u32>: Into<impl Debug>`
+   |                                              ^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `impl Into<u32>`
    |
-   = help: the trait `Into<U>` is implemented for `T`
-   = note: required for `impl Into<u32>` to implement `Into<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 }
+   |                                          +++++++++++++++++
 
 error[E0277]: the trait bound `impl Into<u32>: Into<impl Debug>` is not satisfied
   --> $DIR/nested_impl_trait.rs:19:34
    |
 LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
-   |                                  ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Into<u32>`, which is required by `impl Into<u32>: Into<impl Debug>`
+   |                                  ^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `impl Into<u32>`
+   |
+help: consider further restricting this bound
    |
-   = help: the trait `Into<U>` is implemented for `T`
-   = note: required for `impl Into<u32>` to implement `Into<impl Debug>`
+LL |     fn bad(x: impl Into<u32> + std::fmt::Debug) -> impl Into<impl Debug> { x }
+   |                              +++++++++++++++++
 
 error: aborting due to 7 previous errors