Skip to content

Commit

Permalink
syntax: disable the new early feature-gatings added in rust-lang#65742.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Oct 31, 2019
1 parent 803616a commit 27e01a1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/libsyntax/feature_gate/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,21 @@ pub fn check_crate(krate: &ast::Crate,
gate_all!(yields, generators, "yield syntax is experimental");
gate_all!(or_patterns, "or-patterns syntax is experimental");
gate_all!(const_extern_fn, "`const extern fn` definitions are unstable");

// All uses of `gate_all!` below this point were added in #65742,
// and subsequently disabled (with the non-early gating readded).
macro_rules! gate_all {
($gate:ident, $msg:literal) => {
// FIXME(eddyb) do something more useful than always
// disabling these uses of early feature-gatings.
if false {
for span in &*parse_sess.gated_spans.$gate.borrow() {
gate_feature!(&visitor, $gate, *span, $msg);
}
}
}
}

gate_all!(trait_alias, "trait aliases are experimental");
gate_all!(associated_type_bounds, "associated type bounds are unstable");
gate_all!(crate_visibility_modifier, "`crate` visibility modifier is experimental");
Expand Down

0 comments on commit 27e01a1

Please sign in to comment.