summary refs log tree commit diff
path: root/compiler/rustc_feature/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-01 05:56:47 +0000
committerbors <bors@rust-lang.org>2023-10-01 05:56:47 +0000
commit8fa7bdf191d8658e5ab670766ac0b2d40c7d83c2 (patch)
treefd128009072805b2b9f7d1208a6af4ef1b2c1220 /compiler/rustc_feature/src
parent361096fa4b77e7fd9effec0a7feef139565d7a25 (diff)
parent6a02baaa3d9c471577037a053ee8ed50a9327f7d (diff)
downloadrust-8fa7bdf191d8658e5ab670766ac0b2d40c7d83c2.tar.gz
rust-8fa7bdf191d8658e5ab670766ac0b2d40c7d83c2.zip
Auto merge of #115670 - Zoxc:outline-panic-macro-1, r=Mark-Simulacrum
Partially outline code inside the panic! macro

This outlines code inside the panic! macro in some cases. This is split out from https://github.com/rust-lang/rust/pull/115562 to exclude changes to rustc.
Diffstat (limited to 'compiler/rustc_feature/src')
-rw-r--r--compiler/rustc_feature/src/builtin_attrs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs
index 18397af565f..65e697c8f3b 100644
--- a/compiler/rustc_feature/src/builtin_attrs.rs
+++ b/compiler/rustc_feature/src/builtin_attrs.rs
@@ -666,6 +666,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
     rustc_attr!(
         rustc_do_not_const_check, Normal, template!(Word), WarnFollowing, INTERNAL_UNSTABLE
     ),
+    // Ensure the argument to this function is &&str during const-check.
+    rustc_attr!(
+        rustc_const_panic_str, Normal, template!(Word), WarnFollowing, INTERNAL_UNSTABLE
+    ),
 
     // ==========================================================================
     // Internal attributes, Layout related: