]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
Merge commit 'e329249b6a3a98830d860c74c8234a8dd9407436' into clippyup
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use2.stderr
1 error: non-defining opaque type use in defining scope
2   --> $DIR/generic_duplicate_param_use2.rs:11:27
3    |
4 LL | fn one<T: Debug>(t: T) -> Two<T, T> {
5    |                           ^^^^^^^^^
6    |
7 note: type used multiple times
8   --> $DIR/generic_duplicate_param_use2.rs:8:10
9    |
10 LL | type Two<T, U> = impl Debug;
11    |          ^  ^
12
13 error[E0277]: `T` doesn't implement `Debug`
14   --> $DIR/generic_duplicate_param_use2.rs:8:18
15    |
16 LL | type Two<T, U> = impl Debug;
17    |                  ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
18    |
19 help: consider restricting type parameter `T`
20    |
21 LL | type Two<T: std::fmt::Debug, U> = impl Debug;
22    |           +++++++++++++++++
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0277`.