]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/constrain-trait.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / suggestions / constrain-trait.stderr
CommitLineData
dfeec247 1error[E0599]: no method named `get_a` found for reference `&Self` in the current scope
e74abb32
XL
2 --> $DIR/constrain-trait.rs:15:31
3 |
4LL | 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
8help: the following trait defines an item `get_a`, perhaps you need to add another supertrait for it:
9 |
10LL | trait UseString: std::fmt::Debug + GetString {
94222f64 11 | +++++++++++
e74abb32 12
dfeec247 13error[E0599]: no method named `get_a` found for reference `&Self` in the current scope
e74abb32
XL
14 --> $DIR/constrain-trait.rs:21:31
15 |
16LL | 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
20help: the following trait defines an item `get_a`, perhaps you need to add a supertrait for it:
21 |
22LL | trait UseString2: GetString {
94222f64 23 | +++++++++++
e74abb32
XL
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0599`.