Skip to content

Commit 64e6288

Browse files
committed
rebase and update tests
1 parent 60c7f37 commit 64e6288

File tree

4 files changed

+42
-10
lines changed

4 files changed

+42
-10
lines changed

src/test/ui/generic-associated-types/impl_bounds.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ LL | type C where Self: Clone;
5858
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this trait associated type doesn't have the requirement `Fooy<T>: Copy`
5959
help: consider restricting type parameter `T`
6060
|
61-
LL | impl<T: Copy> Foo for Fooy<T> {
62-
| ^^^^^^
61+
LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
62+
| ^^^^^^^^^^^^^^^^^^^
6363

6464
error[E0277]: the trait bound `T: Copy` is not satisfied
6565
--> $DIR/impl_bounds.rs:23:5

src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ error[E0271]: type mismatch resolving `<() as Super>::Assoc == ()`
44
LL | fn test() -> impl Test {
55
| ^^^^^^^^^ expected `()`, found `u8`
66
|
7-
= note: required because of the requirements on the impl of `Test` for `()`
7+
note: required because of the requirements on the impl of `Test` for `()`
8+
--> $DIR/projection-mismatch-in-impl-where-clause.rs:11:9
9+
|
10+
LL | impl<T> Test for T where T: Super<Assoc = ()> {}
11+
| ^^^^ ^
812

913
error: aborting due to previous error
1014

src/test/ui/kindck/kindck-impl-type-params.nll.stderr

+30-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ error[E0277]: `T` cannot be sent between threads safely
44
LL | let a = &t as &dyn Gettable<T>;
55
| ^^ `T` cannot be sent between threads safely
66
|
7-
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
7+
note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
8+
--> $DIR/kindck-impl-type-params.rs:14:32
9+
|
10+
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
11+
| ^^^^^^^^^^^ ^^^^
812
= note: required for the cast to the object type `dyn Gettable<T>`
913
help: consider restricting type parameter `T`
1014
|
@@ -17,7 +21,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
1721
LL | let a = &t as &dyn Gettable<T>;
1822
| ^^ the trait `Copy` is not implemented for `T`
1923
|
20-
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
24+
note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
25+
--> $DIR/kindck-impl-type-params.rs:14:32
26+
|
27+
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
28+
| ^^^^^^^^^^^ ^^^^
2129
= note: required for the cast to the object type `dyn Gettable<T>`
2230
help: consider restricting type parameter `T`
2331
|
@@ -30,7 +38,11 @@ error[E0277]: `T` cannot be sent between threads safely
3038
LL | let a: &dyn Gettable<T> = &t;
3139
| ^^ `T` cannot be sent between threads safely
3240
|
33-
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
41+
note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
42+
--> $DIR/kindck-impl-type-params.rs:14:32
43+
|
44+
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
45+
| ^^^^^^^^^^^ ^^^^
3446
= note: required for the cast to the object type `dyn Gettable<T>`
3547
help: consider restricting type parameter `T`
3648
|
@@ -43,7 +55,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
4355
LL | let a: &dyn Gettable<T> = &t;
4456
| ^^ the trait `Copy` is not implemented for `T`
4557
|
46-
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
58+
note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
59+
--> $DIR/kindck-impl-type-params.rs:14:32
60+
|
61+
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
62+
| ^^^^^^^^^^^ ^^^^
4763
= note: required for the cast to the object type `dyn Gettable<T>`
4864
help: consider restricting type parameter `T`
4965
|
@@ -56,7 +72,11 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
5672
LL | let a = t as Box<dyn Gettable<String>>;
5773
| ^ the trait `Copy` is not implemented for `String`
5874
|
59-
= note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
75+
note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
76+
--> $DIR/kindck-impl-type-params.rs:14:32
77+
|
78+
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
79+
| ^^^^^^^^^^^ ^^^^
6080
= note: required for the cast to the object type `dyn Gettable<String>`
6181

6282
error[E0277]: the trait bound `Foo: Copy` is not satisfied
@@ -65,7 +85,11 @@ error[E0277]: the trait bound `Foo: Copy` is not satisfied
6585
LL | let a: Box<dyn Gettable<Foo>> = t;
6686
| ^ the trait `Copy` is not implemented for `Foo`
6787
|
68-
= note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
88+
note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
89+
--> $DIR/kindck-impl-type-params.rs:14:32
90+
|
91+
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
92+
| ^^^^^^^^^^^ ^^^^
6993
= note: required for the cast to the object type `dyn Gettable<Foo>`
7094

7195
error: aborting due to 6 previous errors

src/test/ui/rfc1623.nll.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ LL | | };
1111
|
1212
= help: within `&SomeStruct`, the trait `Sync` is not implemented for `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>`
1313
= note: required because it appears within the type `&dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>`
14-
= note: required because it appears within the type `SomeStruct`
14+
note: required because it appears within the type `SomeStruct`
15+
--> $DIR/rfc1623.rs:11:8
16+
|
17+
LL | struct SomeStruct<'x, 'y, 'z: 'x> {
18+
| ^^^^^^^^^^
1519
= note: required because it appears within the type `&SomeStruct`
1620
= note: shared static variables must have a type that implements `Sync`
1721

0 commit comments

Comments
 (0)