1
Fork 0

rustc_span: Remove obsolete allow_internal_unstable_backcompat_hack

This commit is contained in:
Vadim Petrochenkov 2021-02-14 18:56:21 +03:00
parent b86674e7cc
commit 0038eaee6b
2 changed files with 4 additions and 6 deletions

View file

@ -510,11 +510,10 @@ impl Span {
/// items can be used (that is, a macro marked with /// items can be used (that is, a macro marked with
/// `#[allow_internal_unstable]`). /// `#[allow_internal_unstable]`).
pub fn allows_unstable(&self, feature: Symbol) -> bool { pub fn allows_unstable(&self, feature: Symbol) -> bool {
self.ctxt().outer_expn_data().allow_internal_unstable.map_or(false, |features| { self.ctxt()
features .outer_expn_data()
.iter() .allow_internal_unstable
.any(|&f| f == feature || f == sym::allow_internal_unstable_backcompat_hack) .map_or(false, |features| features.iter().any(|&f| f == feature))
})
} }
/// Checks if this span arises from a compiler desugaring of kind `kind`. /// Checks if this span arises from a compiler desugaring of kind `kind`.

View file

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