@@ -244,18 +244,6 @@ macro_rules! define_type_id {
244
244
} ;
245
245
}
246
246
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
-
259
247
/// Represents a unique identifier for a core type type known to a
260
248
/// [`crate::Validator`].
261
249
#[ derive( Debug , Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
@@ -303,36 +291,6 @@ impl TypeData for SubType {
303
291
}
304
292
}
305
293
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
-
336
294
macro_rules! define_wrapper_id {
337
295
(
338
296
$( #[ $outer_attrs: meta] ) *
0 commit comments