Rollup merge of #114182 - Ddystopia:cleanup-after-113312, r=lcnr

clean up after 113312

Minor edits for #113312

cc ``@RalfJung``
r? ``@lcnr``
This commit is contained in:
Matthias Krüger 2023-07-31 22:51:14 +02:00 committed by GitHub
commit 7c6942a11b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {
| ---- ^^^^^^^^^ ^