From 416dc4b978e5921cd0b20478a17f048dd378bdff Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Sun, 19 Jul 2020 11:36:24 -0700 Subject: [PATCH] Clarify core::panic::Location's docs on ordering. Co-authored-by: Simon Sapin --- src/libcore/panic.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs index aa3625ac019..94181084dbc 100644 --- a/src/libcore/panic.rs +++ b/src/libcore/panic.rs @@ -176,9 +176,9 @@ impl fmt::Display for PanicInfo<'_> { /// /// # Comparisons /// -/// Comparisons for equality and ordering are made in file, line, then column priority. Such -/// comparisons can occasionally have surprising results. See [`Location::file`]'s documentation for -/// more discussion. +/// Comparisons for equality and ordering are made in file, line, then column priority. +/// Files are compared as strings, not `Path`, which could be unexpected. +/// See [`Location::file`]'s documentation for more discussion. #[lang = "panic_location"] #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[stable(feature = "panic_hooks", since = "1.10.0")]