]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/issue-65284-suggest-generic-trait-bound.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / traits / issue-65284-suggest-generic-trait-bound.stderr
1 error[E0599]: no method named `foo` found for type parameter `T` in the current scope
2 --> $DIR/issue-65284-suggest-generic-trait-bound.rs:8:7
3 |
4 LL | fn do_stuff<T : Bar>(t : T) {
5 | - method `foo` not found for this type parameter
6 LL | t.foo()
7 | ^^^ method not found in `T`
8 |
9 = help: items from traits can only be used if the type parameter is bounded by the trait
10 help: the following trait defines an item `foo`, perhaps you need to restrict type parameter `T` with it:
11 |
12 LL | fn do_stuff<T : Bar + Foo>(t : T) {
13 | +++++
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0599`.