@@ -12,17 +12,17 @@ pub enum RustEdition {
1212 /// The default is edition 2021 because `c2rust-refactor`,
1313 /// based on `nightly-2022-08-08`, only understands up to edition 2021.
1414 #[ default]
15- Rust2021 ,
16- Rust2024 ,
15+ Edition2021 ,
16+ Edition2024 ,
1717}
1818
1919impl RustEdition {
20- pub const ALL : & [ Self ] = & [ Self :: Rust2021 , Self :: Rust2024 ] ;
20+ pub const ALL : & [ Self ] = & [ Self :: Edition2021 , Self :: Edition2024 ] ;
2121
2222 pub const fn as_str ( & self ) -> & ' static str {
2323 match self {
24- Self :: Rust2021 => "2021" ,
25- Self :: Rust2024 => "2024" ,
24+ Self :: Edition2021 => "2021" ,
25+ Self :: Edition2024 => "2024" ,
2626 }
2727 }
2828
@@ -32,9 +32,9 @@ impl RustEdition {
3232 pub const fn toolchain ( & self ) -> & ' static str {
3333 match self {
3434 // 1.70 (1.68 for syn v2.0, 1.70 for sparse registry)
35- Self :: Rust2021 => "+nightly-2023-04-15" ,
35+ Self :: Edition2021 => "+nightly-2023-04-15" ,
3636 // This doesn't really need to be pinned, but pin it for stability.
37- Self :: Rust2024 => "+nightly-2026-03-03" ,
37+ Self :: Edition2024 => "+nightly-2026-03-03" ,
3838 }
3939 }
4040}
@@ -49,7 +49,7 @@ impl FromStr for RustEdition {
4949 type Err = String ;
5050
5151 fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
52- let choices = [ Self :: Rust2021 , Self :: Rust2024 ] ;
52+ let choices = [ Self :: Edition2021 , Self :: Edition2024 ] ;
5353 choices
5454 . into_iter ( )
5555 . find ( |choice| choice. as_str ( ) == s)
0 commit comments