about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2021-04-28 08:35:21 -0700
committerDavid Tolnay <dtolnay@gmail.com>2021-07-30 10:40:02 -0700
commit76e73b74a65b25d7c2fc25e006e42e3b4c41027c (patch)
treefb6bc3d28d3d17b246e29ef60641c15344308cd4 /library/core/src
parentd7c82ba4a19a44ddb505daa9833cad8b6a624ec6 (diff)
downloadrust-76e73b74a65b25d7c2fc25e006e42e3b4c41027c.tar.gz
rust-76e73b74a65b25d7c2fc25e006e42e3b4c41027c.zip
Fix separation of public vs internal parts of Location
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/panic/location.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/core/src/panic/location.rs b/library/core/src/panic/location.rs
index 6c1dc8bd045..0a97388cc2f 100644
--- a/library/core/src/panic/location.rs
+++ b/library/core/src/panic/location.rs
@@ -83,18 +83,6 @@ impl<'a> Location<'a> {
     pub const fn caller() -> &'static Location<'static> {
         crate::intrinsics::caller_location()
     }
-}
-
-impl<'a> Location<'a> {
-    #![unstable(
-        feature = "panic_internals",
-        reason = "internal details of the implementation of the `panic!` and related macros",
-        issue = "none"
-    )]
-    #[doc(hidden)]
-    pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
-        Location { file, line, col }
-    }
 
     /// Returns the name of the source file from which the panic originated.
     ///
@@ -179,6 +167,18 @@ impl<'a> Location<'a> {
     }
 }
 
+#[unstable(
+    feature = "panic_internals",
+    reason = "internal details of the implementation of the `panic!` and related macros",
+    issue = "none"
+)]
+impl<'a> Location<'a> {
+    #[doc(hidden)]
+    pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
+        Location { file, line, col }
+    }
+}
+
 #[stable(feature = "panic_hook_display", since = "1.26.0")]
 impl fmt::Display for Location<'_> {
     fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {