]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/object/auto-dedup-in-impl.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / traits / object / auto-dedup-in-impl.rs
1 // Checks to make sure that `dyn Trait + Send` and `dyn Trait + Send + Send` are the same type.
2 // Issue: #47010
3
4 struct Struct;
5 impl Trait for Struct {}
6 trait Trait {}
7
8 type Send1 = dyn Trait + Send;
9 type Send2 = dyn Trait + Send + Send;
10
11 fn main () {}
12
13 impl dyn Trait + Send {
14     fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
15 }
16
17 impl dyn Trait + Send + Send {
18     fn test(&self) { println!("two"); }
19 }