Rollup merge of #140762 - aDotInTheVoid:popnl, r=GuillaumeGomez
rustdoc-json: Remove newlines from attributes Fixes #140689 Not sure if this needs to bump `FORMAT_VERSION` or not. r? ``@GuillaumeGomez`` cc ``@obi1kenobi``
This commit is contained in:
commit
cd235bdec8
9 changed files with 17 additions and 13 deletions
|
|
@ -786,7 +786,11 @@ impl Item {
|
|||
// because it isn't public API.
|
||||
None
|
||||
}
|
||||
_ => Some(rustc_hir_pretty::attribute_to_string(&tcx, attr)),
|
||||
_ => Some({
|
||||
let mut s = rustc_hir_pretty::attribute_to_string(&tcx, attr);
|
||||
assert_eq!(s.pop(), Some('\n'));
|
||||
s
|
||||
}),
|
||||
}
|
||||
} else if attr.has_any_name(ALLOWED_ATTRIBUTES) {
|
||||
Some(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue