@@ -16,74 +16,67 @@ error[E0277]: the trait bound `i32: std::iter::FromIterator<i32>` is not satisfi
16
16
= help: the trait `std::iter::FromIterator<i32>` is not implemented for `i32`
17
17
= note: required by `Foo`
18
18
19
- error[E0277]: the trait bound `A : std::iter::Iterator ` is not satisfied
20
- --> $DIR/type-check-defaults.rs:20:1
19
+ error[E0277]: the trait bound `i32 : std::iter::FromIterator<i32> ` is not satisfied
20
+ --> $DIR/type-check-defaults.rs:20:23
21
21
|
22
- 20 | struct WellFormedProjection<A, T=<A as Iterator>::Item>(A, T);
23
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `A` is not an iterator; maybe try calling `.iter()` or a similar method
22
+ 20 | trait WellFormedTrait<Z = Foo<i32, i32>> {}
23
+ | ^ a collection of type `i32` cannot be built from an iterator over elements of type `i32`
24
24
|
25
- = help: the trait `std::iter::Iterator ` is not implemented for `A `
26
- = help: consider adding a `where A: std::iter::Iterator` bound
25
+ = help: the trait `std::iter::FromIterator<i32> ` is not implemented for `i32 `
26
+ = note: required by `Foo`
27
27
28
- error[E0277]: the trait bound `std::string::String: std::marker::Copy ` is not satisfied
29
- --> $DIR/type-check-defaults.rs:22:1
28
+ error[E0277]: the trait bound `A: std::iter::Iterator ` is not satisfied
29
+ --> $DIR/type-check-defaults.rs:22:32
30
30
|
31
- 22 | struct Bounds<T:Copy=String>( T);
32
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy ` is not implemented for `std::string::String`
31
+ 22 | struct WellFormedProjection<A, T=<A as Iterator>::Item>(A, T);
32
+ | ^ `A ` is not an iterator; maybe try calling `.iter()` or a similar method
33
33
|
34
- = note: required by `std::marker::Copy`
34
+ = help: the trait `std::iter::Iterator` is not implemented for `A`
35
+ = help: consider adding a `where A: std::iter::Iterator` bound
36
+ = note: required by `std::iter::Iterator`
35
37
36
38
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
37
39
--> $DIR/type-check-defaults.rs:24:1
38
40
|
39
- 24 | struct WhereClause<T =String>(T) where T: Copy ;
40
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
41
+ 24 | struct Bounds<T:Copy =String>(T);
42
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
41
43
|
42
- = note: required by `std::marker::Copy `
44
+ = note: required by `Bounds `
43
45
44
46
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
45
47
--> $DIR/type-check-defaults.rs:26:1
46
48
|
47
- 26 | trait TraitBound<T:Copy=String> {}
48
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
49
- |
50
- = note: required by `std::marker::Copy`
51
-
52
- error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied
53
- --> $DIR/type-check-defaults.rs:28:1
54
- |
55
- 28 | trait SelfBound<T:Copy=Self> {}
56
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `Self`
49
+ 26 | struct WhereClause<T=String>(T) where T: Copy;
50
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
57
51
|
58
- = help: consider adding a `where Self: std::marker::Copy` bound
59
- = note: required by `std::marker::Copy`
52
+ = note: required by `WhereClause`
60
53
61
54
error[E0277]: the trait bound `i32: std::ops::Add<u8>` is not satisfied
62
- --> $DIR/type-check-defaults.rs:30 :1
55
+ --> $DIR/type-check-defaults.rs:28 :1
63
56
|
64
- 30 | trait FooTrait <T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
65
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u8`
57
+ 28 | struct Projection <T:Iterator = IntoIter<i32>>(T) where T::Item : Add<u8>;
58
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u8`
66
59
|
67
60
= help: the trait `std::ops::Add<u8>` is not implemented for `i32`
68
- = note: required by `std::ops::Add `
61
+ = note: required by `Projection `
69
62
70
63
error[E0277]: the trait bound `TwoParams<i32, U>: Trait` is not satisfied
71
- --> $DIR/type-check-defaults.rs:36 :1
64
+ --> $DIR/type-check-defaults.rs:34 :1
72
65
|
73
- 36 | struct Bogus<T = i32, U = i32>(TwoParams<T, U>) where TwoParams<T, U>: Trait;
66
+ 34 | struct Bogus<T = i32, U = i32>(TwoParams<T, U>) where TwoParams<T, U>: Trait;
74
67
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `TwoParams<i32, U>`
75
68
|
76
69
= help: consider adding a `where TwoParams<i32, U>: Trait` bound
77
- = note: required by `Trait `
70
+ = note: required by `Bogus `
78
71
79
72
error[E0277]: the trait bound `TwoParams<T, i32>: Trait` is not satisfied
80
- --> $DIR/type-check-defaults.rs:36 :1
73
+ --> $DIR/type-check-defaults.rs:34 :1
81
74
|
82
- 36 | struct Bogus<T = i32, U = i32>(TwoParams<T, U>) where TwoParams<T, U>: Trait;
75
+ 34 | struct Bogus<T = i32, U = i32>(TwoParams<T, U>) where TwoParams<T, U>: Trait;
83
76
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `TwoParams<T, i32>`
84
77
|
85
78
= help: consider adding a `where TwoParams<T, i32>: Trait` bound
86
- = note: required by `Trait `
79
+ = note: required by `Bogus `
87
80
88
- error: aborting due to 10 previous errors
81
+ error: aborting due to 9 previous errors
89
82
0 commit comments