Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the now-unused VMGcRef::as_externref_unchecked method #9436

Merged
Merged
Changes from all commits
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
13 changes: 0 additions & 13 deletions crates/wasmtime/src/runtime/vm/gc/enabled/externref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,6 @@ impl VMGcRef {
None
}
}

/// Get this GC reference as an `externref` reference without checking if it
/// actually is an `externref` reference.
///
/// Calling this method on a non-`externref` reference is memory safe, but
/// will lead to general incorrectness like panics and wrong results.
pub fn as_externref_unchecked(&self) -> &VMExternRef {
debug_assert!(!self.is_i31());
let ptr = self as *const VMGcRef;
let ret = unsafe { &*ptr.cast() };
assert!(matches!(ret, VMExternRef(VMGcRef { .. })));
ret
}
}

impl VMExternRef {
Expand Down