Closed
Description
trait A: Send {}
fn is_send<T: Send>(){}
fn main() {
is_send::<~A:>();
}
$ rustc foo.rs
foo.rs:6:5: 6:19 error: instantiating a type parameter with an incompatible type `~A<no-bounds>`, which does not fulfill `Send`
foo.rs:6 is_send::<~A:>();
^~~~~~~~~~~~~~
error: aborting due to previous error
I would expect this code to compile because any instance of trait A
must already ascribe to Send
. This caused some excessive verbosity in #13050.
cc @nikomatsakis
cc @pnkfelix