]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/trait-upcasting/subtrait-method.stderr
4b0765cdb82354c70a85f32ee001dfdc955aa839
[rust.git] / src / test / ui / traits / trait-upcasting / subtrait-method.stderr
1 error[E0599]: no method named `c` found for reference `&dyn Bar` in the current scope
2   --> $DIR/subtrait-method.rs:37:9
3    |
4 LL |     bar.c();
5    |         ^ help: there is an associated function with a similar name: `a`
6    |
7    = help: items from traits can only be used if the trait is implemented and in scope
8 note: `Baz` defines an item `c`, perhaps you need to implement it
9   --> $DIR/subtrait-method.rs:17:1
10    |
11 LL | trait Baz: Bar {
12    | ^^^^^^^^^^^^^^
13
14 error[E0599]: no method named `b` found for reference `&dyn Foo` in the current scope
15   --> $DIR/subtrait-method.rs:41:9
16    |
17 LL |     foo.b();
18    |         ^ help: there is an associated function with a similar name: `a`
19    |
20    = help: items from traits can only be used if the trait is implemented and in scope
21 note: `Bar` defines an item `b`, perhaps you need to implement it
22   --> $DIR/subtrait-method.rs:11:1
23    |
24 LL | trait Bar: Foo {
25    | ^^^^^^^^^^^^^^
26
27 error[E0599]: no method named `c` found for reference `&dyn Foo` in the current scope
28   --> $DIR/subtrait-method.rs:43:9
29    |
30 LL |     foo.c();
31    |         ^ help: there is an associated function with a similar name: `a`
32    |
33    = help: items from traits can only be used if the trait is implemented and in scope
34 note: `Baz` defines an item `c`, perhaps you need to implement it
35   --> $DIR/subtrait-method.rs:17:1
36    |
37 LL | trait Baz: Bar {
38    | ^^^^^^^^^^^^^^
39
40 error[E0599]: no method named `b` found for reference `&dyn Foo` in the current scope
41   --> $DIR/subtrait-method.rs:47:9
42    |
43 LL |     foo.b();
44    |         ^ help: there is an associated function with a similar name: `a`
45    |
46    = help: items from traits can only be used if the trait is implemented and in scope
47 note: `Bar` defines an item `b`, perhaps you need to implement it
48   --> $DIR/subtrait-method.rs:11:1
49    |
50 LL | trait Bar: Foo {
51    | ^^^^^^^^^^^^^^
52
53 error[E0599]: no method named `c` found for reference `&dyn Foo` in the current scope
54   --> $DIR/subtrait-method.rs:49:9
55    |
56 LL |     foo.c();
57    |         ^ help: there is an associated function with a similar name: `a`
58    |
59    = help: items from traits can only be used if the trait is implemented and in scope
60 note: `Baz` defines an item `c`, perhaps you need to implement it
61   --> $DIR/subtrait-method.rs:17:1
62    |
63 LL | trait Baz: Bar {
64    | ^^^^^^^^^^^^^^
65
66 error: aborting due to 5 previous errors
67
68 For more information about this error, try `rustc --explain E0599`.