brson / miri

An experimental compiler from Rust to WebAssembly (inactive - do not use)
Apache License 2.0
209 stars 15 forks source link

Don't translate generic default trait methods. #46

Closed lqd closed 7 years ago

lqd commented 7 years ago

I think Self was in the fn's type_scheme.generics.types in the old nightly ? In any case, this fixes the 3 examples exhibiting the #40 behavior, so I also added the default methods back to the tests that were created from those examples.

(This also fixes the failing struct example.)

There's improvement on the cmp example and test: they are still failing, but not for generics/substs reasons anymore. The PartialOrd::partial_cmp methods generate stores for values of a different type, making the generated wasm module fail binaryen validation.

eholk commented 7 years ago

Thanks!