about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorAlexis Bourget <alexis.bourget@gmail.com>2020-09-23 00:31:37 +0200
committerAlexis Bourget <alexis.bourget@gmail.com>2020-09-23 00:31:37 +0200
commitec4e9cd12a380bb61791c489baaaae2e9454546d (patch)
tree1ac2774fcaee002a8f782aab125ed28198ab1e91 /library/alloc/src
parent87a5dec4db20aa4e45b0db63f762681de084ad58 (diff)
downloadrust-ec4e9cd12a380bb61791c489baaaae2e9454546d.tar.gz
rust-ec4e9cd12a380bb61791c489baaaae2e9454546d.zip
Use Self in alloc
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/collections/binary_heap.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/collections/binary_heap.rs b/library/alloc/src/collections/binary_heap.rs
index ea75fa21965..f2852b1cc2b 100644
--- a/library/alloc/src/collections/binary_heap.rs
+++ b/library/alloc/src/collections/binary_heap.rs
@@ -30,7 +30,7 @@
 //! // Explicitly implement the trait so the queue becomes a min-heap
 //! // instead of a max-heap.
 //! impl Ord for State {
-//!     fn cmp(&self, other: &State) -> Ordering {
+//!     fn cmp(&self, other: &Self) -> Ordering {
 //!         // Notice that the we flip the ordering on costs.
 //!         // In case of a tie we compare positions - this step is necessary
 //!         // to make implementations of `PartialEq` and `Ord` consistent.
@@ -41,7 +41,7 @@
 //!
 //! // `PartialOrd` needs to be implemented as well.
 //! impl PartialOrd for State {
-//!     fn partial_cmp(&self, other: &State) -> Option<Ordering> {
+//!     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
 //!         Some(self.cmp(other))
 //!     }
 //! }