]> git.lizzy.rs Git - rust.git/blob - src/test/ui/bound-suggestions.stderr
Rollup merge of #70741 - DutchGhost:test-59023, r=Centril
[rust.git] / src / test / ui / bound-suggestions.stderr
1 error[E0277]: `impl Sized` doesn't implement `std::fmt::Debug`
2   --> $DIR/bound-suggestions.rs:5:22
3    |
4 LL |     println!("{:?}", t);
5    |                      ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
6    |
7    = help: the trait `std::fmt::Debug` is not implemented for `impl Sized`
8    = note: required by `std::fmt::Debug::fmt`
9    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
10 help: consider further restricting this bound
11    |
12 LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
13    |                            ^^^^^^^^^^^^^^^^^
14
15 error[E0277]: `T` doesn't implement `std::fmt::Debug`
16   --> $DIR/bound-suggestions.rs:11:22
17    |
18 LL |     println!("{:?}", t);
19    |                      ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
20    |
21    = help: the trait `std::fmt::Debug` is not implemented for `T`
22    = note: required by `std::fmt::Debug::fmt`
23    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
24 help: consider restricting type parameter `T`
25    |
26 LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
27    |                    ^^^^^^^^^^^^^^^^^
28
29 error[E0277]: `T` doesn't implement `std::fmt::Debug`
30   --> $DIR/bound-suggestions.rs:17:22
31    |
32 LL |     println!("{:?}", t);
33    |                      ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
34    |
35    = help: the trait `std::fmt::Debug` is not implemented for `T`
36    = note: required by `std::fmt::Debug::fmt`
37    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
38 help: consider further restricting this bound
39    |
40 LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
41    |                            ^^^^^^^^^^^^^^^^^
42
43 error[E0277]: `Y` doesn't implement `std::fmt::Debug`
44   --> $DIR/bound-suggestions.rs:23:30
45    |
46 LL |     println!("{:?} {:?}", x, y);
47    |                              ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
48    |
49    = help: the trait `std::fmt::Debug` is not implemented for `Y`
50    = note: required by `std::fmt::Debug::fmt`
51    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
52 help: consider further restricting type parameter `Y`
53    |
54 LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
55    |                                                                   ^^^^^^^^^^^^^^^^^^^^
56
57 error[E0277]: `X` doesn't implement `std::fmt::Debug`
58   --> $DIR/bound-suggestions.rs:29:22
59    |
60 LL |     println!("{:?}", x);
61    |                      ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
62    |
63    = help: the trait `std::fmt::Debug` is not implemented for `X`
64    = note: required by `std::fmt::Debug::fmt`
65    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
66 help: consider further restricting this bound
67    |
68 LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
69    |                                                 ^^^^^^^^^^^^^^^^^
70
71 error[E0277]: `X` doesn't implement `std::fmt::Debug`
72   --> $DIR/bound-suggestions.rs:35:22
73    |
74 LL |     println!("{:?}", x);
75    |                      ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
76    |
77    = help: the trait `std::fmt::Debug` is not implemented for `X`
78    = note: required by `std::fmt::Debug::fmt`
79    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
80 help: consider further restricting type parameter `X`
81    |
82 LL | fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized, X: std::fmt::Debug {
83    |                                                            ^^^^^^^^^^^^^^^^^^^^
84
85 error: aborting due to 6 previous errors
86
87 For more information about this error, try `rustc --explain E0277`.