clean up after 113312

This commit is contained in:
Oleksandr Babak 2023-07-28 20:15:12 +02:00
parent 317ec04d18
commit 63845e78e1
No known key found for this signature in database
GPG Key ID: B21CA2CAC0240BB9
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
#![allow(suspicious_auto_trait_impls)]
// Tests that we don't incorrectly allow overlap between a builtin auto trait
// impl and a user written one. See #83857 for more details
struct Always<T, U>(T, U);
unsafe impl<T, U> Send for Always<T, U> {}

View File

@ -1,12 +1,12 @@
error[E0277]: `Foo<T, U>` cannot be sent between threads safely
--> $DIR/issue-83857-ub.rs:20:38
--> $DIR/issue-83857-ub.rs:22:38
|
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
note: required for `Foo<T, U>` to implement `WithAssoc`
--> $DIR/issue-83857-ub.rs:13:15
--> $DIR/issue-83857-ub.rs:15:15
|
LL | impl<T: Send> WithAssoc for T {
| ---- ^^^^^^^^^ ^