Add edition 2021.
This commit is contained in:
parent
44e3daf5ee
commit
f16ef7d7ce
12 changed files with 57 additions and 28 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue