]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_underconstrained2.stderr
1 error[E0277]: `U` doesn't implement `Debug`
2   --> $DIR/generic_underconstrained2.rs:8:33
3    |
4 LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
5    |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
6    |
7 note: required by a bound in `Underconstrained`
8   --> $DIR/generic_underconstrained2.rs:5:26
9    |
10 LL | type Underconstrained<T: std::fmt::Debug> = impl Send;
11    |                          ^^^^^^^^^^^^^^^ required by this bound in `Underconstrained`
12 help: consider restricting type parameter `U`
13    |
14 LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
15    |                      +++++++++++++++++
16
17 error[E0277]: `V` doesn't implement `Debug`
18   --> $DIR/generic_underconstrained2.rs:16:43
19    |
20 LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
21    |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
22    |
23 note: required by a bound in `Underconstrained2`
24   --> $DIR/generic_underconstrained2.rs:13:27
25    |
26 LL | type Underconstrained2<T: std::fmt::Debug> = impl Send;
27    |                           ^^^^^^^^^^^^^^^ required by this bound in `Underconstrained2`
28 help: consider restricting type parameter `V`
29    |
30 LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained2<V> {
31    |                          +++++++++++++++++
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0277`.