Skip to content
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

brace_style AlwaysNextLine fails on nightly #5912

Closed
aspizu opened this issue Sep 16, 2023 · 3 comments · Fixed by #5923
Closed

brace_style AlwaysNextLine fails on nightly #5912

aspizu opened this issue Sep 16, 2023 · 3 comments · Fixed by #5923
Labels
needs-mcve needs a Minimal Complete and Verifiable Example

Comments

@aspizu
Copy link

aspizu commented Sep 16, 2023

unstable_features = true
condense_wildcard_suffixes = true
edition = "2021"
max_width = 128
group_imports = "StdExternalCrate"
tab_spaces = 3
use_field_init_shorthand = true
use_try_shorthand = true
where_single_line = true
combine_control_expr = false
# condense_wildcard_suffixes = true
format_code_in_doc_comments = true
format_strings = true
imports_layout = "HorizontalVertical"
match_arm_blocks = false
match_block_trailing_comma = true
imports_granularity = "Crate"
reorder_impl_items = true
reorder_imports = true
reorder_modules = true
wrap_comments = true
use_small_heuristics = "Max"
trailing_comma = "Never"
brace_style = "AlwaysNextLine"
control_brace_style = "AlwaysNextLine"
error[internal]: left behind trailing whitespace
   --> /home/aspizu/Projects/onyo/src/value.rs:207:207:1
    |
207 |
    | ^^^^^^^^^
    |

error[internal]: left behind trailing whitespace
   --> /home/aspizu/Projects/onyo/src/value.rs:472:472:1
    |
472 |
    | ^^^^^^^^^
    |

warning: rustfmt has failed to format. See previous 2 errors.
@calebcartwright
Copy link
Member

Thanks for reaching out, but there's not enough here for us to be able to offer any insight. Please provide a complete and minimal reproducible example that includes the code snippet

@calebcartwright calebcartwright added the needs-mcve needs a Minimal Complete and Verifiable Example label Sep 16, 2023
@aspizu
Copy link
Author

aspizu commented Sep 16, 2023

enum Amogus {
   A(usize),
   B(usize)
}

fn foo() {
   let bar = match Amogus::A(1) {
      Amogus::A(a) =>
         aaaaaaaaaaaaaaaaaaaaaaaA()
            + bbbbbbbbbbbbbbbbbbbbbbbbb()
            + bbbbbbbbbbbbbbbbbbbbbbbbb()
            + bbbbbbbbbbbbbbbbbbbbbbbbb()
            + bbbbbbbbbbbbbbbbbbbbbbbbb()
            + bbbbbbbbbbbbbbbbbbbbbbbbb()
            + bbbbbbbbbbbbbbbbbbbbbbbbb()
            + bbbbbbbbbbbbbbbbbbbbbbbbb(),
      Amogus::B(b) => 2
   };
}
error[internal]: left behind trailing whitespace
  --> /home/aspizu/Projects/onyo/foo.rs:12:12:1
   |
12 |       
   | ^^^^^^
   |

warning: rustfmt has failed to format. See previous 1 errors.

@GambitingMan
Copy link
Contributor

It seems the error is caused by the following config settings

match_arm_blocks = false
control_brace_style = "AlwaysNextLine"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-mcve needs a Minimal Complete and Verifiable Example
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants