diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-16 16:58:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 16:58:10 +0100 |
| commit | 9527533408b41a092638b4830605b6c06ab84a35 (patch) | |
| tree | 030f1a527b5df1b08a48df46265c3ce601fa093b /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 7be8693984d32d2f65ce9ded4f65b6b7340bddce (diff) | |
| parent | a18f43f25d414a9a3990bd2afe25e26b92f5fb22 (diff) | |
| download | rust-9527533408b41a092638b4830605b6c06ab84a35.tar.gz rust-9527533408b41a092638b4830605b6c06ab84a35.zip | |
Rollup merge of #92487 - dtolnay:traitalias, r=matthewjasper
Fix unclosed boxes in pretty printing of TraitAlias
This was causing trait aliases to not even render at all in stringified / pretty printed output.
```rust
macro_rules! repro {
($item:item) => {
stringify!($item)
};
}
fn main() {
println!("{:?}", repro!(pub trait Trait<T> = Sized where T: 'a;));
}
```
Before: `""`
After: `"pub trait Trait<T> = Sized where T: 'a;"`
The fix is copied from how `head`/`end` for `ItemKind::Use`, `ItemKind::ExternCrate`, and `ItemKind::Mod` are all done in the pretty printer:
https://github.com/rust-lang/rust/blob/dd3ac41495e85a9b7b5cb3186379d02ce17e51fe/compiler/rustc_ast_pretty/src/pprust/state.rs#L1178-L1184
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
