]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-check-defaults.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / type / type-check-defaults.stderr
1 error[E0277]: a collection of type `i32` cannot be built from an iterator over elements of type `i32`
2   --> $DIR/type-check-defaults.rs:16:19
3    |
4 LL | struct WellFormed<Z = Foo<i32, i32>>(Z);
5    |                   ^ a collection of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
6    |
7    = help: the trait `std::iter::FromIterator<i32>` is not implemented for `i32`
8 note: required by `Foo`
9   --> $DIR/type-check-defaults.rs:15:1
10    |
11 LL | struct Foo<T, U: FromIterator<T>>(T, U);
12    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error[E0277]: a collection of type `i32` cannot be built from an iterator over elements of type `i32`
15   --> $DIR/type-check-defaults.rs:18:27
16    |
17 LL | struct WellFormedNoBounds<Z:?Sized = Foo<i32, i32>>(Z);
18    |                           ^ a collection of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
19    |
20    = help: the trait `std::iter::FromIterator<i32>` is not implemented for `i32`
21 note: required by `Foo`
22   --> $DIR/type-check-defaults.rs:15:1
23    |
24 LL | struct Foo<T, U: FromIterator<T>>(T, U);
25    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
28   --> $DIR/type-check-defaults.rs:21:1
29    |
30 LL | struct Bounds<T:Copy=String>(T);
31    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
32    |
33 note: required by `Bounds`
34   --> $DIR/type-check-defaults.rs:21:1
35    |
36 LL | struct Bounds<T:Copy=String>(T);
37    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
40   --> $DIR/type-check-defaults.rs:24:1
41    |
42 LL | struct WhereClause<T=String>(T) where T: Copy;
43    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
44    |
45 note: required by `WhereClause`
46   --> $DIR/type-check-defaults.rs:24:1
47    |
48 LL | struct WhereClause<T=String>(T) where T: Copy;
49    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
51 error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
52   --> $DIR/type-check-defaults.rs:27:1
53    |
54 LL | trait TraitBound<T:Copy=String> {}
55    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
56    |
57 note: required by `TraitBound`
58   --> $DIR/type-check-defaults.rs:27:1
59    |
60 LL | trait TraitBound<T:Copy=String> {}
61    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62
63 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
64   --> $DIR/type-check-defaults.rs:31:1
65    |
66 LL | trait Base<T = String>: Super<T> { }
67    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
68    |
69    = help: consider adding a `where T: std::marker::Copy` bound
70 note: required by `Super`
71   --> $DIR/type-check-defaults.rs:30:1
72    |
73 LL | trait Super<T: Copy> { }
74    | ^^^^^^^^^^^^^^^^^^^^
75
76 error[E0277]: cannot add `u8` to `i32`
77   --> $DIR/type-check-defaults.rs:34:1
78    |
79 LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
80    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u8`
81    |
82    = help: the trait `std::ops::Add<u8>` is not implemented for `i32`
83 note: required by `ProjectionPred`
84   --> $DIR/type-check-defaults.rs:34:1
85    |
86 LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
87    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
89 error: aborting due to 7 previous errors
90
91 For more information about this error, try `rustc --explain E0277`.