about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/edition_panic.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-04-26 07:56:48 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-04-26 13:29:20 +1000
commit30d6f63b4eb24b830c4cee5512401b0f4e61d289 (patch)
tree7380486d5b67e97e167ec09981428756d04eab82 /compiler/rustc_builtin_macros/src/edition_panic.rs
parent8dc84fa7d17980424b22909207056214663d0526 (diff)
downloadrust-30d6f63b4eb24b830c4cee5512401b0f4e61d289.tar.gz
rust-30d6f63b4eb24b830c4cee5512401b0f4e61d289.zip
Adjust some `pub`s.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/edition_panic.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/edition_panic.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/edition_panic.rs b/compiler/rustc_builtin_macros/src/edition_panic.rs
index bb3c83e8c0e..cc385bade47 100644
--- a/compiler/rustc_builtin_macros/src/edition_panic.rs
+++ b/compiler/rustc_builtin_macros/src/edition_panic.rs
@@ -16,7 +16,7 @@ use rustc_span::Span;
 ///
 /// `$crate` will refer to either the `std` or `core` crate depending on which
 /// one we're expanding from.
-pub fn expand_panic<'cx>(
+pub(crate) fn expand_panic<'cx>(
     cx: &'cx mut ExtCtxt<'_>,
     sp: Span,
     tts: TokenStream,
@@ -29,7 +29,7 @@ pub fn expand_panic<'cx>(
 /// - `$crate::panic::unreachable_2015!(...)` or
 /// - `$crate::panic::unreachable_2021!(...)`
 /// depending on the edition.
-pub fn expand_unreachable<'cx>(
+pub(crate) fn expand_unreachable<'cx>(
     cx: &'cx mut ExtCtxt<'_>,
     sp: Span,
     tts: TokenStream,
@@ -69,7 +69,7 @@ fn expand<'cx>(
     ))
 }
 
-pub fn use_panic_2021(mut span: Span) -> bool {
+pub(crate) fn use_panic_2021(mut span: Span) -> bool {
     // To determine the edition, we check the first span up the expansion
     // stack that does not have #[allow_internal_unstable(edition_panic)].
     // (To avoid using the edition of e.g. the assert!() or debug_assert!() definition.)