]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | error[E0599]: no method named `get_a` found for reference `&Self` in the current scope |
e74abb32 XL |
2 | --> $DIR/constrain-trait.rs:15:31 |
3 | | | |
4 | LL | println!("{:?}", self.get_a()); | |
5 | | ^^^^^ method not found in `&Self` | |
6 | | | |
7 | = help: items from traits can only be used if the type parameter is bounded by the trait | |
8 | help: the following trait defines an item `get_a`, perhaps you need to add another supertrait for it: | |
9 | | | |
10 | LL | trait UseString: std::fmt::Debug + GetString { | |
94222f64 | 11 | | +++++++++++ |
e74abb32 | 12 | |
dfeec247 | 13 | error[E0599]: no method named `get_a` found for reference `&Self` in the current scope |
e74abb32 XL |
14 | --> $DIR/constrain-trait.rs:21:31 |
15 | | | |
16 | LL | println!("{:?}", self.get_a()); | |
17 | | ^^^^^ method not found in `&Self` | |
18 | | | |
19 | = help: items from traits can only be used if the type parameter is bounded by the trait | |
20 | help: the following trait defines an item `get_a`, perhaps you need to add a supertrait for it: | |
21 | | | |
22 | LL | trait UseString2: GetString { | |
94222f64 | 23 | | +++++++++++ |
e74abb32 XL |
24 | |
25 | error: aborting due to 2 previous errors | |
26 | ||
27 | For more information about this error, try `rustc --explain E0599`. |