Yacin Tmimi

Results 716 comments of Yacin Tmimi

When you try formatting this with `error_on_unformatted=true` configured, you'll get the following error message: ``` error[internal]: not formatted because a comment would be lost --> :10 | 10 | match...

Thank you for the report. Here's where this one is happening: https://github.com/rust-lang/rustfmt/blob/a72613be50f8afa39c2d46f732252463dc9cc14f/src/items.rs#L2059-L2078

> It's also deleting it if the comment is inside the return type, as in > > fn foo() -> (/*TODO: This type needs to blahblahblah*/); @AloeareV This is off...

Hey @ajewellamz what exact version of cargo fmt / rustfmt are you using. You can run `cargo fmt --version` to get that info. Also, any chance you can get this...

Thanks! confirming that with `rustfmt +1.81` (`rustfmt 1.7.1-stable (eeb90cda 2024-09-04)`) I'm able to reproduce the panic with the above example: Backtrace ``` thread 'main' panicked at library/core/src/slice/sort/shared/smallsort.rs:862:5: user-provided comparison function...

You want to clone the **rustfmt** repo, not the `rust-lang/rust` repo. ``` git clone https://github.com/rust-lang/rustfmt.git cd rustfmt cargo build # should automatically install the relevant toolchain / components ```

@eareimu just to confirm, the issue here is that the closure in the `.inspect` call isn't indented correctly, right?

I think this might be related to https://github.com/rust-lang/rustfmt/issues/5421 or even a duplicate of that issue. My guess is that ```` ```xxx``` ```` is incorrectly getting interpreted as the start of...

As a workaround, you could always have a blank config file or a default config file on your system named something other than `rustfmt.toml` or `.rustfmt.toml` so that it won't...

Think this might be a duplicate of https://github.com/rust-lang/rustfmt/issues/5407