rustdoc-json: Better Header Type

- Make ABI an enum, instead of being stringly typed
- Replace Qualifier HashSet with 3 bools
- Merge ABI field into header, as they always occor together
This commit is contained in:
Nixon Enraght-Moony 2022-02-18 21:58:49 +00:00
parent b8c56fa8c3
commit aa601574a5
3 changed files with 58 additions and 37 deletions

View file

@ -2777,6 +2777,10 @@ impl FnHeader {
pub fn is_const(&self) -> bool {
matches!(&self.constness, Constness::Const)
}
pub fn is_unsafe(&self) -> bool {
matches!(&self.unsafety, Unsafety::Unsafe)
}
}
#[derive(Debug, HashStable_Generic)]