MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / async_disallows_structref_new

Function async_disallows_structref_new

tests/all/missing_async.rs:261–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259
260#[tokio::test]
261async fn async_disallows_structref_new() -> Result<()> {
262 let mut store = async_limiter_store();
263 let ty = StructType::new(
264 store.engine(),
265 [FieldType::new(Mutability::Var, StorageType::I8)],
266 )?;
267 let pre = StructRefPre::new(&mut store, ty);
268 assert!(StructRef::new(&mut store, &pre, &[Val::I32(0)]).is_err());
269 StructRef::new_async(&mut store, &pre, &[Val::I32(0)]).await?;
270 Ok(())
271}
272
273#[test]
274fn epoch_yield_disallowed_without_async() -> Result<()> {

Callers

nothing calls this directly

Calls 4

async_limiter_storeFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
engineMethod · 0.45

Tested by

no test coverage detected