Yacin Tmimi

Results 716 comments of Yacin Tmimi

@fee1-dead Right! That's because we have code on the `format_expr` code path that checks to see if reformatting the AST node would result in removing comments, and if so rustfmt...

> Hopefully my explanation is good. It was great! Thank you for being so thorough 😁. It also helped that you linked to the implementation used by `annotated_snippets`. > testing...

This is where we overwrite file content when using the `FilesEmitter`, which is the default emitter. https://github.com/rust-lang/rustfmt/blob/bf967319e258acb9b1648a952bba52665eceaf52/src/emitter/files.rs#L30 different emitters are used depending on what output you'd like rustfmt to generate....

@estebank do you know if calling [std::fs::File::set_len](https://doc.rust-lang.org/std/fs/struct.File.html#method.set_len) would return an error if we can't extend the file size to the new length? Maybe that's OS specific? I'm thinking one approach...

@clarfonthey `cargo fmt` is just a thin wrapper around rustfmt so it's best if the feature is implemented by rustfmt. rustfmt's main goal is to be an implementation of the...

Thank you for the feedback on my initial approach. Your suggestion also makes sense to me. Do you have any interested in working on a fix for this issue?

@tcoratger if you mean all `.toml` files then I agree with @xxchan that it's out of scope, but if you're specifically referring to `Cargo.toml` files then the answer is yes,...

I'm pretty sure the use of `#![doc = "test()"]` is throwing rustfmt off. This feels very similar to https://github.com/rust-lang/rustfmt/issues/5420. ``` //! //! Example 1 //! //! ``` //! test() //!...

The linked issue is closed because of technical limitations on rustfmt's side. _Maybe_ it's possible to skip formatting altogether if there's a mix of sugared and de-sugard doc comments. I'll...

What if the wrapping rules had more to do with the number of items in the chain? For example, something along the lines of "if there are two or more...