fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
5.0 KiB167 linesraw
1error: associated `static` items are not allowed
2  --> $DIR/assoc-static-semantic-fail.rs:9:5
3   |
4LL |     static IA: u8 = 0;
5   |     ^^^^^^^^^^^^^^^^^^
6
7error: associated `static` items are not allowed
8  --> $DIR/assoc-static-semantic-fail.rs:11:5
9   |
10LL |     static IB: u8;
11   |     ^^^^^^^^^^^^^^
12
13error: a static item cannot be `default`
14  --> $DIR/assoc-static-semantic-fail.rs:14:5
15   |
16LL |     default static IC: u8 = 0;
17   |     ^^^^^^^ `default` because of this
18   |
19   = note: only associated `fn`, `const`, and `type` items can be `default`
20
21error: associated `static` items are not allowed
22  --> $DIR/assoc-static-semantic-fail.rs:14:5
23   |
24LL |     default static IC: u8 = 0;
25   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27error: a static item cannot be `default`
28  --> $DIR/assoc-static-semantic-fail.rs:17:16
29   |
30LL |     pub(crate) default static ID: u8;
31   |                ^^^^^^^ `default` because of this
32   |
33   = note: only associated `fn`, `const`, and `type` items can be `default`
34
35error: associated `static` items are not allowed
36  --> $DIR/assoc-static-semantic-fail.rs:17:5
37   |
38LL |     pub(crate) default static ID: u8;
39   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
41error: associated `static` items are not allowed
42  --> $DIR/assoc-static-semantic-fail.rs:24:5
43   |
44LL |     static TA: u8 = 0;
45   |     ^^^^^^^^^^^^^^^^^^
46
47error: associated `static` items are not allowed
48  --> $DIR/assoc-static-semantic-fail.rs:26:5
49   |
50LL |     static TB: u8;
51   |     ^^^^^^^^^^^^^^
52
53error: a static item cannot be `default`
54  --> $DIR/assoc-static-semantic-fail.rs:28:5
55   |
56LL |     default static TC: u8 = 0;
57   |     ^^^^^^^ `default` because of this
58   |
59   = note: only associated `fn`, `const`, and `type` items can be `default`
60
61error: associated `static` items are not allowed
62  --> $DIR/assoc-static-semantic-fail.rs:28:5
63   |
64LL |     default static TC: u8 = 0;
65   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
67error: a static item cannot be `default`
68  --> $DIR/assoc-static-semantic-fail.rs:31:16
69   |
70LL |     pub(crate) default static TD: u8;
71   |                ^^^^^^^ `default` because of this
72   |
73   = note: only associated `fn`, `const`, and `type` items can be `default`
74
75error: associated `static` items are not allowed
76  --> $DIR/assoc-static-semantic-fail.rs:31:5
77   |
78LL |     pub(crate) default static TD: u8;
79   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
81error: associated `static` items are not allowed
82  --> $DIR/assoc-static-semantic-fail.rs:38:5
83   |
84LL |     static TA: u8 = 0;
85   |     ^^^^^^^^^^^^^^^^^^
86
87error: associated `static` items are not allowed
88  --> $DIR/assoc-static-semantic-fail.rs:40:5
89   |
90LL |     static TB: u8;
91   |     ^^^^^^^^^^^^^^
92
93error: a static item cannot be `default`
94  --> $DIR/assoc-static-semantic-fail.rs:43:5
95   |
96LL |     default static TC: u8 = 0;
97   |     ^^^^^^^ `default` because of this
98   |
99   = note: only associated `fn`, `const`, and `type` items can be `default`
100
101error: associated `static` items are not allowed
102  --> $DIR/assoc-static-semantic-fail.rs:43:5
103   |
104LL |     default static TC: u8 = 0;
105   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
106
107error: a static item cannot be `default`
108  --> $DIR/assoc-static-semantic-fail.rs:46:9
109   |
110LL |     pub default static TD: u8;
111   |         ^^^^^^^ `default` because of this
112   |
113   = note: only associated `fn`, `const`, and `type` items can be `default`
114
115error: associated `static` items are not allowed
116  --> $DIR/assoc-static-semantic-fail.rs:46:5
117   |
118LL |     pub default static TD: u8;
119   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
120
121error: associated constant in `impl` without body
122  --> $DIR/assoc-static-semantic-fail.rs:11:5
123   |
124LL |     static IB: u8;
125   |     ^^^^^^^^^^^^^-
126   |                  |
127   |                  help: provide a definition for the constant: `= <expr>;`
128
129error: associated constant in `impl` without body
130  --> $DIR/assoc-static-semantic-fail.rs:17:5
131   |
132LL |     pub(crate) default static ID: u8;
133   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
134   |                                     |
135   |                                     help: provide a definition for the constant: `= <expr>;`
136
137error[E0449]: unnecessary visibility qualifier
138  --> $DIR/assoc-static-semantic-fail.rs:31:5
139   |
140LL |     pub(crate) default static TD: u8;
141   |     ^^^^^^^^^^
142
143error: associated constant in `impl` without body
144  --> $DIR/assoc-static-semantic-fail.rs:40:5
145   |
146LL |     static TB: u8;
147   |     ^^^^^^^^^^^^^-
148   |                  |
149   |                  help: provide a definition for the constant: `= <expr>;`
150
151error: associated constant in `impl` without body
152  --> $DIR/assoc-static-semantic-fail.rs:46:5
153   |
154LL |     pub default static TD: u8;
155   |     ^^^^^^^^^^^^^^^^^^^^^^^^^-
156   |                              |
157   |                              help: provide a definition for the constant: `= <expr>;`
158
159error[E0449]: unnecessary visibility qualifier
160  --> $DIR/assoc-static-semantic-fail.rs:46:5
161   |
162LL |     pub default static TD: u8;
163   |     ^^^ `pub` not permitted here because it's implied
164
165error: aborting due to 24 previous errors
166
167For more information about this error, try `rustc --explain E0449`.