Use cranelift_frontend::Switch for switchInt
This commit is contained in:
parent
c37e5ff96d
commit
b11cb572dc
4 changed files with 71 additions and 39 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue