parent
86c594426f
commit
27a5f4f472
3 changed files with 29 additions and 10 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -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",
|
||||
|
|
|
@ -365,6 +365,22 @@ impl <T: PartialEq> PartialEq for Option<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[lang = "shl"]
|
||||
pub trait Shl<RHS = Self> {
|
||||
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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue