Skip to content

Commit

Permalink
Fixed some intra-docs links in library/core
Browse files Browse the repository at this point in the history
  • Loading branch information
Amjad50 committed Sep 17, 2020
1 parent 7bdb5de commit 3323a26
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
4 changes: 0 additions & 4 deletions library/core/src/ascii.rs
Expand Up @@ -6,8 +6,6 @@
//!
//! The [`escape_default`] function provides an iterator over the bytes of an
//! escaped version of the character given.
//!
//! [`escape_default`]: fn.escape_default.html

#![stable(feature = "core_ascii", since = "1.26.0")]

Expand All @@ -20,8 +18,6 @@ use crate::str::from_utf8_unchecked;
///
/// This `struct` is created by the [`escape_default`] function. See its
/// documentation for more.
///
/// [`escape_default`]: fn.escape_default.html
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Clone)]
pub struct EscapeDefault {
Expand Down
2 changes: 0 additions & 2 deletions library/core/src/option.rs
Expand Up @@ -1502,8 +1502,6 @@ unsafe impl<A> TrustedLen for IterMut<'_, A> {}
/// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
///
/// This `struct` is created by the [`Option::into_iter`] function.
///
/// [`Option::into_iter`]: enum.Option.html#method.into_iter
#[derive(Clone, Debug)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IntoIter<A> {
Expand Down
21 changes: 5 additions & 16 deletions library/core/src/str/mod.rs
Expand Up @@ -4,7 +4,7 @@
//!
//! For more details, see the [`std::str`] module.
//!
//! [`std::str`]: self
//! [`std::str`]: ../../std/str/index.html

#![stable(feature = "rust1", since = "1.0.0")]

Expand Down Expand Up @@ -84,9 +84,6 @@ pub trait FromStr: Sized {
/// when the string is ill-formatted return an error specific to the
/// inside [`Err`]. The error type is specific to implementation of the trait.
///
/// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
///
/// # Examples
///
/// Basic usage with [`i32`][ithirtytwo], a type that implements `FromStr`:
Expand Down Expand Up @@ -269,11 +266,9 @@ impl Utf8Error {
///
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
/// incur the overhead of the validity check, there is an unsafe version of
/// this function, [`from_utf8_unchecked`][fromutf8u], which has the same
/// this function, [`from_utf8_unchecked`], which has the same
/// behavior but skips the check.
///
/// [fromutf8u]: fn.from_utf8_unchecked.html
///
/// If you need a `String` instead of a `&str`, consider
/// [`String::from_utf8`][string].
///
Expand Down Expand Up @@ -318,11 +313,9 @@ impl Utf8Error {
/// assert!(str::from_utf8(&sparkle_heart).is_err());
/// ```
///
/// See the docs for [`Utf8Error`][error] for more details on the kinds of
/// See the docs for [`Utf8Error`] for more details on the kinds of
/// errors that can be returned.
///
/// [error]: struct.Utf8Error.html
///
/// A "stack allocated string":
///
/// ```
Expand Down Expand Up @@ -371,10 +364,8 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
///
/// assert!(str::from_utf8_mut(&mut invalid).is_err());
/// ```
/// See the docs for [`Utf8Error`][error] for more details on the kinds of
/// See the docs for [`Utf8Error`] for more details on the kinds of
/// errors that can be returned.
///
/// [error]: struct.Utf8Error.html
#[stable(feature = "str_mut_extras", since = "1.20.0")]
pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
run_utf8_validation(v)?;
Expand All @@ -385,9 +376,7 @@ pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
/// Converts a slice of bytes to a string slice without checking
/// that the string contains valid UTF-8.
///
/// See the safe version, [`from_utf8`][fromutf8], for more information.
///
/// [fromutf8]: fn.from_utf8.html
/// See the safe version, [`from_utf8`], for more information.
///
/// # Safety
///
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/str/pattern.rs
Expand Up @@ -28,7 +28,7 @@
//! assert_eq!(s.find(|c: char| c.is_ascii_punctuation()), Some(35));
//! ```
//!
//! [pattern-impls]: trait.Pattern.html#implementors
//! [pattern-impls]: Pattern#implementors

#![unstable(
feature = "pattern",
Expand Down

0 comments on commit 3323a26

Please sign in to comment.