@@ -5,7 +5,11 @@ error[E0277]: the trait bound `i32: std::iter::FromIterator<i32>` is not satisfi
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
- = note: required by `Foo`
8
+ note: required by `Foo`
9
+ --> $DIR/type-check-defaults.rs:15:1
10
+ |
11
+ 15 | struct Foo<T, U: FromIterator<T>>(T, U);
12
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9
13
10
14
error[E0277]: the trait bound `i32: std::iter::FromIterator<i32>` is not satisfied
11
15
--> $DIR/type-check-defaults.rs:18:27
@@ -14,7 +18,11 @@ error[E0277]: the trait bound `i32: std::iter::FromIterator<i32>` is not satisfi
14
18
| ^ a collection of type `i32` cannot be built from an iterator over elements of type `i32`
15
19
|
16
20
= help: the trait `std::iter::FromIterator<i32>` is not implemented for `i32`
17
- = note: required by `Foo`
21
+ note: required by `Foo`
22
+ --> $DIR/type-check-defaults.rs:15:1
23
+ |
24
+ 15 | struct Foo<T, U: FromIterator<T>>(T, U);
25
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
26
19
27
error[E0277]: the trait bound `A: std::iter::Iterator` is not satisfied
20
28
--> $DIR/type-check-defaults.rs:21:1
@@ -74,7 +82,11 @@ error[E0277]: the trait bound `TwoParams<i32, U>: Trait` is not satisfied
74
82
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `TwoParams<i32, U>`
75
83
|
76
84
= help: consider adding a `where TwoParams<i32, U>: Trait` bound
77
- = note: required by `Trait`
85
+ note: required by `Trait`
86
+ --> $DIR/type-check-defaults.rs:39:1
87
+ |
88
+ 39 | trait Trait {}
89
+ | ^^^^^^^^^^^
78
90
79
91
error[E0277]: the trait bound `TwoParams<T, i32>: Trait` is not satisfied
80
92
--> $DIR/type-check-defaults.rs:43:1
@@ -83,7 +95,24 @@ error[E0277]: the trait bound `TwoParams<T, i32>: Trait` is not satisfied
83
95
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `TwoParams<T, i32>`
84
96
|
85
97
= help: consider adding a `where TwoParams<T, i32>: Trait` bound
86
- = note: required by `Trait`
98
+ note: required by `Trait`
99
+ --> $DIR/type-check-defaults.rs:39:1
100
+ |
101
+ 39 | trait Trait {}
102
+ | ^^^^^^^^^^^
103
+
104
+ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
105
+ --> $DIR/type-check-defaults.rs:48:1
106
+ |
107
+ 48 | trait Base<T = String>: Super<T> { }
108
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
109
+ |
110
+ = help: consider adding a `where T: std::marker::Copy` bound
111
+ note: required by `Super`
112
+ --> $DIR/type-check-defaults.rs:47:1
113
+ |
114
+ 47 | trait Super<T: Copy> { }
115
+ | ^^^^^^^^^^^^^^^^^^^^
87
116
88
- error: aborting due to 10 previous errors
117
+ error: aborting due to 11 previous errors
89
118
0 commit comments