Skip to content

intrinsics: remove unnecessary leading underscore from argument names #138387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions compiler/rustc_codegen_cranelift/example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,25 +624,25 @@ pub mod intrinsics {
#[rustc_intrinsic]
pub fn size_of<T>() -> usize;
#[rustc_intrinsic]
pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize;
pub unsafe fn size_of_val<T: ?::Sized>(val: *const T) -> usize;
#[rustc_intrinsic]
pub fn min_align_of<T>() -> usize;
#[rustc_intrinsic]
pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize;
pub unsafe fn min_align_of_val<T: ?::Sized>(val: *const T) -> usize;
#[rustc_intrinsic]
pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize);
pub unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize);
#[rustc_intrinsic]
pub unsafe fn transmute<T, U>(_e: T) -> U;
pub unsafe fn transmute<T, U>(e: T) -> U;
#[rustc_intrinsic]
pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32;
pub unsafe fn ctlz_nonzero<T>(x: T) -> u32;
#[rustc_intrinsic]
pub fn needs_drop<T: ?::Sized>() -> bool;
#[rustc_intrinsic]
pub fn bitreverse<T>(_x: T) -> T;
pub fn bitreverse<T>(x: T) -> T;
#[rustc_intrinsic]
pub fn bswap<T>(_x: T) -> T;
pub fn bswap<T>(x: T) -> T;
#[rustc_intrinsic]
pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize);
pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
#[rustc_intrinsic]
pub unsafe fn unreachable() -> !;
}
Expand Down
16 changes: 8 additions & 8 deletions compiler/rustc_codegen_gcc/example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,25 +595,25 @@ pub mod intrinsics {
#[rustc_intrinsic]
pub fn size_of<T>() -> usize;
#[rustc_intrinsic]
pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize;
pub unsafe fn size_of_val<T: ?::Sized>(val: *const T) -> usize;
#[rustc_intrinsic]
pub fn min_align_of<T>() -> usize;
#[rustc_intrinsic]
pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize;
pub unsafe fn min_align_of_val<T: ?::Sized>(val: *const T) -> usize;
#[rustc_intrinsic]
pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize);
pub unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize);
#[rustc_intrinsic]
pub unsafe fn transmute<T, U>(_e: T) -> U;
pub unsafe fn transmute<T, U>(e: T) -> U;
#[rustc_intrinsic]
pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32;
pub unsafe fn ctlz_nonzero<T>(x: T) -> u32;
#[rustc_intrinsic]
pub fn needs_drop<T: ?::Sized>() -> bool;
#[rustc_intrinsic]
pub fn bitreverse<T>(_x: T) -> T;
pub fn bitreverse<T>(x: T) -> T;
#[rustc_intrinsic]
pub fn bswap<T>(_x: T) -> T;
pub fn bswap<T>(x: T) -> T;
#[rustc_intrinsic]
pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize);
pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
#[rustc_intrinsic]
pub unsafe fn unreachable() -> !;
}
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub struct Box<
/// This is the surface syntax for `box <expr>` expressions.
#[rustc_intrinsic]
#[unstable(feature = "liballoc_internals", issue = "none")]
pub fn box_new<T>(_x: T) -> Box<T>;
pub fn box_new<T>(x: T) -> Box<T>;

impl<T> Box<T> {
/// Allocates memory on the heap and then places `x` into it.
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/ffi/va_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ impl<'f> Drop for VaListImpl<'f> {
/// `va_copy`.
#[rustc_intrinsic]
#[rustc_nounwind]
unsafe fn va_end(_ap: &mut VaListImpl<'_>);
unsafe fn va_end(ap: &mut VaListImpl<'_>);

/// Copies the current location of arglist `src` to the arglist `dst`.
#[rustc_intrinsic]
#[rustc_nounwind]
unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>);
unsafe fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);

/// Loads an argument of type `T` from the `va_list` `ap` and increment the
/// argument `ap` points to.
#[rustc_intrinsic]
#[rustc_nounwind]
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T;
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
499 changes: 246 additions & 253 deletions library/core/src/intrinsics/mod.rs

Large diffs are not rendered by default.

Loading
Loading