]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/dont-wrap-ambiguous-receivers.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / suggestions / dont-wrap-ambiguous-receivers.rs
1 mod banana {
2     //~^ HELP the following traits are implemented but not in scope
3     pub struct Chaenomeles;
4
5     pub trait Apple {
6         fn pick(&self) {}
7     }
8     impl Apple for Chaenomeles {}
9
10     pub trait Peach {
11         fn pick(&self, a: &mut ()) {}
12     }
13     impl<Mango: Peach> Peach for Box<Mango> {}
14     impl Peach for Chaenomeles {}
15 }
16
17 fn main() {
18     banana::Chaenomeles.pick()
19     //~^ ERROR no method named
20     //~| HELP items from traits can only be used if the trait is in scope
21 }