Skip to content

Commit 27e01a1

Browse files
committed
syntax: disable the new early feature-gatings added in rust-lang#65742.
1 parent 803616a commit 27e01a1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/libsyntax/feature_gate/check.rs

+15
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,21 @@ pub fn check_crate(krate: &ast::Crate,
876876
gate_all!(yields, generators, "yield syntax is experimental");
877877
gate_all!(or_patterns, "or-patterns syntax is experimental");
878878
gate_all!(const_extern_fn, "`const extern fn` definitions are unstable");
879+
880+
// All uses of `gate_all!` below this point were added in #65742,
881+
// and subsequently disabled (with the non-early gating readded).
882+
macro_rules! gate_all {
883+
($gate:ident, $msg:literal) => {
884+
// FIXME(eddyb) do something more useful than always
885+
// disabling these uses of early feature-gatings.
886+
if false {
887+
for span in &*parse_sess.gated_spans.$gate.borrow() {
888+
gate_feature!(&visitor, $gate, *span, $msg);
889+
}
890+
}
891+
}
892+
}
893+
879894
gate_all!(trait_alias, "trait aliases are experimental");
880895
gate_all!(associated_type_bounds, "associated type bounds are unstable");
881896
gate_all!(crate_visibility_modifier, "`crate` visibility modifier is experimental");

0 commit comments

Comments
 (0)