1
Fork 0

Use cranelift_frontend::Switch for switchInt

This commit is contained in:
bjorn3 2018-09-25 18:02:37 +02:00
parent c37e5ff96d
commit b11cb572dc
4 changed files with 71 additions and 39 deletions

View file

@ -170,6 +170,21 @@ impl<T: ?Sized> PartialEq for *const T {
}
}
#[lang = "neg"]
pub trait Neg {
type Output;
fn neg(self) -> Self::Output;
}
impl Neg for isize {
type Output = isize;
fn neg(self) -> isize {
-self
}
}
pub enum Option<T> {
Some(T),
None,