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