diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-10-31 19:34:06 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-10-31 19:34:06 +0200 |
| commit | 27e01a1f8876eda98e82d599136ca3a953f6b3fb (patch) | |
| tree | bc0f75acb3d06fc2119e6866fc67dbc22f8bd2f6 /src/libsyntax | |
| parent | 803616a73d25adbb40c604eb93d9c8689b2164e4 (diff) | |
| download | rust-27e01a1f8876eda98e82d599136ca3a953f6b3fb.tar.gz rust-27e01a1f8876eda98e82d599136ca3a953f6b3fb.zip | |
syntax: disable the new early feature-gatings added in #65742.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate/check.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs index 482605971b8..13a24ca046d 100644 --- a/src/libsyntax/feature_gate/check.rs +++ b/src/libsyntax/feature_gate/check.rs @@ -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"); |
