]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/assoc-static-semantic-fail.rs
1 // Semantically, we do not allow e.g., `static X: u8 = 0;` as an associated item.
3 #![feature(specialization)]
4 //~^ WARN the feature `specialization` is incomplete
11 //~^ ERROR associated `static` items are not allowed
13 //~^ ERROR associated `static` items are not allowed
14 //~| ERROR associated constant in `impl` without body
15 default static IC
: u8 = 0;
16 //~^ ERROR associated `static` items are not allowed
17 //~| ERROR a static item cannot be `default`
18 pub(crate) default static ID
: u8;
19 //~^ ERROR associated `static` items are not allowed
20 //~| ERROR associated constant in `impl` without body
21 //~| ERROR a static item cannot be `default`
26 //~^ ERROR associated `static` items are not allowed
28 //~^ ERROR associated `static` items are not allowed
29 default static TC
: u8 = 0;
30 //~^ ERROR associated `static` items are not allowed
31 //~| ERROR a static item cannot be `default`
32 pub(crate) default static TD
: u8;
33 //~^ ERROR associated `static` items are not allowed
34 //~| ERROR unnecessary visibility qualifier
35 //~| ERROR a static item cannot be `default`
40 //~^ ERROR associated `static` items are not allowed
42 //~^ ERROR associated `static` items are not allowed
43 //~| ERROR associated constant in `impl` without body
44 default static TC
: u8 = 0;
45 //~^ ERROR associated `static` items are not allowed
46 //~| ERROR a static item cannot be `default`
47 pub default static TD
: u8;
48 //~^ ERROR associated `static` items are not allowed
49 //~| ERROR associated constant in `impl` without body
50 //~| ERROR unnecessary visibility qualifier
51 //~| ERROR a static item cannot be `default`