diff options
| author | bors <bors@rust-lang.org> | 2017-07-10 15:39:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-07-10 15:39:47 +0000 |
| commit | eb9dfb8bd9444d01fc129bfaac180b913299486b (patch) | |
| tree | 3e320dced01e40a8061215b19cd8eb4de0445196 /src/libsyntax | |
| parent | d84693b93dae3958e3504f817face0184c5c3fdd (diff) | |
| parent | c512dea1ed4d97792c831eb2d8ec4725e32ac14d (diff) | |
| download | rust-eb9dfb8bd9444d01fc129bfaac180b913299486b.tar.gz rust-eb9dfb8bd9444d01fc129bfaac180b913299486b.zip | |
Auto merge of #43109 - pnkfelix:fix-link_args-gate, r=nikomatsakis
Fix feature gate for `#[link_args(..)]` attribute Fix feature gate for `#[link_args(..)]` attribute so that it will fire regardless of context of attribute. See also #29596 and #43106
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 9adba7f50cc..448f95c93a0 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -551,7 +551,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG ("ignore", Normal, Ungated), ("no_implicit_prelude", Normal, Ungated), ("reexport_test_harness_main", Normal, Ungated), - ("link_args", Normal, Ungated), + ("link_args", Normal, Gated(Stability::Unstable, + "link_args", + "the `link_args` attribute is experimental and not \ + portable across platforms, it is recommended to \ + use `#[link(name = \"foo\")] instead", + cfg_fn!(link_args))), ("macro_escape", Normal, Ungated), // RFC #1445. @@ -1184,12 +1189,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } ast::ItemKind::ForeignMod(ref foreign_module) => { - if attr::contains_name(&i.attrs[..], "link_args") { - gate_feature_post!(&self, link_args, i.span, - "the `link_args` attribute is not portable \ - across platforms, it is recommended to \ - use `#[link(name = \"foo\")]` instead") - } self.check_abi(foreign_module.abi, i.span); } |
