Skip to content

Commit 416dc4b

Browse files
anpSimonSapin
andauthored
Clarify core::panic::Location's docs on ordering.
Co-authored-by: Simon Sapin <[email protected]>
1 parent d275739 commit 416dc4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/panic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ impl fmt::Display for PanicInfo<'_> {
176176
///
177177
/// # Comparisons
178178
///
179-
/// Comparisons for equality and ordering are made in file, line, then column priority. Such
180-
/// comparisons can occasionally have surprising results. See [`Location::file`]'s documentation for
181-
/// more discussion.
179+
/// Comparisons for equality and ordering are made in file, line, then column priority.
180+
/// Files are compared as strings, not `Path`, which could be unexpected.
181+
/// See [`Location::file`]'s documentation for more discussion.
182182
#[lang = "panic_location"]
183183
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
184184
#[stable(feature = "panic_hooks", since = "1.10.0")]

0 commit comments

Comments
 (0)