diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2021-02-15 16:07:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-15 16:07:04 +0100 |
| commit | 285ea2f80d8e97a71c3d84c80b359590dfaef473 (patch) | |
| tree | c80aa8a6b02469dcbb7aba5a310e8f6c533b114a /compiler/rustc_span | |
| parent | 40d85a5f7d102d0ffba6abb5ca22df47e8778d7d (diff) | |
| parent | 6e11a8b66a5e390f94e6d96b652e25e31fafc0c0 (diff) | |
| download | rust-285ea2f80d8e97a71c3d84c80b359590dfaef473.tar.gz rust-285ea2f80d8e97a71c3d84c80b359590dfaef473.zip | |
Rollup merge of #82107 - petrochenkov:minexpclean, r=Aaron1011
expand: Some cleanup See individual commits for details. r? ``@Aaron1011``
Diffstat (limited to 'compiler/rustc_span')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 79c5c7f110c..4b03d38ccba 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -510,11 +510,10 @@ impl Span { /// items can be used (that is, a macro marked with /// `#[allow_internal_unstable]`). pub fn allows_unstable(&self, feature: Symbol) -> bool { - self.ctxt().outer_expn_data().allow_internal_unstable.map_or(false, |features| { - features - .iter() - .any(|&f| f == feature || f == sym::allow_internal_unstable_backcompat_hack) - }) + self.ctxt() + .outer_expn_data() + .allow_internal_unstable + .map_or(false, |features| features.iter().any(|&f| f == feature)) } /// Checks if this span arises from a compiler desugaring of kind `kind`. diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index ef062da3f6e..8c90eeb7f3f 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -252,7 +252,6 @@ symbols! { allow_fail, allow_internal_unsafe, allow_internal_unstable, - allow_internal_unstable_backcompat_hack, allowed, always, and, |
