Add edition 2021.

This commit is contained in:
Mara Bos 2020-12-30 14:33:46 +01:00
parent 44e3daf5ee
commit f16ef7d7ce
12 changed files with 57 additions and 28 deletions

View file

@ -481,6 +481,11 @@ impl Span {
self.edition() >= edition::Edition::Edition2018
}
#[inline]
pub fn rust_2021(&self) -> bool {
self.edition() >= edition::Edition::Edition2021
}
/// Returns the source callee.
///
/// Returns `None` if the supplied span has no expansion trace,