diff --git a/Cargo.lock b/Cargo.lock index e01eca27ef7..76d9f0d27ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,7 +40,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cranelift-bforest" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "cranelift-entity", ] @@ -48,7 +48,7 @@ dependencies = [ [[package]] name = "cranelift-codegen" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "byteorder", "cranelift-bforest", @@ -66,7 +66,7 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -75,17 +75,17 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" [[package]] name = "cranelift-entity" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" [[package]] name = "cranelift-frontend" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "cranelift-codegen", "log", @@ -96,7 +96,7 @@ dependencies = [ [[package]] name = "cranelift-jit" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "anyhow", "cranelift-codegen", @@ -114,7 +114,7 @@ dependencies = [ [[package]] name = "cranelift-module" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "anyhow", "cranelift-codegen", @@ -126,7 +126,7 @@ dependencies = [ [[package]] name = "cranelift-native" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "cranelift-codegen", "target-lexicon", @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "cranelift-object" version = "0.70.0" -source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2" +source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058" dependencies = [ "anyhow", "cranelift-codegen", diff --git a/example/mini_core.rs b/example/mini_core.rs index 002ec7e2e3d..7c6d7fc106d 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -365,6 +365,22 @@ impl PartialEq for Option { } } +#[lang = "shl"] +pub trait Shl { + type Output; + + #[must_use] + fn shl(self, rhs: RHS) -> Self::Output; +} + +impl Shl for u128 { + type Output = u128; + + fn shl(self, rhs: u128) -> u128 { + self << rhs + } +} + #[lang = "neg"] pub trait Neg { type Output; diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 4a8375afac3..237f4d11d57 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -264,6 +264,9 @@ fn main() { assert_eq!(f2 as i8, -128); assert_eq!(f2 as u8, 0); + let amount = 0; + assert_eq!(1u128 << amount, 1); + static ANOTHER_STATIC: &u8 = &A_STATIC; assert_eq!(*ANOTHER_STATIC, 42);