]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr
On single local candidate, use span label
[rust.git] / src / test / ui / impl-trait / issues / issue-21659-show-relevant-trait-impls-3.stderr
index 57417975474f7fe718b76bc15f7f081ccbcb48e1..32a677a7d7fc1a2c43473b91fb04d55c0f4133c5 100644 (file)
@@ -1,6 +1,9 @@
 error[E0599]: no method named `foo` found for struct `Bar` in the current scope
   --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:20:8
    |
+LL | trait Foo<A> {
+   | ------------ this trait defines an item `foo`
+...
 LL | struct Bar;
    | ----------- method `foo` not found for this
 ...
@@ -8,8 +11,6 @@ LL |     f1.foo(1usize);
    |        ^^^ method not found in `Bar`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `foo`, perhaps you need to implement it:
-           candidate #1: `Foo`
 
 error: aborting due to previous error