2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no method named `foo_one` found for struct `MyStruct` in the current scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/specialization-trait-not-implemented.rs:22:29
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2020-02-18 03:35:18 -06:00
|
|
|
LL | trait Foo {
|
2020-02-18 20:36:56 -06:00
|
|
|
| --------- `Foo` defines an item `foo_one`, perhaps you need to implement it
|
2020-02-18 03:35:18 -06:00
|
|
|
...
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | struct MyStruct;
|
2020-02-18 01:22:19 -06:00
|
|
|
| ----------------
|
|
|
|
| |
|
|
|
|
| method `foo_one` not found for this
|
2020-02-18 18:35:47 -06:00
|
|
|
| doesn't satisfy `MyStruct: Foo`
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
|
|
|
LL | println!("{}", MyStruct.foo_one());
|
2019-09-06 14:00:07 -05:00
|
|
|
| ^^^^^^^ method not found in `MyStruct`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2020-02-18 18:35:47 -06:00
|
|
|
= note: the method `foo_one` exists but the following trait bounds were not satisfied:
|
|
|
|
`MyStruct: Foo`
|
2018-08-08 07:28:26 -05:00
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|