mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
150b9d753b
Fix syntax in `-Zunpretty-expanded` output for derived `PartialEq`. If you do `derive(PartialEq)` on a packed struct, the output shown by `-Zunpretty=expanded` includes expressions like this: ``` { self.x } == { other.x } ``` This is invalid syntax. This doesn't break compilation, because the AST nodes are constructed within the compiler. But it does mean anyone using `-Zunpretty=expanded` output as a guide for hand-written impls could get a nasty surprise. This commit fixes things by instead using this form: ``` ({ self.x }) == ({ other.x }) ``` r? ``@RalfJung`` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |