diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-03 13:57:03 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-11 15:08:17 +0100 |
| commit | 33bf81eec018ec717bffc4468faf8d2a3bde1892 (patch) | |
| tree | da20ccfafa6310898226f49b7b8c5844a47ea831 /src/libsyntax_pos | |
| parent | d3c212c5527f901fcb44d59d031695248762c340 (diff) | |
| download | rust-33bf81eec018ec717bffc4468faf8d2a3bde1892.tar.gz rust-33bf81eec018ec717bffc4468faf8d2a3bde1892.zip | |
Ease the transition to requiring features by just warning if there's no feature list
while we could make this change (it's all unstable after all), there are crates.io crates that use the feature and that the compiler depends upon. We can instead roll out this feature while still supporting the old way.
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index efb21e06f34..87c4d02fa4f 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -387,7 +387,10 @@ impl Span { /// `#[allow_internal_unstable]`). pub fn allows_unstable(&self, feature: &str) -> bool { match self.ctxt().outer().expn_info() { - Some(info) => info.allow_internal_unstable.iter().any(|&f| f == feature), + Some(info) => info + .allow_internal_unstable + .iter() + .any(|&f| f == feature || f == "allow_internal_unstable_backcompat_hack"), None => false, } } |
