]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/constrain-trait.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / constrain-trait.stderr
1 error[E0599]: no method named `get_a` found for reference `&Self` in the current scope
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 {
11    |                                  +++++++++++
12
13 error[E0599]: no method named `get_a` found for reference `&Self` in the current scope
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 {
23    |                 +++++++++++
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0599`.