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