fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
882 B24 linesraw
1error[E0599]: no method named `foo_one` found for struct `MyStruct` in the current scope
2  --> $DIR/specialization-trait-not-implemented.rs:22:29
3   |
4LL | struct MyStruct;
5   | ----------------
6   | |
7   | method `foo_one` not found for this
8   | doesn't satisfy `MyStruct: Foo`
9...
10LL |     println!("{}", MyStruct.foo_one());
11   |                             ^^^^^^^ method not found in `MyStruct`
12   |
13   = note: the method `foo_one` exists but the following trait bounds were not satisfied:
14           `MyStruct: Foo`
15   = help: items from traits can only be used if the trait is implemented and in scope
16note: `Foo` defines an item `foo_one`, perhaps you need to implement it
17  --> $DIR/specialization-trait-not-implemented.rs:7:1
18   |
19LL | trait Foo {
20   | ^^^^^^^^^
21
22error: aborting due to previous error
23
24For more information about this error, try `rustc --explain E0599`.