]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/trivial-bounds/trivial-bounds-leak.stderr
On single local candidate, use span label
[rust.git] / src / test / ui / trivial-bounds / trivial-bounds-leak.stderr
index acf309ac6087221235e883bdb99467983291a40c..7ed24591e66abf3c6f24505038264a76c68a1617 100644 (file)
@@ -11,12 +11,13 @@ LL | fn cant_return_str() -> str {
 error[E0599]: no method named `test` found for type `i32` in the current scope
   --> $DIR/trivial-bounds-leak.rs:24:10
    |
+LL | pub trait Foo {
+   | ------------- this trait defines an item `test`
+...
 LL |     3i32.test();
    |          ^^^^ method not found in `i32`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `test`, perhaps you need to implement it:
-           candidate #1: `Foo`
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/trivial-bounds-leak.rs:25:15