]> git.lizzy.rs Git - rust.git/blob - tests/ui/object-pointer-types.stderr
Account for method call and indexing when looking for inner-most path in expression
[rust.git] / tests / 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 |     fn owned(self: Box<Self>);
5    |                    --------- the method might not be found because of this arbitrary self type
6 ...
7 LL |     x.owned();
8    |       ^^^^^ method not found in `&dyn Foo`
9
10 error[E0599]: no method named `owned` found for mutable reference `&mut dyn Foo` in the current scope
11   --> $DIR/object-pointer-types.rs:17:7
12    |
13 LL |     fn owned(self: Box<Self>);
14    |                    --------- the method might not be found because of this arbitrary self type
15 ...
16 LL |     x.owned();
17    |       ^^^^^ method not found in `&mut dyn Foo`
18
19 error[E0599]: no method named `managed` found for struct `Box<(dyn Foo + 'static)>` in the current scope
20   --> $DIR/object-pointer-types.rs:23:7
21    |
22 LL |     x.managed();
23    |       ^^^^^^^ method not found in `Box<(dyn Foo + 'static)>`
24
25 error: aborting due to 3 previous errors
26
27 For more information about this error, try `rustc --explain E0599`.