1
Fork 0

Merge commit 'db1a31c243' into subtree-update_cg_gcc_2025-04-18

This commit is contained in:
Guillaume Gomez 2025-04-18 21:19:50 +02:00
commit e4ea67b3d7
52 changed files with 959 additions and 1241 deletions

View file

@ -51,6 +51,10 @@ impl<T: ?Sized> LegacyReceiver for &T {}
impl<T: ?Sized> LegacyReceiver for &mut T {}
impl<T: ?Sized, A: Allocator> LegacyReceiver for Box<T, A> {}
#[lang = "receiver"]
trait Receiver {
}
#[lang = "copy"]
pub trait Copy {}
@ -134,6 +138,14 @@ impl Mul for u8 {
}
}
impl Mul for i32 {
type Output = Self;
fn mul(self, rhs: Self) -> Self::Output {
self * rhs
}
}
impl Mul for usize {
type Output = Self;
@ -142,6 +154,14 @@ impl Mul for usize {
}
}
impl Mul for isize {
type Output = Self;
fn mul(self, rhs: Self) -> Self::Output {
self * rhs
}
}
#[lang = "add"]
pub trait Add<RHS = Self> {
type Output;
@ -165,6 +185,14 @@ impl Add for i8 {
}
}
impl Add for i32 {
type Output = Self;
fn add(self, rhs: Self) -> Self {
self + rhs
}
}
impl Add for usize {
type Output = Self;
@ -196,6 +224,14 @@ impl Sub for usize {
}
}
impl Sub for isize {
type Output = Self;
fn sub(self, rhs: Self) -> Self {
self - rhs
}
}
impl Sub for u8 {
type Output = Self;
@ -220,6 +256,14 @@ impl Sub for i16 {
}
}
impl Sub for i32 {
type Output = Self;
fn sub(self, rhs: Self) -> Self {
self - rhs
}
}
#[lang = "rem"]
pub trait Rem<RHS = Self> {
type Output;
@ -628,6 +672,10 @@ pub mod libc {
pub fn memcpy(dst: *mut u8, src: *const u8, size: usize);
pub fn memmove(dst: *mut u8, src: *const u8, size: usize);
pub fn strncpy(dst: *mut u8, src: *const u8, size: usize);
pub fn fflush(stream: *mut i32) -> i32;
pub fn exit(status: i32);
pub static stdout: *mut i32;
}
}