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

@ -1076,6 +1076,11 @@ impl Session {
self.opts.edition >= Edition::Edition2018
}
/// Are we allowed to use features from the Rust 2021 edition?
pub fn rust_2021(&self) -> bool {
self.opts.edition >= Edition::Edition2021
}
pub fn edition(&self) -> Edition {
self.opts.edition
}