]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/default.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / 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: `#[warn(incomplete_features)]` on by default
33 = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
34
35 error[E0046]: not all trait items implemented, missing: `foo`
36 --> $DIR/default.rs:22:1
37 |
38 LL | fn foo<T: Default>() -> T;
39 | -------------------------- `foo` from trait
40 ...
41 LL | impl Foo for u32 {
42 | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
43
44 error: aborting due to 4 previous errors; 1 warning emitted
45
46 Some errors have detailed explanations: E0046, E0449.
47 For more information about an error, try `rustc --explain E0046`.