Fix drop scopes in mir

This commit is contained in:
hkalbasi 2023-06-04 01:03:32 +03:30
parent f44fc271d4
commit 08f89193b5
5 changed files with 237 additions and 24 deletions

View file

@ -726,6 +726,19 @@ pub mod ops {
pub trait AddAssign<Rhs = Self> {
fn add_assign(&mut self, rhs: Rhs);
}
// region:builtin_impls
macro_rules! add_impl {
($($t:ty)*) => ($(
impl const Add for $t {
type Output = $t;
fn add(self, other: $t) -> $t { self + other }
}
)*)
}
add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
// endregion:builtin_impls
// endregion:add
// region:generator