Skip to content

Commit

Permalink
chore: apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright committed Jul 29, 2024
1 parent d66ab31 commit cf352a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2698,7 +2698,7 @@ Controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338]

- **Default value**: `"2015"`
- **Possible values**: `"2015"`, `"2018"`, `"2021"`, `"2024"` (unstable variant)
- **Stable**: Yes
- **Stable**: No

[Rust Style Guide]: https://doc.rust-lang.org/nightly/style-guide/
[RFC 3338]: https://rust-lang.github.io/rfcs/3338-style-evolution.html
Expand Down
4 changes: 2 additions & 2 deletions src/config/config_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ macro_rules! create_config {
if self.was_set().style_edition() || self.was_set_cli().style_edition() {
eprintln!(
"Warning: the deprecated `version` option was \
used in conjunction with the `edition` or \
`style_edition` options which take precedence. \
used in conjunction with the `style_edition` \
option which takes precedence. \
The value of the `version` option will be ignored."
);
} else if matches!(self.version(), Version::Two) {
Expand Down
8 changes: 6 additions & 2 deletions src/overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,12 @@ impl<'a> OverflowableItem<'a> {
OverflowableItem::NestedMetaItem(..) => SPECIAL_CASE_ATTR,
_ => &[],
};
let additional_cases = match (self, config.style_edition()) {
(OverflowableItem::MacroArg(..), StyleEdition::Edition2024) => SPECIAL_CASE_MACROS_V2,
let additional_cases = match self {
OverflowableItem::MacroArg(..)
if config.style_edition() >= StyleEdition::Edition2024 =>
{
SPECIAL_CASE_MACROS_V2
}
_ => &[],
};
base_cases.iter().chain(additional_cases)
Expand Down

0 comments on commit cf352a7

Please sign in to comment.