Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/ui/auto-traits/issue-83857-ub.rs
Original file line number Diff line number Diff line change
@@ -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> {}
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/auto-traits/issue-83857-ub.stderr
Original file line number Diff line number Diff line change
@@ -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 {
| ---- ^^^^^^^^^ ^
Expand Down
Empty file.