]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/issue-21673.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / suggestions / issue-21673.stderr
CommitLineData
dfeec247 1error[E0599]: no method named `method` found for reference `&T` in the current scope
416331ca
XL
2 --> $DIR/issue-21673.rs:6:7
3 |
4LL | x.method()
e1599b0c 5 | ^^^^^^ method not found in `&T`
416331ca
XL
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 `method`, perhaps you need to restrict type parameter `T` with it:
9 |
04454e1e
FG
10LL | fn call_method<T: std::fmt::Debug + Foo>(x: &T) {
11 | +++++
416331ca 12
dfeec247 13error[E0599]: no method named `method` found for type parameter `T` in the current scope
416331ca
XL
14 --> $DIR/issue-21673.rs:10:7
15 |
16LL | x.method()
e1599b0c 17 | ^^^^^^ method not found in `T`
416331ca
XL
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 `method`, perhaps you need to restrict type parameter `T` with it:
21 |
22LL | fn call_method_2<T: Foo>(x: T) {
04454e1e 23 | +++++
416331ca
XL
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0599`.