diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-21 22:15:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-21 22:15:01 +0200 |
| commit | 2663ea305105f756bc90c481c41d41d42f488ae2 (patch) | |
| tree | a0c3749d20b96ce670a9ef931caa63aff51af673 /compiler/rustc_builtin_macros/src/errors.rs | |
| parent | fea2e5c74630705def35649c9e33ead6b9474b54 (diff) | |
| parent | f2d94c1d9372742fd1668c3887840ad0833390b5 (diff) | |
| download | rust-2663ea305105f756bc90c481c41d41d42f488ae2.tar.gz rust-2663ea305105f756bc90c481c41d41d42f488ae2.zip | |
Rollup merge of #141357 - dianne:unhardcode-unpretty-thir-tree-body-expr, r=compiler-errors
`unpretty=thir-tree`: don't require the final expr to be the body's value Two motivations for this: - I couldn't find a comment motivating this hard-coding. I can imagine it might be easier to read `unpretty=thir-flat` output if the final expression in the THIR is always the body's value, but if that's the reason, that should be the justification in the source. I can also imagine it's meant to check that all expressions will be visited by the pretty-printer, but the existing check doesn't quite do that either. - Guard patterns (#129967) contain expressions, so lowering params containing guard patterns may add more expressions to the THIR. Currently a body's params are lowered after its expression, so guard expressions in params would end up last, breaking this. As an alternative, the params could be lowered first (#141356).
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
