Skip to content

Commit 360757f

Browse files
committed
Auto merge of #102732 - RalfJung:assert_unsafe_precondition2, r=bjorn3
nicer errors from assert_unsafe_precondition This makes the errors shown by cargo-careful nicer, and since `panic_no_unwind` is `nounwind noreturn` it hopefully doesn't have bad codegen impact. Thanks to `@bjorn3` for the hint! Would be nice if we could somehow supply our own (static) message to print, currently it always prints `panic in a function that cannot unwind`. But still, this is better than before.
2 parents efbbf5d + b99b68d commit 360757f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/hir-def/src/builtin_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
379379
// ==========================================================================
380380

381381
rustc_attr!(rustc_allocator, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
382-
rustc_attr!(rustc_allocator_nounwind, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
382+
rustc_attr!(rustc_nounwind, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
383383
gated!(
384384
alloc_error_handler, Normal, template!(Word), WarnFollowing,
385385
experimental!(alloc_error_handler)

0 commit comments

Comments
 (0)