]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/impl-trait-with-missing-bounds.stderr
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / suggestions / impl-trait-with-missing-bounds.stderr
1 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
2   --> $DIR/impl-trait-with-missing-bounds.rs:6:13
3    |
4 LL |         qux(constraint);
5    |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
6    |         |
7    |         required by a bound introduced by this call
8    |
9    = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
10 note: required by a bound in `qux`
11   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
12    |
13 LL | fn qux(_: impl std::fmt::Debug) {}
14    |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
15 help: introduce a type parameter with a trait bound instead of using `impl Trait`
16    |
17 LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
18    |       +++++++++++++              ~  ++++++++++++++++++++++++++++++++++
19
20 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
21   --> $DIR/impl-trait-with-missing-bounds.rs:14:13
22    |
23 LL |         qux(constraint);
24    |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
25    |         |
26    |         required by a bound introduced by this call
27    |
28    = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
29 note: required by a bound in `qux`
30   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
31    |
32 LL | fn qux(_: impl std::fmt::Debug) {}
33    |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
34 help: introduce a type parameter with a trait bound instead of using `impl Trait`
35    |
36 LL | fn bar<T, I: Iterator>(t: T, constraints: I) where T: std::fmt::Debug, <I as Iterator>::Item: Debug {
37    |         +++++++++++++                     ~                          ++++++++++++++++++++++++++++++
38
39 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
40   --> $DIR/impl-trait-with-missing-bounds.rs:22:13
41    |
42 LL |         qux(constraint);
43    |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
44    |         |
45    |         required by a bound introduced by this call
46    |
47    = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
48 note: required by a bound in `qux`
49   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
50    |
51 LL | fn qux(_: impl std::fmt::Debug) {}
52    |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
53 help: introduce a type parameter with a trait bound instead of using `impl Trait`
54    |
55 LL | fn baz<I: Iterator>(t: impl std::fmt::Debug, constraints: I) where <I as Iterator>::Item: Debug {
56    |       +++++++++++++                                       ~  ++++++++++++++++++++++++++++++++++
57
58 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
59   --> $DIR/impl-trait-with-missing-bounds.rs:30:13
60    |
61 LL |         qux(constraint);
62    |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
63    |         |
64    |         required by a bound introduced by this call
65    |
66    = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
67 note: required by a bound in `qux`
68   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
69    |
70 LL | fn qux(_: impl std::fmt::Debug) {}
71    |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
72 help: introduce a type parameter with a trait bound instead of using `impl Trait`
73    |
74 LL | fn bat<I, T: std::fmt::Debug, U: Iterator>(t: T, constraints: U, _: I) where <U as Iterator>::Item: Debug {
75    |                             +++++++++++++                     ~        ++++++++++++++++++++++++++++++++++
76
77 error[E0277]: `<impl Iterator + std::fmt::Debug as Iterator>::Item` doesn't implement `Debug`
78   --> $DIR/impl-trait-with-missing-bounds.rs:37:13
79    |
80 LL |         qux(constraint);
81    |         --- ^^^^^^^^^^ `<impl Iterator + std::fmt::Debug as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
82    |         |
83    |         required by a bound introduced by this call
84    |
85    = help: the trait `Debug` is not implemented for `<impl Iterator + std::fmt::Debug as Iterator>::Item`
86 note: required by a bound in `qux`
87   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
88    |
89 LL | fn qux(_: impl std::fmt::Debug) {}
90    |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
91 help: introduce a type parameter with a trait bound instead of using `impl Trait`
92    |
93 LL | fn bak<I: Iterator + std::fmt::Debug>(constraints: I) where <I as Iterator>::Item: Debug {
94    |       +++++++++++++++++++++++++++++++              ~  ++++++++++++++++++++++++++++++++++
95
96 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
97   --> $DIR/impl-trait-with-missing-bounds.rs:45:13
98    |
99 LL |         qux(constraint);
100    |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
101    |         |
102    |         required by a bound introduced by this call
103    |
104    = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
105 note: required by a bound in `qux`
106   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
107    |
108 LL | fn qux(_: impl std::fmt::Debug) {}
109    |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
110 help: introduce a type parameter with a trait bound instead of using `impl Trait`
111    |
112 LL | fn baw<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
113    |       ~~~~~~~~~~~~~              ~  ++++++++++++++++++++++++++++++++++
114
115 error: aborting due to 6 previous errors
116
117 For more information about this error, try `rustc --explain E0277`.