1
Fork 0

Rollup merge of #82107 - petrochenkov:minexpclean, r=Aaron1011

expand: Some cleanup

See individual commits for details.

r? ``@Aaron1011``
This commit is contained in:
Jonas Schievink 2021-02-15 16:07:04 +01:00 committed by GitHub
commit 285ea2f80d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 39 deletions

View file

@ -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`.

View file

@ -252,7 +252,6 @@ symbols! {
allow_fail,
allow_internal_unsafe,
allow_internal_unstable,
allow_internal_unstable_backcompat_hack,
allowed,
always,
and,