about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-06-14 21:39:09 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-06-21 13:52:46 +1000
commit7fa8901cd090093a57723d3f196c27db3b98ad94 (patch)
treefa6a5d9f12aec8ce6746f09a78c12a63d9864ecd /compiler/rustc_codegen_llvm/src
parent59a3399148d02d412485999dee78c0e72a54c0a5 (diff)
downloadrust-7fa8901cd090093a57723d3f196c27db3b98ad94.tar.gz
rust-7fa8901cd090093a57723d3f196c27db3b98ad94.zip
rustdoc_json: represent generic args consistently.
They show up in three places: once as `Option<Box<GenericArgs>>`, once
as `Box<GenericArgs>`, and once as `GenericArgs`. The first option is
best. It is more compact because generic args are often missing. This
commit changes the latter two to the former.

Example output, before and after, for the `AssocItemConstraint` change:
```
{"name":"Offset","args":{"angle_bracketed":{"args":[],"constraints":[]}},"binding":{...}}
{"name":"Offset","args":null,"binding":{...}}
```
Example output, before and after, for the `Type::QualifiedPath` change:
```
{"qualified_path":{"name":"Offset","args":{"angle_bracketed":{"args":[],"constraints":[]}}, ...}}
{"qualified_path":{"name":"Offset","args":null, ...}}
```
This reduces JSON output size, but not by much (e.g. 0.5%), because
`AssocItemConstraint` and `Type::QualifiedPath` are uncommon.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions