Rollup merge of #76845 - Amjad50:fix-intra-docs-links, r=jyn514
Use intra docs links in core::{ascii, option, str, pattern, hash::map} Partial fix for #75080 @rustbot modify labels: T-doc A-intra-doc-links r? @jyn514
This commit is contained in:
commit
6d0890ec83
5 changed files with 6 additions and 29 deletions
|
@ -6,8 +6,6 @@
|
||||||
//!
|
//!
|
||||||
//! The [`escape_default`] function provides an iterator over the bytes of an
|
//! The [`escape_default`] function provides an iterator over the bytes of an
|
||||||
//! escaped version of the character given.
|
//! escaped version of the character given.
|
||||||
//!
|
|
||||||
//! [`escape_default`]: fn.escape_default.html
|
|
||||||
|
|
||||||
#![stable(feature = "core_ascii", since = "1.26.0")]
|
#![stable(feature = "core_ascii", since = "1.26.0")]
|
||||||
|
|
||||||
|
@ -20,8 +18,6 @@ use crate::str::from_utf8_unchecked;
|
||||||
///
|
///
|
||||||
/// This `struct` is created by the [`escape_default`] function. See its
|
/// This `struct` is created by the [`escape_default`] function. See its
|
||||||
/// documentation for more.
|
/// documentation for more.
|
||||||
///
|
|
||||||
/// [`escape_default`]: fn.escape_default.html
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct EscapeDefault {
|
pub struct EscapeDefault {
|
||||||
|
|
|
@ -1502,8 +1502,6 @@ unsafe impl<A> TrustedLen for IterMut<'_, A> {}
|
||||||
/// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
|
/// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
|
||||||
///
|
///
|
||||||
/// This `struct` is created by the [`Option::into_iter`] function.
|
/// This `struct` is created by the [`Option::into_iter`] function.
|
||||||
///
|
|
||||||
/// [`Option::into_iter`]: enum.Option.html#method.into_iter
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub struct IntoIter<A> {
|
pub struct IntoIter<A> {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
//!
|
//!
|
||||||
//! For more details, see the [`std::str`] module.
|
//! For more details, see the [`std::str`] module.
|
||||||
//!
|
//!
|
||||||
//! [`std::str`]: self
|
//! [`std::str`]: ../../std/str/index.html
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
||||||
|
@ -84,9 +84,6 @@ pub trait FromStr: Sized {
|
||||||
/// when the string is ill-formatted return an error specific to the
|
/// when the string is ill-formatted return an error specific to the
|
||||||
/// inside [`Err`]. The error type is specific to implementation of the trait.
|
/// 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
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// Basic usage with [`i32`][ithirtytwo], a type that implements `FromStr`:
|
/// Basic usage with [`i32`][ithirtytwo], a type that implements `FromStr`:
|
||||||
|
@ -269,11 +266,9 @@ impl Utf8Error {
|
||||||
///
|
///
|
||||||
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
|
/// 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
|
/// 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.
|
/// behavior but skips the check.
|
||||||
///
|
///
|
||||||
/// [fromutf8u]: fn.from_utf8_unchecked.html
|
|
||||||
///
|
|
||||||
/// If you need a `String` instead of a `&str`, consider
|
/// If you need a `String` instead of a `&str`, consider
|
||||||
/// [`String::from_utf8`][string].
|
/// [`String::from_utf8`][string].
|
||||||
///
|
///
|
||||||
|
@ -318,11 +313,9 @@ impl Utf8Error {
|
||||||
/// assert!(str::from_utf8(&sparkle_heart).is_err());
|
/// 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.
|
/// errors that can be returned.
|
||||||
///
|
///
|
||||||
/// [error]: struct.Utf8Error.html
|
|
||||||
///
|
|
||||||
/// A "stack allocated string":
|
/// A "stack allocated string":
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -371,10 +364,8 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
|
||||||
///
|
///
|
||||||
/// assert!(str::from_utf8_mut(&mut invalid).is_err());
|
/// 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.
|
/// errors that can be returned.
|
||||||
///
|
|
||||||
/// [error]: struct.Utf8Error.html
|
|
||||||
#[stable(feature = "str_mut_extras", since = "1.20.0")]
|
#[stable(feature = "str_mut_extras", since = "1.20.0")]
|
||||||
pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
|
pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
|
||||||
run_utf8_validation(v)?;
|
run_utf8_validation(v)?;
|
||||||
|
@ -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
|
/// Converts a slice of bytes to a string slice without checking
|
||||||
/// that the string contains valid UTF-8.
|
/// that the string contains valid UTF-8.
|
||||||
///
|
///
|
||||||
/// See the safe version, [`from_utf8`][fromutf8], for more information.
|
/// See the safe version, [`from_utf8`], for more information.
|
||||||
///
|
|
||||||
/// [fromutf8]: fn.from_utf8.html
|
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
//! assert_eq!(s.find(|c: char| c.is_ascii_punctuation()), Some(35));
|
//! assert_eq!(s.find(|c: char| c.is_ascii_punctuation()), Some(35));
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! [pattern-impls]: trait.Pattern.html#implementors
|
//! [pattern-impls]: Pattern#implementors
|
||||||
|
|
||||||
#![unstable(
|
#![unstable(
|
||||||
feature = "pattern",
|
feature = "pattern",
|
||||||
|
|
|
@ -1298,9 +1298,7 @@ pub struct RawEntryBuilderMut<'a, K: 'a, V: 'a, S: 'a> {
|
||||||
/// This `enum` is constructed through the [`raw_entry_mut`] method on [`HashMap`],
|
/// This `enum` is constructed through the [`raw_entry_mut`] method on [`HashMap`],
|
||||||
/// then calling one of the methods of that [`RawEntryBuilderMut`].
|
/// then calling one of the methods of that [`RawEntryBuilderMut`].
|
||||||
///
|
///
|
||||||
/// [`Entry`]: enum.Entry.html
|
|
||||||
/// [`raw_entry_mut`]: HashMap::raw_entry_mut
|
/// [`raw_entry_mut`]: HashMap::raw_entry_mut
|
||||||
/// [`RawEntryBuilderMut`]: struct.RawEntryBuilderMut.html
|
|
||||||
#[unstable(feature = "hash_raw_entry", issue = "56167")]
|
#[unstable(feature = "hash_raw_entry", issue = "56167")]
|
||||||
pub enum RawEntryMut<'a, K: 'a, V: 'a, S: 'a> {
|
pub enum RawEntryMut<'a, K: 'a, V: 'a, S: 'a> {
|
||||||
/// An occupied entry.
|
/// An occupied entry.
|
||||||
|
@ -1705,8 +1703,6 @@ impl<K: Debug, V: Debug> Debug for Entry<'_, K, V> {
|
||||||
|
|
||||||
/// A view into an occupied entry in a `HashMap`.
|
/// A view into an occupied entry in a `HashMap`.
|
||||||
/// It is part of the [`Entry`] enum.
|
/// It is part of the [`Entry`] enum.
|
||||||
///
|
|
||||||
/// [`Entry`]: enum.Entry.html
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
|
pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
|
||||||
base: base::RustcOccupiedEntry<'a, K, V>,
|
base: base::RustcOccupiedEntry<'a, K, V>,
|
||||||
|
@ -1721,8 +1717,6 @@ impl<K: Debug, V: Debug> Debug for OccupiedEntry<'_, K, V> {
|
||||||
|
|
||||||
/// A view into a vacant entry in a `HashMap`.
|
/// A view into a vacant entry in a `HashMap`.
|
||||||
/// It is part of the [`Entry`] enum.
|
/// It is part of the [`Entry`] enum.
|
||||||
///
|
|
||||||
/// [`Entry`]: enum.Entry.html
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub struct VacantEntry<'a, K: 'a, V: 'a> {
|
pub struct VacantEntry<'a, K: 'a, V: 'a> {
|
||||||
base: base::RustcVacantEntry<'a, K, V>,
|
base: base::RustcVacantEntry<'a, K, V>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue