]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-21673.stderr
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / ui / suggestions / issue-21673.stderr
1 error[E0599]: no method named `method` found for reference `&T` in the current scope
2   --> $DIR/issue-21673.rs:6:7
3    |
4 LL |     x.method()
5    |       ^^^^^^ method not found in `&T`
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 `method`, perhaps you need to restrict type parameter `T` with it:
9    |
10 LL | fn call_method<T: Foo + std::fmt::Debug>(x: &T) {
11    |                ~~~~~~~~
12
13 error[E0599]: no method named `method` found for type parameter `T` in the current scope
14   --> $DIR/issue-21673.rs:10:7
15    |
16 LL |     x.method()
17    |       ^^^^^^ method not found in `T`
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 `method`, perhaps you need to restrict type parameter `T` with it:
21    |
22 LL | fn call_method_2<T: Foo>(x: T) {
23    |                  ~~~~~~
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0599`.