Open
Description
#![feature(object_safe_for_dispatch)]
trait Trait {
fn not_object_safe() {}
}
fn impls_send<T: Send + ?Sized>() {}
fn main() {
impls_send::<dyn Trait + Send>();
}
passes with the old solver, but results in an error with new:
error[E0277]: `dyn Trait + Send` cannot be sent between threads safely
--> <source>:10:18
|
10 | impls_send::<dyn Trait + Send>();
| ^^^^^^^^^^^^^^^^ `dyn Trait + Send` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `dyn Trait + Send`
note: required by a bound in `impls_send`
--> <source>:7:18
|
7 | fn impls_send<T: Send + ?Sized>() {}
| ^^^^ required by this bound in `impls_send`
unsure whether this is desired or not, it does not match the old solver. Caused by https://github.com/rust-lang/rust/blob/bdc15928c8119a86d15e2946cb54851264607842/compiler/rustc_trait_selection/src/solve/assembly/mod.rs#L793-L795
Metadata
Metadata
Assignees
Labels
No labels