Clarify core::panic::Location's docs on ordering.

Co-authored-by: Simon Sapin <simon.sapin@exyr.org>
This commit is contained in:
Adam Perry 2020-07-19 11:36:24 -07:00 committed by GitHub
parent d275739c09
commit 416dc4b978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,9 +176,9 @@ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
///
/// # 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")]