Skip to content

Commit 4c37e11

Browse files
compiler-errorsgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#137489 - RalfJung:no-more-rustc_intrinsic_must_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`
2 parents 62afeae + e53e618 commit 4c37e11

File tree

4 files changed

+357
-1433
lines changed

4 files changed

+357
-1433
lines changed

alloc/src/boxed.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,8 @@ pub struct Box<
238238
///
239239
/// This is the surface syntax for `box <expr>` expressions.
240240
#[rustc_intrinsic]
241-
#[rustc_intrinsic_must_be_overridden]
242241
#[unstable(feature = "liballoc_internals", issue = "none")]
243-
pub fn box_new<T>(_x: T) -> Box<T> {
244-
unreachable!()
245-
}
242+
pub fn box_new<T>(_x: T) -> Box<T>;
246243

247244
impl<T> Box<T> {
248245
/// Allocates memory on the heap and then places `x` into it.

core/src/ffi/va_list.rs

+3-12
Original file line numberDiff line numberDiff line change
@@ -305,25 +305,16 @@ impl<'f> Drop for VaListImpl<'f> {
305305
/// Destroy the arglist `ap` after initialization with `va_start` or
306306
/// `va_copy`.
307307
#[rustc_intrinsic]
308-
#[rustc_intrinsic_must_be_overridden]
309308
#[rustc_nounwind]
310-
unsafe fn va_end(_ap: &mut VaListImpl<'_>) {
311-
unreachable!()
312-
}
309+
unsafe fn va_end(_ap: &mut VaListImpl<'_>);
313310

314311
/// Copies the current location of arglist `src` to the arglist `dst`.
315312
#[rustc_intrinsic]
316-
#[rustc_intrinsic_must_be_overridden]
317313
#[rustc_nounwind]
318-
unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>) {
319-
unreachable!()
320-
}
314+
unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>);
321315

322316
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
323317
/// argument `ap` points to.
324318
#[rustc_intrinsic]
325-
#[rustc_intrinsic_must_be_overridden]
326319
#[rustc_nounwind]
327-
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T {
328-
unreachable!()
329-
}
320+
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T;

0 commit comments

Comments
 (0)