]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr
On single local candidate, use span label
[rust.git] / src / test / ui / self / point-at-arbitrary-self-type-trait-method.stderr
index 28a7b68a6821f9c4a5f390bf2db1037b09305a3f..8ed2b8b5c95211a0dd61403d3e220e3dbe21f424 100644 (file)
@@ -2,7 +2,9 @@ error[E0599]: no method named `foo` found for struct `A` in the current scope
   --> $DIR/point-at-arbitrary-self-type-trait-method.rs:9:7
    |
 LL | trait B { fn foo(self: Box<Self>); }
-   |              --- the method is available for `std::boxed::Box<A>` here
+   | -------      --- the method is available for `std::boxed::Box<A>` here
+   | |
+   | this trait defines an item `foo`
 LL | struct A;
    | --------- method `foo` not found for this
 ...
@@ -10,8 +12,6 @@ LL |     A.foo()
    |       ^^^ method not found in `A`
    |
    = 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: `B`
 
 error: aborting due to previous error