@@ -7,6 +7,9 @@ use std::path::Path;
77use std:: process:: Command ;
88use std:: str:: FromStr ;
99
10+ use crate :: RustEdition :: Edition2021 ;
11+ use crate :: RustEdition :: Edition2024 ;
12+
1013#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , Default , Debug ) ]
1114pub enum RustEdition {
1215 /// The default is edition 2021 because `c2rust-refactor`,
@@ -17,12 +20,12 @@ pub enum RustEdition {
1720}
1821
1922impl RustEdition {
20- pub const ALL : & [ Self ] = & [ Self :: Edition2021 , Self :: Edition2024 ] ;
23+ pub const ALL : & [ Self ] = & [ Edition2021 , Edition2024 ] ;
2124
2225 pub const fn as_str ( & self ) -> & ' static str {
2326 match self {
24- Self :: Edition2021 => "2021" ,
25- Self :: Edition2024 => "2024" ,
27+ Edition2021 => "2021" ,
28+ Edition2024 => "2024" ,
2629 }
2730 }
2831
@@ -32,9 +35,9 @@ impl RustEdition {
3235 pub const fn toolchain ( & self ) -> & ' static str {
3336 match self {
3437 // 1.70 (1.68 for syn v2.0, 1.70 for sparse registry)
35- Self :: Edition2021 => "+nightly-2023-04-15" ,
38+ Edition2021 => "+nightly-2023-04-15" ,
3639 // This doesn't really need to be pinned, but pin it for stability.
37- Self :: Edition2024 => "+nightly-2026-03-03" ,
40+ Edition2024 => "+nightly-2026-03-03" ,
3841 }
3942 }
4043}
0 commit comments