mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
internal: Render root syntax contexts more clearly
This commit is contained in:
parent
c28b80c321
commit
a06aadb9f0
8 changed files with 177 additions and 164 deletions
|
|
@ -41,6 +41,15 @@ impl Edition {
|
|||
self >= Edition::Edition2018
|
||||
}
|
||||
|
||||
pub fn number(&self) -> usize {
|
||||
match self {
|
||||
Edition::Edition2015 => 2015,
|
||||
Edition::Edition2018 => 2018,
|
||||
Edition::Edition2021 => 2021,
|
||||
Edition::Edition2024 => 2024,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iter() -> impl Iterator<Item = Edition> {
|
||||
[Edition::Edition2015, Edition::Edition2018, Edition::Edition2021, Edition::Edition2024]
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue