2018-06-01 10:52:07 -05:00
|
|
|
// Checks to make sure that `dyn Trait + Send` and `dyn Trait + Send + Send` are the same type.
|
|
|
|
// Issue: #47010
|
|
|
|
|
|
|
|
struct Struct;
|
|
|
|
impl Trait for Struct {}
|
|
|
|
trait Trait {}
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
type Send1 = dyn Trait + Send;
|
|
|
|
type Send2 = dyn Trait + Send + Send;
|
2018-06-01 10:52:07 -05:00
|
|
|
|
|
|
|
fn main () {}
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
impl dyn Trait + Send {
|
2018-06-01 10:52:07 -05:00
|
|
|
fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
|
|
|
|
}
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
impl dyn Trait + Send + Send {
|
2018-06-01 10:52:07 -05:00
|
|
|
fn test(&self) { println!("two"); }
|
|
|
|
}
|