Skip to content

Commit

Permalink
Rollup merge of rust-lang#137489 - RalfJung:no-more-rustc_intrinsic_m…
Browse files Browse the repository at this point in the history
…ust_be_overridden, r=oli-obk

remove `#[rustc_intrinsic_must_be_overridde]`

In rust-lang#135031, we gained support for just leaving away the body. Now that the bootstrap compiler got bumped, stop using the old style and remove support for it.

r? `@oli-obk`

There are a few more mentions of this attribute in RA code that I didn't touch; Cc `@rust-lang/rust-analyzer`
  • Loading branch information
compiler-errors authored and gitbot committed Mar 11, 2025
2 parents 62afeae + e53e618 commit 4c37e11
Show file tree
Hide file tree
Showing 4 changed files with 357 additions and 1,433 deletions.
5 changes: 1 addition & 4 deletions alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,8 @@ pub struct Box<
///
/// This is the surface syntax for `box <expr>` expressions.
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[unstable(feature = "liballoc_internals", issue = "none")]
pub fn box_new<T>(_x: T) -> Box<T> {
unreachable!()
}
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
15 changes: 3 additions & 12 deletions core/src/ffi/va_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,25 +305,16 @@ impl<'f> Drop for VaListImpl<'f> {
/// Destroy the arglist `ap` after initialization with `va_start` or
/// `va_copy`.
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[rustc_nounwind]
unsafe fn va_end(_ap: &mut VaListImpl<'_>) {
unreachable!()
}
unsafe fn va_end(_ap: &mut VaListImpl<'_>);

/// Copies the current location of arglist `src` to the arglist `dst`.
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[rustc_nounwind]
unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>) {
unreachable!()
}
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_intrinsic_must_be_overridden]
#[rustc_nounwind]
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T {
unreachable!()
}
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T;
Loading

0 comments on commit 4c37e11

Please sign in to comment.