Skip to content

Commit

Permalink
Remove unnecessary reference links in documentation comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
olson-sean-k committed Oct 22, 2024
1 parent 17be24a commit 01f3471
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 42 deletions.
4 changes: 1 addition & 3 deletions src/array1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! Non-empty [arrays][`array`].
//!
//! [`array`]: prim@array
//! Non-empty [arrays][`prim@array`].

use core::borrow::{Borrow, BorrowMut};
use core::num::NonZeroUsize;
Expand Down
2 changes: 0 additions & 2 deletions src/array_vec1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! A non-empty [`ArrayVec`].
//!
//! [`ArrayVec`]: arrayvec::ArrayVec

#![cfg(feature = "arrayvec")]
#![cfg_attr(docsrs, doc(cfg(feature = "arrayvec")))]
Expand Down
2 changes: 0 additions & 2 deletions src/btree_map1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! A non-empty [`BTreeMap`][`btree_map`].
//!
//! [`btree_map`]: alloc::collections::btree_map

#![cfg(feature = "alloc")]
#![cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
Expand Down
2 changes: 0 additions & 2 deletions src/btree_set1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! A non-empty [`BTreeSet`][`btree_set`].
//!
//! [`btree_set`]: alloc::collections::btree_set

#![cfg(feature = "alloc")]
#![cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
Expand Down
1 change: 0 additions & 1 deletion src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/// non-empty guarantee.
///
/// [`BTreeSet1::split_off_tail`]: crate::btree_set1::BTreeSet1::split_off_tail
/// [`Ord`]: ::core::cmp::Ord
#[diagnostic::on_unimplemented(
message = "`{Self}` may not implement consistent total ordering",
label = "types used here must implement consistent total ordering for soundness",
Expand Down
2 changes: 0 additions & 2 deletions src/iter1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! Non-empty [iterators][`iter`].
//!
//! [`iter`]: core::iter

// SAFETY: `Iterator1` relies on the behavior of certain iterator types in `core` to maintain its
// non-empty invariant, especially in unchecked constructions. Checked construction relies
Expand Down
25 changes: 2 additions & 23 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
//! - [`ArrayVec1`][`array_vec1`]
//! - [`BTreeMap1`][`btree_map1`]
//! - [`BTreeSet1`][`btree_set1`]
//! - [`Vec1`][`vec1`]
//! - [`Vec1`][`mod@vec1`]
//! - [`VecDeque1`][`vec_deque1`]
//!
//! Non-empty collections are represented with the [`NonEmpty`] type constructor. These types are
Expand Down Expand Up @@ -81,7 +81,7 @@
//! assert_eq!(y, 3);
//! ```
//!
//! See the [`slice1`] module.
//! See the [`slice1`][`mod@slice1`] module.
//!
//! ## Containers
//!
Expand Down Expand Up @@ -210,42 +210,21 @@
//! Some features enable other crate and dependency features. For example, `std` enables `alloc`
//! and both of these features enable similar features in optional dependencies when applicable.
//!
//! [`alloc`]: alloc
//! [`Arc`]: alloc::sync::Arc
//! [`ArcSlice1`]: crate::sync1::ArcSlice1
//! [`ArcSlice1Ext`]: crate::sync1::ArcSlice1Ext
//! [`Array1`]: crate::array1::Array1
//! [`ArrayVec`]: arrayvec::ArrayVec
//! [`array_vec1`]: crate::array_vec1
//! [`ArrayVec1`]: crate::array_vec1::ArrayVec1
//! [`BoxedSlice1`]: crate::boxed1::BoxedSlice1
//! [`btree_map1`]: crate::btree_map1
//! [`BTreeMap1`]: crate::btree_map1::BTreeMap1
//! [`btree_set1`]: crate::btree_set1
//! [`BTreeSet1`]: crate::btree_set1::BTreeSet1
//! [`core`]: core
//! [`CowSlice1`]: crate::vec1::CowSlice1
//! [`ExtendUntil`]: crate::iter1::ExtendUntil
//! [`FromIteratorUntil`]: crate::iter1::FromIteratorUntil
//! [`Iterator1`]: crate::iter1::Iterator1
//! [`Iterator1::map`]: crate::iter1::Iterator1::map
//! [`itertools`]: itertools
//! [`Option`]: core::option::Option
//! [`prelude`]: crate::prelude
//! [`Segment`]: crate::Segment
//! [`Segmentation`]: crate::Segmentation
//! [`serde`]: ::serde
//! [`Slice1`]: crate::slice1::Slice1
//! [`slice1!`]: crate::slice1::slice1!
//! [`std`]: std
//! [`std::io`]: std::io
//! [`Vacancy`]: crate::Vacancy
//! [`Vec`]: alloc::vec::Vec
//! [`vec1`]: mod@crate::vec1
//! [`Vec1`]: crate::vec1::Vec1
//! [`vec1!`]: macro@crate::vec1::vec1!
//! [`vec_deque1`]: crate::vec_deque1
//! [`VecDeque1`]: crate::vec_deque1::VecDeque1

// TODO: At time of writing, it is not possible to specify or enable features required for
// documentation examples without explicitly applying `doc` attributes. These attributes harm
Expand Down
4 changes: 1 addition & 3 deletions src/slice1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! A non-empty [slice][`slice`].
//!
//! [`slice`]: prim@slice
//! A non-empty [slice][`prim@slice`].

use core::fmt::{self, Debug, Formatter};
use core::mem;
Expand Down
2 changes: 0 additions & 2 deletions src/vec1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! A non-empty [`Vec`][`vec`].
//!
//! [`vec`]: mod@alloc::vec

#![cfg(feature = "alloc")]
#![cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
Expand Down
2 changes: 0 additions & 2 deletions src/vec_deque1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! A non-empty [`VecDeque`][`vec_deque`].
//!
//! [`vec_deque`]: alloc::collections::vec_deque

#![cfg(feature = "alloc")]
#![cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
Expand Down

0 comments on commit 01f3471

Please sign in to comment.