1818//! [dijkstra]: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
1919//! [sssp]: https://en.wikipedia.org/wiki/Shortest_path_problem
2020//! [dir_graph]: https://en.wikipedia.org/wiki/Directed_graph
21- //! [`BinaryHeap`]: struct.BinaryHeap.html
2221//!
2322//! ```
2423//! use std::cmp::Ordering;
146145//! }
147146//! ```
148147
149- #![ cfg_attr( rustc_1_52, deny( unsafe_op_in_unsafe_fn) ) ]
150- #![ cfg_attr( not( rustc_1_52) , allow( unused_unsafe) ) ]
148+ #![ deny( unsafe_op_in_unsafe_fn) ]
151149#![ allow( clippy:: needless_doctest_main) ]
152150#![ allow( missing_docs) ]
153151// #![stable(feature = "rust1", since = "1.0.0")]
@@ -264,10 +262,10 @@ use std::vec;
264262/// [`Ord`]: https://doc.rust-lang.org/stable/core/cmp/trait.Ord.html
265263/// [`Cell`]: https://doc.rust-lang.org/stable/core/cell/struct.Cell.html
266264/// [`RefCell`]: https://doc.rust-lang.org/stable/core/cell/struct.RefCell.html
267- /// [push]: #method. push
268- /// [pop]: #method. pop
269- /// [peek]: #method. peek
270- /// [peek\_mut]: #method. peek_mut
265+ /// [push]: BinaryHeap:: push
266+ /// [pop]: BinaryHeap:: pop
267+ /// [peek]: BinaryHeap:: peek
268+ /// [peek\_mut]: BinaryHeap:: peek_mut
271269// #[stable(feature = "rust1", since = "1.0.0")]
272270#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
273271pub struct BinaryHeap < T , C = MaxComparator > {
@@ -333,8 +331,7 @@ where
333331/// This `struct` is created by the [`peek_mut`] method on [`BinaryHeap`]. See
334332/// its documentation for more.
335333///
336- /// [`peek_mut`]: struct.BinaryHeap.html#method.peek_mut
337- /// [`BinaryHeap`]: struct.BinaryHeap.html
334+ /// [`peek_mut`]: BinaryHeap::peek_mut
338335// #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
339336pub struct PeekMut < ' a , T : ' a , C : ' a + Compare < T > > {
340337 heap : & ' a mut BinaryHeap < T , C > ,
@@ -1196,7 +1193,7 @@ impl<T, C> BinaryHeap<T, C> {
11961193 /// heap.push(4);
11971194 /// ```
11981195 ///
1199- /// [`reserve`]: #method. reserve
1196+ /// [`reserve`]: BinaryHeap:: reserve
12001197 // #[stable(feature = "rust1", since = "1.0.0")]
12011198 pub fn reserve_exact ( & mut self , additional : usize ) {
12021199 self . data . reserve_exact ( additional) ;
@@ -1468,8 +1465,6 @@ impl<T> Drop for Hole<'_, T> {
14681465///
14691466/// This `struct` is created by [`BinaryHeap::iter()`]. See its
14701467/// documentation for more.
1471- ///
1472- /// [`BinaryHeap::iter()`]: struct.BinaryHeap.html#method.iter
14731468#[ must_use = "iterators are lazy and do nothing unless consumed" ]
14741469// #[stable(feature = "rust1", since = "1.0.0")]
14751470pub struct Iter < ' a , T : ' a > {
@@ -1536,7 +1531,6 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
15361531/// This `struct` is created by [`BinaryHeap::into_iter()`]
15371532/// (provided by the [`IntoIterator`] trait). See its documentation for more.
15381533///
1539- /// [`BinaryHeap::into_iter()`]: struct.BinaryHeap.html#method.into_iter
15401534/// [`IntoIterator`]: https://doc.rust-lang.org/stable/core/iter/trait.IntoIterator.html
15411535// #[stable(feature = "rust1", since = "1.0.0")]
15421536#[ derive( Clone ) ]
@@ -1612,8 +1606,6 @@ impl<T, C: Compare<T>> Iterator for IntoIterSorted<T, C> {
16121606///
16131607/// This `struct` is created by [`BinaryHeap::drain()`]. See its
16141608/// documentation for more.
1615- ///
1616- /// [`BinaryHeap::drain()`]: struct.BinaryHeap.html#method.drain
16171609// #[stable(feature = "drain", since = "1.6.0")]
16181610#[ derive( Debug ) ]
16191611pub struct Drain < ' a , T : ' a > {
@@ -1682,11 +1674,6 @@ impl<T: Ord, const N: usize> From<[T; N]> for BinaryHeap<T> {
16821674 }
16831675}
16841676
1685- /// # Compatibility
1686- ///
1687- /// This trait is only implemented for Rust 1.41.0 or greater. For earlier versions, `Into<Vec<T>>`
1688- /// is implemented for `BinaryHeap<T, C>` instead.
1689- #[ cfg( rustc_1_41) ]
16901677impl < T , C > From < BinaryHeap < T , C > > for Vec < T > {
16911678 /// Converts a `BinaryHeap<T>` into a `Vec<T>`.
16921679 ///
@@ -1697,17 +1684,6 @@ impl<T, C> From<BinaryHeap<T, C>> for Vec<T> {
16971684 }
16981685}
16991686
1700- #[ cfg( not( rustc_1_41) ) ]
1701- impl < T , C > Into < Vec < T > > for BinaryHeap < T , C > {
1702- /// Converts a `BinaryHeap<T>` into a `Vec<T>`.
1703- ///
1704- /// This conversion requires no data movement or allocation, and has
1705- /// constant time complexity.
1706- fn into ( self ) -> Vec < T > {
1707- self . data
1708- }
1709- }
1710-
17111687// #[stable(feature = "rust1", since = "1.0.0")]
17121688impl < T : Ord > FromIterator < T > for BinaryHeap < T > {
17131689 fn from_iter < I : IntoIterator < Item = T > > ( iter : I ) -> Self {
0 commit comments