Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ty_python_semantic/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11785,7 +11785,7 @@ pub(super) fn determine_upper_bound<'db>(
// Make sure that the `Type` enum does not grow unexpectedly.
#[cfg(not(debug_assertions))]
#[cfg(target_pointer_width = "64")]
static_assertions::assert_eq_size!(Type, [u8; 16]);
static_assertions::assert_eq_size!(Type, [u8; 24]);
Comment on lines 11785 to +11788
Copy link
Member

@AlexWaygood AlexWaygood Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why the old assertion no longer passes after rebasing this PR on main. (It seemed to pass on earlier versions of this PR, IIRC.) This PR adds new Type variants, but the wrapped data is all Salsa-interned, and (from local experimentation -- I tried adding some more static_assertions::assert_eq_size!() calls on various wrapped structs and ran cargo check -p ty_python_semantic --release) doesn't appear particularly large

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what changed but I remember that @ibraheemdev ran into this as well.

it seems that SubclassOfType is 16 bytes and so is KnownInstanceType. But KnownInstanceType was 12 bytes before.


#[cfg(test)]
pub(crate) mod tests {
Expand Down
Loading