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