Skip to content

Commit f5729cf

Browse files
committedFeb 25, 2025·
Auto merge of rust-lang#137573 - compiler-errors:rollup-noq9yhp, r=compiler-errors
Rollup of 11 pull requests Successful merges: - rust-lang#136522 (Remove `feature(dyn_compatible_for_dispatch)` from the compiler) - rust-lang#137289 (Consolidate and improve error messaging for `CoerceUnsized` and `DispatchFromDyn`) - rust-lang#137321 (Correct doc about `temp_dir()` behavior on Android) - rust-lang#137417 (rustc_target: Add more RISC-V atomic-related features) - rust-lang#137489 (remove `#[rustc_intrinsic_must_be_overridde]`) - rust-lang#137530 (DWARF mixed versions with LTO on MIPS) - rust-lang#137543 (std: Fix another new symlink test on Windows) - rust-lang#137548 (Pass correct `TypingEnv` to `InlineAsmCtxt`) - rust-lang#137550 (Don't immediately panic if dropck fails without returning errors) - rust-lang#137552 (Update books) - rust-lang#137556 (rename simd_shuffle_generic → simd_shuffle_const_generic) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7d8c6e7 + 6c1f959 commit f5729cf

File tree

135 files changed

+1436
-2906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1436
-2906
lines changed
 

‎compiler/rustc_borrowck/src/type_check/liveness/trace.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ use rustc_index::interval::IntervalSet;
44
use rustc_infer::infer::canonical::QueryRegionConstraints;
55
use rustc_infer::infer::outlives::for_liveness;
66
use rustc_middle::mir::{BasicBlock, Body, ConstraintCategory, HasLocalDecls, Local, Location};
7-
use rustc_middle::span_bug;
87
use rustc_middle::traits::query::DropckOutlivesResult;
98
use rustc_middle::ty::relate::Relate;
109
use rustc_middle::ty::{Ty, TyCtxt, TypeVisitable, TypeVisitableExt};
1110
use rustc_mir_dataflow::ResultsCursor;
1211
use rustc_mir_dataflow::impls::MaybeInitializedPlaces;
1312
use rustc_mir_dataflow::move_paths::{HasMoveData, MoveData, MovePathIndex};
1413
use rustc_mir_dataflow::points::{DenseLocationMap, PointIndex};
15-
use rustc_span::{DUMMY_SP, Span};
14+
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span};
1615
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
1716
use rustc_trait_selection::traits::ObligationCtxt;
1817
use rustc_trait_selection::traits::query::dropck_outlives;
@@ -608,7 +607,7 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
608607
Ok(TypeOpOutput { output, constraints, .. }) => {
609608
DropData { dropck_result: output, region_constraint_data: constraints }
610609
}
611-
Err(_) => {
610+
Err(ErrorGuaranteed { .. }) => {
612611
// We don't run dropck on HIR, and dropck looks inside fields of
613612
// types, so there's no guarantee that it succeeds. We also
614613
// can't rely on the the `ErrorGuaranteed` from `fully_perform` here
@@ -631,10 +630,10 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
631630
}
632631
};
633632

633+
// Could have no errors if a type lowering error, say, caused the query
634+
// to fail.
634635
if !errors.is_empty() {
635636
typeck.infcx.err_ctxt().report_fulfillment_errors(errors);
636-
} else {
637-
span_bug!(span, "Rerunning drop data query produced no error.");
638637
}
639638
});
640639
DropData { dropck_result: Default::default(), region_constraint_data: None }

‎compiler/rustc_codegen_cranelift/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)
Please sign in to comment.