Skip to content

Rollup of 8 pull requests #121339

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

Closed
wants to merge 24 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f12d248
Implement `NonZero` traits generically.
reitermarkus Feb 17, 2024
24cffbf
resolve: Scale back unloading of speculatively loaded crates
petrochenkov Feb 14, 2024
9b193de
Remove two comments that shouldn't be there.
nnethercote Feb 15, 2024
bb4748f
Remove dead `expect_error_or_delayed_bug` method.
nnethercote Feb 16, 2024
ebb78c2
Remove `EarlyDiagCtxt::abort_if_errors`.
nnethercote Feb 16, 2024
6fa6f55
Adjust the `has_errors*` methods.
nnethercote Feb 18, 2024
9c32a7d
target: Revert default to the medium code model on LoongArch targets
heiher Feb 19, 2024
5be3d4b
Remove `RefMutL` hack in `proc_macro::bridge`
GrigorenkoPV Feb 19, 2024
9e68d89
Remove the "codegen" profile from bootstrap
Noratrieb Feb 18, 2024
03d03c6
Always inline check in `assert_unsafe_precondition` with cfg(debug_as…
Noratrieb Feb 16, 2024
226faa9
Overhaul the handling of errors at the top-level.
nnethercote Feb 18, 2024
add3457
Inline and remove `Session::compile_status`.
nnethercote Feb 18, 2024
86ba1ab
Refactor `run_global_ctxt`.
nnethercote Feb 18, 2024
2eb88a7
Replace unnecessary `abort_if_errors`.
nnethercote Feb 18, 2024
a094903
Inline and remove `abort_on_err`.
nnethercote Feb 19, 2024
42c4df0
Rename `ConstPropLint` to `KnownPanicsLint`
gurry Feb 20, 2024
06dbd05
Rollup merge of #121167 - petrochenkov:unload2, r=wesleywiser
Noratrieb Feb 20, 2024
a3519ed
Rollup merge of #121196 - Nilstrieb:the-clever-solution, r=saethlin
Noratrieb Feb 20, 2024
01c13f8
Rollup merge of #121206 - nnethercote:top-level-error-handling, r=oli…
Noratrieb Feb 20, 2024
cba07ff
Rollup merge of #121241 - reitermarkus:generic-nonzero-traits, r=dtolnay
Noratrieb Feb 20, 2024
8d038bf
Rollup merge of #121278 - Nilstrieb:no-more-codegen, r=clubby789
Noratrieb Feb 20, 2024
d86f0c1
Rollup merge of #121286 - gurry:constprop-lint-rename, r=oli-obk
Noratrieb Feb 20, 2024
71ed0b9
Rollup merge of #121291 - heiher:revert-medium-cmodel, r=Nilstrieb
Noratrieb Feb 20, 2024
8957df0
Rollup merge of #121302 - GrigorenkoPV:refmutl, r=bjorn3
Noratrieb Feb 20, 2024
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
9 changes: 8 additions & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,7 @@ pub const fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
/// assertions disabled. This intrinsic is primarily used by [`assert_unsafe_precondition`].
#[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")]
#[unstable(feature = "core_intrinsics", issue = "none")]
#[inline(always)]
#[cfg_attr(not(bootstrap), rustc_intrinsic)]
pub(crate) const fn debug_assertions() -> bool {
cfg!(debug_assertions)
Expand Down Expand Up @@ -2659,7 +2660,13 @@ pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize)
macro_rules! assert_unsafe_precondition {
($message:expr, ($($name:ident:$ty:ty = $arg:expr),*$(,)?) => $e:expr $(,)?) => {
{
#[inline(never)]
// When the standard library is compiled with debug assertions, we want the check to inline for better performance.
// This is important when working on the compiler, which is compiled with debug assertions locally.
// When not compiled with debug assertions (so the precompiled std) we outline the check to minimize the compile
// time impact when debug assertions are disabled.
// It is not clear whether that is the best solution, see #120848.
#[cfg_attr(debug_assertions, inline(always))]
#[cfg_attr(not(debug_assertions), inline(never))]
#[rustc_nounwind]
fn precondition_check($($name:$ty),*) {
if !$e {
Expand Down