[ty] Shrink size of AstNodeRef (#20028)
## Summary Removes the `module_ptr` field from `AstNodeRef` in release mode, and change `NodeIndex` to a `NonZeroU32` to reduce the size of `Option<AstNodeRef<_>>` fields. I believe CI runs in debug mode, so this won't show up in the memory report, but this reduces memory by ~2% in release mode.
This commit is contained in:
@@ -215,7 +215,7 @@ pub fn parse_parenthesized_expression_range(
|
||||
/// value: "'''\n int | str'''".to_string().into_boxed_str(),
|
||||
/// flags: StringLiteralFlags::empty(),
|
||||
/// range: TextRange::new(TextSize::new(0), TextSize::new(16)),
|
||||
/// node_index: AtomicNodeIndex::dummy()
|
||||
/// node_index: AtomicNodeIndex::NONE
|
||||
/// };
|
||||
/// let parsed = parse_string_annotation("'''\n int | str'''", &string);
|
||||
/// assert!(!parsed.is_ok());
|
||||
|
||||
Reference in New Issue
Block a user