Closed
Description
trait Trait: Send {}
#[cfg(not(working))]
struct Struct { x: Box<Trait> }
#[cfg(working)]
struct Struct { x: Box<Trait + Send> }
impl Trait for Struct {}
fn main() {}
Compiling with --cfg working
compiles fine, then without that --cfg
gives:
send2.rs:9:16: 9:22 error: the type `Struct', which does not fulfill `Send`, cannot implement this trait
send2.rs:9 impl Trait for Struct {}
^~~~~~
send2.rs:9:16: 9:22 note: types implementing this trait must fulfill `Send+Sized`
send2.rs:9 impl Trait for Struct {}
^~~~~~
error: aborting due to previous error