rust/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr

21 lines
726 B
Plaintext
Raw Normal View History

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
|
LL | trait Foo {
| --------- this trait defines an item `foo_one`
...
2018-08-08 07:28:26 -05:00
LL | struct MyStruct;
| ----------------
| |
| method `foo_one` not found for this
2020-02-18 04:13:30 -06:00
| the method `foo_one` exists but this type doesn't satisfy the bound `MyStruct: Foo`
2018-08-08 07:28:26 -05:00
...
LL | println!("{}", MyStruct.foo_one());
| ^^^^^^^ method not found in `MyStruct`
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`.