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:23
4 LL | struct WellFormed<Z = Foo<i32, i32>>(Z);
5 | ^^^^^^^^^^^^^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
7 = help: the trait `FromIterator<i32>` is not implemented for `i32`
8 note: required by a bound in `Foo`
9 --> $DIR/type-check-defaults.rs:5:18
11 LL | struct Foo<T, U: FromIterator<T>>(T, U);
12 | ^^^^^^^^^^^^^^^ required by this bound in `Foo`
14 error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
15 --> $DIR/type-check-defaults.rs:8:38
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`
21 note: required by a bound in `Foo`
22 --> $DIR/type-check-defaults.rs:5:18
24 LL | struct Foo<T, U: FromIterator<T>>(T, U);
25 | ^^^^^^^^^^^^^^^ required by this bound in `Foo`
27 error[E0277]: the trait bound `String: Copy` is not satisfied
28 --> $DIR/type-check-defaults.rs:11:17
30 LL | struct Bounds<T:Copy=String>(T);
31 | ^^^^ the trait `Copy` is not implemented for `String`
33 error[E0277]: the trait bound `String: Copy` is not satisfied
34 --> $DIR/type-check-defaults.rs:14:42
36 LL | struct WhereClause<T=String>(T) where T: Copy;
37 | ^^^^ the trait `Copy` is not implemented for `String`
39 error[E0277]: the trait bound `String: Copy` is not satisfied
40 --> $DIR/type-check-defaults.rs:17:20
42 LL | trait TraitBound<T:Copy=String> {}
43 | ^^^^ the trait `Copy` is not implemented for `String`
45 error[E0277]: the trait bound `T: Copy` is not satisfied
46 --> $DIR/type-check-defaults.rs:21:25
48 LL | trait Base<T = String>: Super<T> { }
49 | ^^^^^^^^ the trait `Copy` is not implemented for `T`
51 note: required by a bound in `Super`
52 --> $DIR/type-check-defaults.rs:20:16
54 LL | trait Super<T: Copy> { }
55 | ^^^^ required by this bound in `Super`
56 help: consider further restricting type parameter `T`
58 LL | trait Base<T = String>: Super<T> where T: std::marker::Copy { }
59 | ++++++++++++++++++++++++++
61 error[E0277]: cannot add `u8` to `i32`
62 --> $DIR/type-check-defaults.rs:24:66
64 LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
65 | ^^^^^^^ no implementation for `i32 + u8`
67 = help: the trait `Add<u8>` is not implemented for `i32`
68 = help: the following other types implement trait `Add<Rhs>`:
74 error: aborting due to 7 previous errors
76 For more information about this error, try `rustc --explain E0277`.