Skip to content

Commit 76e73b7

Browse files
committed
Fix separation of public vs internal parts of Location
1 parent d7c82ba commit 76e73b7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

library/core/src/panic/location.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@ impl<'a> Location<'a> {
8383
pub const fn caller() -> &'static Location<'static> {
8484
crate::intrinsics::caller_location()
8585
}
86-
}
87-
88-
impl<'a> Location<'a> {
89-
#![unstable(
90-
feature = "panic_internals",
91-
reason = "internal details of the implementation of the `panic!` and related macros",
92-
issue = "none"
93-
)]
94-
#[doc(hidden)]
95-
pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
96-
Location { file, line, col }
97-
}
9886

9987
/// Returns the name of the source file from which the panic originated.
10088
///
@@ -179,6 +167,18 @@ impl<'a> Location<'a> {
179167
}
180168
}
181169

170+
#[unstable(
171+
feature = "panic_internals",
172+
reason = "internal details of the implementation of the `panic!` and related macros",
173+
issue = "none"
174+
)]
175+
impl<'a> Location<'a> {
176+
#[doc(hidden)]
177+
pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
178+
Location { file, line, col }
179+
}
180+
}
181+
182182
#[stable(feature = "panic_hook_display", since = "1.26.0")]
183183
impl fmt::Display for Location<'_> {
184184
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

0 commit comments

Comments
 (0)