1 error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
2 --> $DIR/type-check-defaults.rs:6:19
4 LL | struct Foo<T, U: FromIterator<T>>(T, U);
5 | --------------- required by this bound in `Foo`
6 LL | struct WellFormed<Z = Foo<i32, i32>>(Z);
7 | ^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
9 = help: the trait `FromIterator<i32>` is not implemented for `i32`
11 error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
12 --> $DIR/type-check-defaults.rs:8:27
14 LL | struct Foo<T, U: FromIterator<T>>(T, U);
15 | --------------- required by this bound in `Foo`
17 LL | struct WellFormedNoBounds<Z:?Sized = Foo<i32, i32>>(Z);
18 | ^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
20 = help: the trait `FromIterator<i32>` is not implemented for `i32`
22 error[E0277]: the trait bound `String: Copy` is not satisfied
23 --> $DIR/type-check-defaults.rs:11:17
25 LL | struct Bounds<T:Copy=String>(T);
26 | ----------------^^^^------------
28 | | the trait `Copy` is not implemented for `String`
29 | required by `Bounds`
31 error[E0277]: the trait bound `String: Copy` is not satisfied
32 --> $DIR/type-check-defaults.rs:14:42
34 LL | struct WhereClause<T=String>(T) where T: Copy;
35 | -----------------------------------------^^^^-
37 | | the trait `Copy` is not implemented for `String`
38 | required by `WhereClause`
40 error[E0277]: the trait bound `String: Copy` is not satisfied
41 --> $DIR/type-check-defaults.rs:17:20
43 LL | trait TraitBound<T:Copy=String> {}
44 | -------------------^^^^--------
46 | | the trait `Copy` is not implemented for `String`
47 | required by `TraitBound`
49 error[E0277]: the trait bound `T: Copy` is not satisfied
50 --> $DIR/type-check-defaults.rs:21:25
52 LL | trait Super<T: Copy> { }
53 | ---- required by this bound in `Super`
54 LL | trait Base<T = String>: Super<T> { }
55 | ^^^^^^^^ the trait `Copy` is not implemented for `T`
57 help: consider further restricting type parameter `T`
59 LL | trait Base<T = String>: Super<T> where T: Copy { }
62 error[E0277]: cannot add `u8` to `i32`
63 --> $DIR/type-check-defaults.rs:24:66
65 LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
66 | -----------------------------------------------------------------^^^^^^^
68 | | no implementation for `i32 + u8`
69 | required by `ProjectionPred`
71 = help: the trait `Add<u8>` is not implemented for `i32`
73 error: aborting due to 7 previous errors
75 For more information about this error, try `rustc --explain E0277`.