]> git.lizzy.rs Git - rust.git/blob - src/test/ui/object-pointer-types.stderr
On single local candidate, use span label
[rust.git] / src / test / ui / object-pointer-types.stderr
1 error[E0599]: no method named `owned` found for reference `&dyn Foo` in the current scope
2   --> $DIR/object-pointer-types.rs:11:7
3    |
4 LL | trait Foo {
5    | --------- this trait defines an item `owned`
6 ...
7 LL |     x.owned();
8    |       ^^^^^ method not found in `&dyn Foo`
9    |
10    = help: items from traits can only be used if the trait is implemented and in scope
11
12 error[E0599]: no method named `owned` found for mutable reference `&mut dyn Foo` in the current scope
13   --> $DIR/object-pointer-types.rs:17:7
14    |
15 LL | trait Foo {
16    | --------- this trait defines an item `owned`
17 ...
18 LL |     x.owned();
19    |       ^^^^^ method not found in `&mut dyn Foo`
20    |
21    = help: items from traits can only be used if the trait is implemented and in scope
22
23 error[E0599]: no method named `managed` found for struct `std::boxed::Box<(dyn Foo + 'static)>` in the current scope
24   --> $DIR/object-pointer-types.rs:23:7
25    |
26 LL |     x.managed();
27    |       ^^^^^^^ method not found in `std::boxed::Box<(dyn Foo + 'static)>`
28
29 error: aborting due to 3 previous errors
30
31 For more information about this error, try `rustc --explain E0599`.