]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/object-pointer-types.stderr
On single local candidate, use span label
[rust.git] / src / test / ui / object-pointer-types.stderr
index 855894b4495c6baba701a7bece186aeb28e1ebc0..5ca326bca31c5bdbcf92665e12e4c5e21d2e1b12 100644 (file)
@@ -1,22 +1,24 @@
 error[E0599]: no method named `owned` found for reference `&dyn Foo` in the current scope
   --> $DIR/object-pointer-types.rs:11:7
    |
+LL | trait Foo {
+   | --------- this trait defines an item `owned`
+...
 LL |     x.owned();
    |       ^^^^^ method not found in `&dyn Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `owned`, perhaps you need to implement it:
-           candidate #1: `Foo`
 
 error[E0599]: no method named `owned` found for mutable reference `&mut dyn Foo` in the current scope
   --> $DIR/object-pointer-types.rs:17:7
    |
+LL | trait Foo {
+   | --------- this trait defines an item `owned`
+...
 LL |     x.owned();
    |       ^^^^^ method not found in `&mut dyn Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `owned`, perhaps you need to implement it:
-           candidate #1: `Foo`
 
 error[E0599]: no method named `managed` found for struct `std::boxed::Box<(dyn Foo + 'static)>` in the current scope
   --> $DIR/object-pointer-types.rs:23:7