]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/defaultimpl/validation.stderr
warn against 'specialization' feature
[rust.git] / src / test / ui / specialization / defaultimpl / validation.stderr
1 error: inherent impls cannot be `default`
2   --> $DIR/validation.rs:7:14
3    |
4 LL | default impl S {}
5    | -------      ^ inherent impl for this type
6    | |
7    | `default` because of this
8    |
9    = note: only trait implementations may be annotated with `default`
10
11 warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
12   --> $DIR/validation.rs:2:12
13    |
14 LL | #![feature(specialization)]
15    |            ^^^^^^^^^^^^^^
16    |
17    = note: `#[warn(incomplete_features)]` on by default
18    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
19
20 error: impls of auto traits cannot be default
21   --> $DIR/validation.rs:9:21
22    |
23 LL | default unsafe impl Send for S {}
24    | -------             ^^^^ auto trait
25    | |
26    | default because of this
27
28 error: impls of auto traits cannot be default
29   --> $DIR/validation.rs:10:15
30    |
31 LL | default impl !Send for Z {}
32    | -------       ^^^^ auto trait
33    | |
34    | default because of this
35
36 error[E0750]: negative impls cannot be default impls
37   --> $DIR/validation.rs:10:1
38    |
39 LL | default impl !Send for Z {}
40    | ^^^^^^^      ^
41
42 error[E0750]: negative impls cannot be default impls
43   --> $DIR/validation.rs:14:1
44    |
45 LL | default impl !Tr for S {}
46    | ^^^^^^^      ^
47
48 error: aborting due to 5 previous errors; 1 warning emitted
49
50 For more information about this error, try `rustc --explain E0750`.