]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/default.stderr
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / ui / parser / default.stderr
1 error: `default` is not followed by an item
2   --> $DIR/default.rs:23:5
3    |
4 LL |     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
9 error: non-item in item list
10   --> $DIR/default.rs:23:13
11    |
12 LL | impl Foo for u32 {
13    |                  - item list starts here
14 LL |     default pub fn foo<T: Default>() -> T { T::default() }
15    |             ^^^ non-item starts here
16 ...
17 LL | }
18    | - item list ends here
19
20 error[E0449]: unnecessary visibility qualifier
21   --> $DIR/default.rs:17:5
22    |
23 LL |     pub default fn foo<T: Default>() -> T {
24    |     ^^^ `pub` not permitted here because it's implied
25
26 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
27   --> $DIR/default.rs:3:12
28    |
29 LL | #![feature(specialization)]
30    |            ^^^^^^^^^^^^^^
31    |
32    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
33    = help: consider using `min_specialization` instead, which is more stable and complete
34    = note: `#[warn(incomplete_features)]` on by default
35
36 error[E0046]: not all trait items implemented, missing: `foo`
37   --> $DIR/default.rs:22:1
38    |
39 LL |     fn foo<T: Default>() -> T;
40    |     -------------------------- `foo` from trait
41 ...
42 LL | impl Foo for u32 {
43    | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
44
45 error: aborting due to 4 previous errors; 1 warning emitted
46
47 Some errors have detailed explanations: E0046, E0449.
48 For more information about an error, try `rustc --explain E0046`.