Skip to content

Commit a0004ed

Browse files
authored
Remove a dead type in wasmparser (#1836)
Must have been lost in one refactoring or another. Now it's no longer used though so go ahead and delete it.
1 parent a099aa5 commit a0004ed

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

crates/wasmparser/src/validator/types.rs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -244,18 +244,6 @@ macro_rules! define_type_id {
244244
};
245245
}
246246

247-
/// A core WebAssembly type, in the core WebAssembly types index space.
248-
pub enum CoreType {
249-
/// A sub type.
250-
Sub(SubType),
251-
252-
/// A module type.
253-
///
254-
/// Does not actually appear in core Wasm at the moment. Only used for the
255-
/// core types index space within components.
256-
Module(ModuleType),
257-
}
258-
259247
/// Represents a unique identifier for a core type type known to a
260248
/// [`crate::Validator`].
261249
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -303,36 +291,6 @@ impl TypeData for SubType {
303291
}
304292
}
305293

306-
impl CoreType {
307-
/// Get the underlying `SubType` or panic.
308-
pub fn unwrap_sub(&self) -> &SubType {
309-
match self {
310-
CoreType::Sub(s) => s,
311-
CoreType::Module(_) => panic!("`unwrap_sub` on module type"),
312-
}
313-
}
314-
315-
/// Get the underlying `FuncType` within this `SubType` or panic.
316-
pub fn unwrap_func(&self) -> &FuncType {
317-
match &self.unwrap_sub().composite_type.inner {
318-
CompositeInnerType::Func(f) => f,
319-
CompositeInnerType::Array(_)
320-
| CompositeInnerType::Struct(_)
321-
| CompositeInnerType::Cont(_) => {
322-
panic!("`unwrap_func` on non-func composite type")
323-
}
324-
}
325-
}
326-
327-
/// Get the underlying `ModuleType` or panic.
328-
pub fn unwrap_module(&self) -> &ModuleType {
329-
match self {
330-
CoreType::Module(m) => m,
331-
CoreType::Sub(_) => panic!("`unwrap_module` on a subtype"),
332-
}
333-
}
334-
}
335-
336294
macro_rules! define_wrapper_id {
337295
(
338296
$(#[$outer_attrs:meta])*

0 commit comments

Comments
 (0)