diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 7 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index fd6cae1e1b6..4138acafac6 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -400,12 +400,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { &self.cx.ecfg.features.unwrap()); } - if path.segments.len() > 1 || path.global || !path.segments[0].parameters.is_empty() { - self.cx.span_err(path.span, "expected macro name without module separators"); - return kind.dummy(span); - } - - let extname = path.segments[0].identifier.name; + let extname = path.segments.last().unwrap().identifier.name; let ident = ident.unwrap_or(keywords::Invalid.ident()); let marked_tts = mark_tts(&tts, mark); let opt_expanded = match *ext { diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 52374f232de..29854260899 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -312,6 +312,9 @@ declare_features! ( // Allows `break {expr}` with a value inside `loop`s. (active, loop_break_value, "1.14.0", Some(37339)), + + // Allows #[target_feature(...)] + (active, target_feature, "1.15.0", None), ); declare_features! ( @@ -663,6 +666,10 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG "the `#[naked]` attribute \ is an experimental feature", cfg_fn!(naked_functions))), + ("target_feature", Whitelisted, Gated( + Stability::Unstable, "target_feature", + "the `#[target_feature]` attribute is an experimental feature", + cfg_fn!(target_feature))), ("export_name", Whitelisted, Ungated), ("inline", Whitelisted, Ungated), ("link", Whitelisted, Ungated), @@ -737,6 +744,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG ("no_main", CrateLevel, Ungated), ("no_builtins", CrateLevel, Ungated), ("recursion_limit", CrateLevel, Ungated), + ("type_length_limit", CrateLevel, Ungated), ]; // cfg(...)'s that are feature gated diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 7a9347ded12..3e8dfda4a9a 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -32,10 +32,8 @@ #![feature(staged_api)] #![feature(str_escape)] #![feature(unicode)] -#![cfg_attr(stage0, feature(question_mark))] #![feature(rustc_diagnostic_macros)] #![feature(specialization)] -#![cfg_attr(stage0, feature(dotdot_in_tuple_patterns))] extern crate core; extern crate serialize; |
