-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add style_edition 2027 #6324
Add style_edition 2027 #6324
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,9 @@ macro_rules! style_edition_default { | |
$crate::config::StyleEdition::Edition2015 | ||
| $crate::config::StyleEdition::Edition2018 | ||
| $crate::config::StyleEdition::Edition2021 => $default_2015, | ||
$crate::config::StyleEdition::Edition2024 => $default_2024, | ||
// TODO: should update macro when default_2027 becomes available | ||
$crate::config::StyleEdition::Edition2024 | ||
| $crate::config::StyleEdition::Edition2027 => $default_2024, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Edition2024 default will also extend to 2027. Is this the desired behaviour? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For now I think that's fine since we don't currently have plans to change any default option values for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @johnhuichen want to remind you about the ask to add a comment here. |
||
} | ||
} | ||
} | ||
|
@@ -52,6 +54,7 @@ mod test { | |
assert_eq!(Unit::style_edition_default(StyleEdition::Edition2018), 100); | ||
assert_eq!(Unit::style_edition_default(StyleEdition::Edition2021), 100); | ||
assert_eq!(Unit::style_edition_default(StyleEdition::Edition2024), 100); | ||
assert_eq!(Unit::style_edition_default(StyleEdition::Edition2027), 100); | ||
} | ||
|
||
#[test] | ||
|
@@ -66,5 +69,6 @@ mod test { | |
|
||
// style edition 2024 | ||
assert_eq!(Unit::style_edition_default(StyleEdition::Edition2024), 50); | ||
assert_eq!(Unit::style_edition_default(StyleEdition::Edition2027), 50); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a TODO comment here explaining that
rustc_span::edition::Edition
doesn't have anEdition2027
variant.