Move the 'data lifetime parameter to the ModuleEnvironment trait.

This is needed to allow implementations to have 'data-lifetime
references if they choose to. The DummyEnvironment is an example of an
implementation that doesn't choose to.
This commit is contained in:
Dan Gohman
2017-10-11 21:28:36 -07:00
parent d6ab7e3abf
commit bd94a3b202
4 changed files with 26 additions and 26 deletions

View File

@@ -13,7 +13,7 @@ use runtime::ModuleEnvironment;
/// indexes in the wasm module and the indexes inside each functions.
pub fn translate_module<'data>(
data: &'data [u8],
environ: &mut ModuleEnvironment,
environ: &mut ModuleEnvironment<'data>,
) -> Result<(), String> {
let mut parser = Parser::new(data);
match *parser.read() {