Yacin Tmimi

Results 492 comments of Yacin Tmimi

Ahh okay I see. I actually can't reproduce the issue as stated in the description. `rustfmt --emit=stdout < issue_5519.rs` works just fine with the latest master https://github.com/rust-lang/rustfmt/commit/38659ec6ad5f341cf8eb3139725bf695872c6de7. I got too...

Thanks for the report. Any chance you could link me to more info about `#![feature(dyn_star)]`? I can confirm that I'm able to reproduce the issue on the playground, however when...

Thanks for linking the `dyn*` PR. It looks like that PR didn't make changes to handle `dyn*` formatting in rustfmt, so I don't think it's fixed yet. Also the `dyn*...

I took a look at this again. The latest rustfmt master is using [nightly-2022-08-06](https://github.com/rust-lang/rustfmt/blob/ef91154250977b3b5d05448dafbca524a1168b47/rust-toolchain#L2), which doesn't know about the new `ast::TraitObjectSyntax::DynStar` variant. In the example I mentioned above https://github.com/rust-lang/rustfmt/issues/5542#issuecomment-1253172397 it...

Is this a feature request? I don't think the `brace_style` config option was intended to be used with imports. The [docs](https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#brace_style) only give examples for functions, enums, and structs.

> I may need some clues on where to start but that's ok tho' c: You'll likely want to start at `format_struct`, and follow the code down through `format_struct_struct` https://github.com/rust-lang/rustfmt/blob/949da529d7a0b348376f67e77676a8722ad21899/src/items.rs#L982-L997...

It's likely that any change we make would need to be version gated to prevent breaking formatting changes. so we'd only be able to change the behavior when `version=Two`.

Confirming I can reproduce this with the latest master 38659ec6ad5f341cf8eb3139725bf695872c6de7.

I did some digging and It seems that `block_style` is being set to `true` in [`write_list`](https://github.com/rust-lang/rustfmt/blob/38659ec6ad5f341cf8eb3139725bf695872c6de7/src/lists.rs#L260) https://github.com/rust-lang/rustfmt/blob/38659ec6ad5f341cf8eb3139725bf695872c6de7/src/lists.rs#L447-L461 so when we call `CommentRewrite::new` from [`rewrite_comment_inner`](https://github.com/rust-lang/rustfmt/blob/38659ec6ad5f341cf8eb3139725bf695872c6de7/src/comment.rs#L871), we set things up to write...

Thanks for reaching out. I think the underlying issue is that rustfmt doesn't currently format let else expressions because the rules for formatting them have not yet been finalized via...