@@ -202,6 +202,16 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
202
202
"no_std is experimental" ) ) ,
203
203
( "lang" , Gated ( "lang_items" ,
204
204
"language items are subject to change" ) ) ,
205
+ ( "rustc_on_unimplemented" , Gated ( "on_unimplemented" ,
206
+ "the `#[rustc_on_unimplemented]` attribute \
207
+ is an experimental feature") ) ,
208
+ ( "linkage" , Gated ( "linkage" ,
209
+ "the `linkage` attribute is experimental \
210
+ and not portable across platforms") ) ,
211
+ ( "thread_local" , Gated ( "thread_local" ,
212
+ "`#[thread_local]` is an experimental feature, and does not \
213
+ currently handle destructors. There is no corresponding \
214
+ `#[task_local]` mapping to the task model") ) ,
205
215
206
216
// FIXME: #14408 whitelist docs since rustdoc looks at them
207
217
( "doc" , Whitelisted ) ,
@@ -214,14 +224,12 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
214
224
( "link" , Whitelisted ) ,
215
225
( "link_name" , Whitelisted ) ,
216
226
( "link_section" , Whitelisted ) ,
217
- ( "linkage" , Whitelisted ) ,
218
227
( "no_builtins" , Whitelisted ) ,
219
228
( "no_mangle" , Whitelisted ) ,
220
229
( "no_split_stack" , Whitelisted ) ,
221
230
( "no_stack_check" , Whitelisted ) ,
222
231
( "packed" , Whitelisted ) ,
223
232
( "static_assert" , Whitelisted ) ,
224
- ( "thread_local" , Whitelisted ) ,
225
233
( "no_debug" , Whitelisted ) ,
226
234
( "omit_gdb_pretty_printer_section" , Whitelisted ) ,
227
235
( "unsafe_no_drop_flag" , Whitelisted ) ,
@@ -235,7 +243,6 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
235
243
( "must_use" , Whitelisted ) ,
236
244
( "stable" , Whitelisted ) ,
237
245
( "unstable" , Whitelisted ) ,
238
- ( "rustc_on_unimplemented" , Whitelisted ) ,
239
246
( "rustc_error" , Whitelisted ) ,
240
247
241
248
// FIXME: #19470 this shouldn't be needed forever
@@ -395,22 +402,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
395
402
}
396
403
397
404
fn visit_item ( & mut self , i : & ast:: Item ) {
398
- for attr in & i. attrs {
399
- if attr. name ( ) == "thread_local" {
400
- self . gate_feature ( "thread_local" , i. span ,
401
- "`#[thread_local]` is an experimental feature, and does not \
402
- currently handle destructors. There is no corresponding \
403
- `#[task_local]` mapping to the task model") ;
404
- } else if attr. name ( ) == "linkage" {
405
- self . gate_feature ( "linkage" , i. span ,
406
- "the `linkage` attribute is experimental \
407
- and not portable across platforms")
408
- } else if attr. name ( ) == "rustc_on_unimplemented" {
409
- self . gate_feature ( "on_unimplemented" , i. span ,
410
- "the `#[rustc_on_unimplemented]` attribute \
411
- is an experimental feature")
412
- }
413
- }
414
405
match i. node {
415
406
ast:: ItemExternCrate ( _) => {
416
407
if attr:: contains_name ( & i. attrs [ ] , "macro_reexport" ) {
@@ -592,7 +583,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
592
583
}
593
584
return ;
594
585
}
595
-
596
586
}
597
587
self . gate_feature ( "custom_attribute" , attr. span ,
598
588
format ! ( "The attribute `{}` is currently \
0 commit comments