Skip to content

Commit ca5d770

Browse files
committed
---
yaml --- r: 181759 b: refs/heads/master c: 0112f3b h: refs/heads/master i: 181757: c2a123d 181755: 98d7aa9 181751: 2f03305 181743: 2d24e48 181727: 758881b 181695: 7654a82 181631: 8801eab 181503: 56716d8 181247: 1694b81 v: v3
1 parent 367f418 commit ca5d770

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 5ffb7db42307226503242dececdcfd7c52063d7c
2+
refs/heads/master: 0112f3b09834d8cc02489ec460c92dc2b25f4371
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3cf3483ffd586b3042fda31c66d5afad7415e715
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/src/libsyntax/feature_gate.rs

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
202202
"no_std is experimental")),
203203
("lang", Gated("lang_items",
204204
"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")),
205215

206216
// FIXME: #14408 whitelist docs since rustdoc looks at them
207217
("doc", Whitelisted),
@@ -214,14 +224,12 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
214224
("link", Whitelisted),
215225
("link_name", Whitelisted),
216226
("link_section", Whitelisted),
217-
("linkage", Whitelisted),
218227
("no_builtins", Whitelisted),
219228
("no_mangle", Whitelisted),
220229
("no_split_stack", Whitelisted),
221230
("no_stack_check", Whitelisted),
222231
("packed", Whitelisted),
223232
("static_assert", Whitelisted),
224-
("thread_local", Whitelisted),
225233
("no_debug", Whitelisted),
226234
("omit_gdb_pretty_printer_section", Whitelisted),
227235
("unsafe_no_drop_flag", Whitelisted),
@@ -235,7 +243,6 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
235243
("must_use", Whitelisted),
236244
("stable", Whitelisted),
237245
("unstable", Whitelisted),
238-
("rustc_on_unimplemented", Whitelisted),
239246
("rustc_error", Whitelisted),
240247

241248
// FIXME: #19470 this shouldn't be needed forever
@@ -395,22 +402,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
395402
}
396403

397404
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-
}
414405
match i.node {
415406
ast::ItemExternCrate(_) => {
416407
if attr::contains_name(&i.attrs[], "macro_reexport") {
@@ -592,7 +583,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
592583
}
593584
return;
594585
}
595-
596586
}
597587
self.gate_feature("custom_attribute", attr.span,
598588
format!("The attribute `{}` is currently \

0 commit comments

Comments
 (0)