fork/rust

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

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

master
1.6 KiB50 linesraw
1error: `default` is not followed by an item
2  --> $DIR/default.rs:23:5
3   |
4LL |     default pub fn foo<T: Default>() -> T { T::default() }
5   |     ^^^^^^^ the `default` qualifier
6   |
7   = note: only `fn`, `const`, `type`, or `impl` items may be prefixed by `default`
8
9error: non-item in item list
10  --> $DIR/default.rs:23:13
11   |
12LL | impl Foo for u32 {
13   |                  - item list starts here
14LL |     default pub fn foo<T: Default>() -> T { T::default() }
15   |             ^^^ non-item starts here
16...
17LL | }
18   | - item list ends here
19
20error[E0449]: visibility qualifiers are not permitted here
21  --> $DIR/default.rs:17:5
22   |
23LL |     pub default fn foo<T: Default>() -> T {
24   |     ^^^
25   |
26   = note: trait items always share the visibility of their trait
27
28warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
29  --> $DIR/default.rs:3:12
30   |
31LL | #![feature(specialization)]
32   |            ^^^^^^^^^^^^^^
33   |
34   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
35   = help: consider using `min_specialization` instead, which is more stable and complete
36   = note: `#[warn(incomplete_features)]` on by default
37
38error[E0046]: not all trait items implemented, missing: `foo`
39  --> $DIR/default.rs:22:1
40   |
41LL |     fn foo<T: Default>() -> T;
42   |     -------------------------- `foo` from trait
43...
44LL | impl Foo for u32 {
45   | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
46
47error: aborting due to 4 previous errors; 1 warning emitted
48
49Some errors have detailed explanations: E0046, E0449.
50For more information about an error, try `rustc --explain E0046`.