Skip to content

Commit dab8e54

Browse files
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 8e98f40 + 957389c commit dab8e54

File tree

1 file changed

+13
-52
lines changed

1 file changed

+13
-52
lines changed

example/mini_core.rs

+13-52
Original file line numberDiff line numberDiff line change
@@ -620,70 +620,31 @@ pub union MaybeUninit<T> {
620620

621621
pub mod intrinsics {
622622
#[rustc_intrinsic]
623-
#[rustc_intrinsic_must_be_overridden]
624-
pub fn abort() -> ! {
625-
loop {}
626-
}
623+
pub fn abort() -> !;
627624
#[rustc_intrinsic]
628-
#[rustc_intrinsic_must_be_overridden]
629-
pub fn size_of<T>() -> usize {
630-
loop {}
631-
}
625+
pub fn size_of<T>() -> usize;
632626
#[rustc_intrinsic]
633-
#[rustc_intrinsic_must_be_overridden]
634-
pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize {
635-
loop {}
636-
}
627+
pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize;
637628
#[rustc_intrinsic]
638-
#[rustc_intrinsic_must_be_overridden]
639-
pub fn min_align_of<T>() -> usize {
640-
loop {}
641-
}
629+
pub fn min_align_of<T>() -> usize;
642630
#[rustc_intrinsic]
643-
#[rustc_intrinsic_must_be_overridden]
644-
pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize {
645-
loop {}
646-
}
631+
pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize;
647632
#[rustc_intrinsic]
648-
#[rustc_intrinsic_must_be_overridden]
649-
pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize) {
650-
loop {}
651-
}
633+
pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize);
652634
#[rustc_intrinsic]
653-
#[rustc_intrinsic_must_be_overridden]
654-
pub unsafe fn transmute<T, U>(_e: T) -> U {
655-
loop {}
656-
}
635+
pub unsafe fn transmute<T, U>(_e: T) -> U;
657636
#[rustc_intrinsic]
658-
#[rustc_intrinsic_must_be_overridden]
659-
pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32 {
660-
loop {}
661-
}
637+
pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32;
662638
#[rustc_intrinsic]
663-
#[rustc_intrinsic_must_be_overridden]
664-
pub fn needs_drop<T: ?::Sized>() -> bool {
665-
loop {}
666-
}
639+
pub fn needs_drop<T: ?::Sized>() -> bool;
667640
#[rustc_intrinsic]
668-
#[rustc_intrinsic_must_be_overridden]
669-
pub fn bitreverse<T>(_x: T) -> T {
670-
loop {}
671-
}
641+
pub fn bitreverse<T>(_x: T) -> T;
672642
#[rustc_intrinsic]
673-
#[rustc_intrinsic_must_be_overridden]
674-
pub fn bswap<T>(_x: T) -> T {
675-
loop {}
676-
}
643+
pub fn bswap<T>(_x: T) -> T;
677644
#[rustc_intrinsic]
678-
#[rustc_intrinsic_must_be_overridden]
679-
pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize) {
680-
loop {}
681-
}
645+
pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize);
682646
#[rustc_intrinsic]
683-
#[rustc_intrinsic_must_be_overridden]
684-
pub unsafe fn unreachable() -> ! {
685-
loop {}
686-
}
647+
pub unsafe fn unreachable() -> !;
687648
}
688649

689650
pub mod libc {

0 commit comments

Comments
 (0)