Add edition dependent keyword highlighting tests

This commit is contained in:
Lukas Wirth 2024-09-04 11:32:59 +02:00
parent b10dd83c2e
commit 230cd21bed
6 changed files with 326 additions and 7 deletions

View file

@ -30,6 +30,12 @@ impl Edition {
pub fn at_least_2018(self) -> bool {
self >= Edition::Edition2018
}
pub fn iter() -> impl Iterator<Item = Edition> {
[Edition::Edition2015, Edition::Edition2018, Edition::Edition2021, Edition::Edition2024]
.iter()
.copied()
}
}
#[derive(Debug)]