fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB30 linesraw
1error[E0046]: not all trait items implemented, missing: `foo`
2  --> $DIR/missing-feature-flag.rs:12:1
3   |
4LL |     async fn foo(_: T) -> &'static str;
5   |     ----------------------------------- `foo` from trait
6...
7LL | impl<T> MyTrait<T> for MyStruct {}
8   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
9
10error[E0308]: mismatched types
11  --> $DIR/missing-feature-flag.rs:16:42
12   |
13LL |     async fn foo(_: i32) -> &'static str {}
14   |                                          ^^ expected `&str`, found `()`
15
16error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
17  --> $DIR/missing-feature-flag.rs:16:5
18   |
19LL | impl<T> MyTrait<T> for MyStruct {}
20   | ------------------------------- parent `impl` is here
21...
22LL |     async fn foo(_: i32) -> &'static str {}
23   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
24   |
25   = note: to specialize, `foo` in the parent `impl` must be marked `default`
26
27error: aborting due to 3 previous errors
28
29Some errors have detailed explanations: E0046, E0308, E0520.
30For more information about an error, try `rustc --explain E0046`.