diff options
| author | bors <bors@rust-lang.org> | 2019-04-26 01:51:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-04-26 01:51:05 +0000 |
| commit | 180edc21eeca50d0d597de091c8eb712667b5dd2 (patch) | |
| tree | 9de980a6d79928bd00a4004d5587c6dc7582bbec /src/libsyntax | |
| parent | 3991285f55a4b7cd92b7ffcdc396a3023076f5cb (diff) | |
| parent | a133caab36b311a6c0812336698c817450184283 (diff) | |
| download | rust-180edc21eeca50d0d597de091c8eb712667b5dd2.tar.gz rust-180edc21eeca50d0d597de091c8eb712667b5dd2.zip | |
Auto merge of #60296 - Centril:rollup-qh9la7k, r=Centril
Rollup of 12 pull requests
Successful merges:
- #59734 (Prevent failure in case no space left on device in rustdoc)
- #59940 (Set cfg(test) when rustdoc is running with --test option)
- #60134 (Fix index-page generation)
- #60165 (Add Pin::{into_inner,into_inner_unchecked})
- #60183 (Chalkify: Add builtin Copy/Clone)
- #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.)
- #60247 (Implement Debug for Place using Place::iterate)
- #60259 (Derive Default instead of new in applicable lint)
- #60267 (Add feature-gate for f16c target feature)
- #60284 (Do not allow const generics to depend on type parameters)
- #60285 (Do not ICE when checking types against foreign fn)
- #60289 (Make `-Z allow-features` work for stdlib features)
Failed merges:
r? @ghost
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index ba567a123ae..98952ad918c 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -403,6 +403,7 @@ declare_features! ( (active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None), (active, movbe_target_feature, "1.34.0", Some(44839), None), (active, rtm_target_feature, "1.35.0", Some(44839), None), + (active, f16c_target_feature, "1.36.0", Some(44839), None), // Allows macro invocations on modules expressions and statements and // procedural macros to expand to non-items. @@ -2258,32 +2259,32 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], continue; } - if let Some((.., set)) = ACTIVE_FEATURES.iter().find(|f| name == f.0) { - if let Some(allowed) = allow_features.as_ref() { - if allowed.iter().find(|f| *f == name.as_str()).is_none() { - span_err!(span_handler, mi.span(), E0725, - "the feature `{}` is not in the list of allowed features", - name); - continue; - } - } - - set(&mut features, mi.span()); - features.declared_lang_features.push((name, mi.span(), None)); - continue - } - let removed = REMOVED_FEATURES.iter().find(|f| name == f.0); let stable_removed = STABLE_REMOVED_FEATURES.iter().find(|f| name == f.0); if let Some((.., reason)) = removed.or(stable_removed) { feature_removed(span_handler, mi.span(), *reason); - continue + continue; } if let Some((_, since, ..)) = ACCEPTED_FEATURES.iter().find(|f| name == f.0) { let since = Some(Symbol::intern(since)); features.declared_lang_features.push((name, mi.span(), since)); - continue + continue; + } + + if let Some(allowed) = allow_features.as_ref() { + if allowed.iter().find(|f| *f == name.as_str()).is_none() { + span_err!(span_handler, mi.span(), E0725, + "the feature `{}` is not in the list of allowed features", + name); + continue; + } + } + + if let Some((.., set)) = ACTIVE_FEATURES.iter().find(|f| name == f.0) { + set(&mut features, mi.span()); + features.declared_lang_features.push((name, mi.span(), None)); + continue; } features.declared_lib_features.push((name, mi.span())); |
