From 27ea11eda820a8bb5b552c4fb37668bcec2df914 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Tue, 11 Nov 2014 20:22:41 -0500 Subject: librustc: Allow linkage attribute on any statics, not just foreign statics. --- src/libsyntax/feature_gate.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index c38fea9b3d5..98c49c00205 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -181,6 +181,10 @@ impl<'a, 'v> Visitor<'v> for Context<'a> { "`#[thread_local]` is an experimental feature, and does not \ currently handle destructors. There is no corresponding \ `#[task_local]` mapping to the task model"); + } else if attr.name().equiv(&("linkage")) { + self.gate_feature("linkage", i.span, + "the `linkage` attribute is experimental \ + and not portable across platforms") } } match i.node { -- cgit 1.4.1-3-g733a5