mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Add edition dependent keyword highlighting tests
This commit is contained in:
parent
b10dd83c2e
commit
230cd21bed
6 changed files with 326 additions and 7 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue