]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-check-defaults.stderr
Rollup merge of #76758 - adamlesinski:clone_clock, r=tmandry
[rust.git] / src / test / ui / type / type-check-defaults.stderr
1 error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
2   --> $DIR/type-check-defaults.rs:6:19
3    |
4 LL | struct Foo<T, U: FromIterator<T>>(T, U);
5    |                  --------------- required by this bound in `Foo`
6 LL | struct WellFormed<Z = Foo<i32, i32>>(Z);
7    |                   ^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
8    |
9    = help: the trait `FromIterator<i32>` is not implemented for `i32`
10
11 error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
12   --> $DIR/type-check-defaults.rs:8:27
13    |
14 LL | struct Foo<T, U: FromIterator<T>>(T, U);
15    |                  --------------- required by this bound in `Foo`
16 ...
17 LL | struct WellFormedNoBounds<Z:?Sized = Foo<i32, i32>>(Z);
18    |                           ^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
19    |
20    = help: the trait `FromIterator<i32>` is not implemented for `i32`
21
22 error[E0277]: the trait bound `String: Copy` is not satisfied
23   --> $DIR/type-check-defaults.rs:11:17
24    |
25 LL | struct Bounds<T:Copy=String>(T);
26    | ----------------^^^^------------
27    | |               |
28    | |               the trait `Copy` is not implemented for `String`
29    | required by `Bounds`
30
31 error[E0277]: the trait bound `String: Copy` is not satisfied
32   --> $DIR/type-check-defaults.rs:14:42
33    |
34 LL | struct WhereClause<T=String>(T) where T: Copy;
35    | -----------------------------------------^^^^-
36    | |                                        |
37    | |                                        the trait `Copy` is not implemented for `String`
38    | required by `WhereClause`
39
40 error[E0277]: the trait bound `String: Copy` is not satisfied
41   --> $DIR/type-check-defaults.rs:17:20
42    |
43 LL | trait TraitBound<T:Copy=String> {}
44    | -------------------^^^^--------
45    | |                  |
46    | |                  the trait `Copy` is not implemented for `String`
47    | required by `TraitBound`
48
49 error[E0277]: the trait bound `T: Copy` is not satisfied
50   --> $DIR/type-check-defaults.rs:21:25
51    |
52 LL | trait Super<T: Copy> { }
53    |                ---- required by this bound in `Super`
54 LL | trait Base<T = String>: Super<T> { }
55    |                         ^^^^^^^^ the trait `Copy` is not implemented for `T`
56    |
57 help: consider further restricting type parameter `T`
58    |
59 LL | trait Base<T = String>: Super<T> where T: Copy { }
60    |                                  ^^^^^^^^^^^^^
61
62 error[E0277]: cannot add `u8` to `i32`
63   --> $DIR/type-check-defaults.rs:24:66
64    |
65 LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
66    | -----------------------------------------------------------------^^^^^^^
67    | |                                                                |
68    | |                                                                no implementation for `i32 + u8`
69    | required by `ProjectionPred`
70    |
71    = help: the trait `Add<u8>` is not implemented for `i32`
72
73 error: aborting due to 7 previous errors
74
75 For more information about this error, try `rustc --explain E0277`.