mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Rollup merge of #75464 - poliorcetics:intra-links-panic-and-ascii, r=jyn514
Move to intra doc links for ascii.rs and panic.rs Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc I also updated the doc to fix the wording in `AsciiExt` since it is now deprecated. The two file are small changes so I bundled them together. Some links could not be changed to make them work, I believe those are known issues with primitive types.
This commit is contained in:
commit
d18719bbaf
@ -10,9 +10,6 @@
|
||||
//!
|
||||
//! The [`escape_default`] function provides an iterator over the bytes of an
|
||||
//! escaped version of the character given.
|
||||
//!
|
||||
//! [`AsciiExt`]: trait.AsciiExt.html
|
||||
//! [`escape_default`]: fn.escape_default.html
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
@ -52,7 +49,7 @@ pub trait AsciiExt {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This method will be deprecated in favor of the identically-named
|
||||
/// This method is deprecated in favor of the identically-named
|
||||
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn is_ascii(&self) -> bool;
|
||||
@ -69,10 +66,10 @@ pub trait AsciiExt {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This method will be deprecated in favor of the identically-named
|
||||
/// This method is deprecated in favor of the identically-named
|
||||
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
|
||||
///
|
||||
/// [`make_ascii_uppercase`]: #tymethod.make_ascii_uppercase
|
||||
/// [`make_ascii_uppercase`]: AsciiExt::make_ascii_uppercase
|
||||
/// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(deprecated)]
|
||||
@ -90,10 +87,10 @@ pub trait AsciiExt {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This method will be deprecated in favor of the identically-named
|
||||
/// This method is deprecated in favor of the identically-named
|
||||
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
|
||||
///
|
||||
/// [`make_ascii_lowercase`]: #tymethod.make_ascii_lowercase
|
||||
/// [`make_ascii_lowercase`]: AsciiExt::make_ascii_lowercase
|
||||
/// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(deprecated)]
|
||||
@ -106,7 +103,7 @@ pub trait AsciiExt {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This method will be deprecated in favor of the identically-named
|
||||
/// This method is deprecated in favor of the identically-named
|
||||
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
|
||||
@ -121,10 +118,10 @@ pub trait AsciiExt {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This method will be deprecated in favor of the identically-named
|
||||
/// This method is deprecated in favor of the identically-named
|
||||
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
|
||||
///
|
||||
/// [`to_ascii_uppercase`]: #tymethod.to_ascii_uppercase
|
||||
/// [`to_ascii_uppercase`]: AsciiExt::to_ascii_uppercase
|
||||
#[stable(feature = "ascii", since = "1.9.0")]
|
||||
fn make_ascii_uppercase(&mut self);
|
||||
|
||||
@ -138,10 +135,10 @@ pub trait AsciiExt {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This method will be deprecated in favor of the identically-named
|
||||
/// This method is deprecated in favor of the identically-named
|
||||
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
|
||||
///
|
||||
/// [`to_ascii_lowercase`]: #tymethod.to_ascii_lowercase
|
||||
/// [`to_ascii_lowercase`]: AsciiExt::to_ascii_lowercase
|
||||
#[stable(feature = "ascii", since = "1.9.0")]
|
||||
fn make_ascii_lowercase(&mut self);
|
||||
}
|
||||
|
@ -30,10 +30,6 @@ pub use core::panic::{Location, PanicInfo};
|
||||
/// purpose of this trait is to encode what types are safe to cross a [`catch_unwind`]
|
||||
/// boundary with no fear of unwind safety.
|
||||
///
|
||||
/// [`Send`]: ../marker/trait.Send.html
|
||||
/// [`Sync`]: ../marker/trait.Sync.html
|
||||
/// [`catch_unwind`]: ./fn.catch_unwind.html
|
||||
///
|
||||
/// ## What is unwind safety?
|
||||
///
|
||||
/// In Rust a function can "return" early if it either panics or calls a
|
||||
@ -99,8 +95,6 @@ pub use core::panic::{Location, PanicInfo};
|
||||
/// above, the lack of `unsafe` means it is mostly an advisory. The
|
||||
/// [`AssertUnwindSafe`] wrapper struct can be used to force this trait to be
|
||||
/// implemented for any closed over variables passed to `catch_unwind`.
|
||||
///
|
||||
/// [`AssertUnwindSafe`]: ./struct.AssertUnwindSafe.html
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "the type `{Self}` may not be safely transferred across an unwind boundary",
|
||||
@ -116,9 +110,6 @@ pub auto trait UnwindSafe {}
|
||||
///
|
||||
/// This is a "helper marker trait" used to provide impl blocks for the
|
||||
/// [`UnwindSafe`] trait, for more information see that documentation.
|
||||
///
|
||||
/// [`UnsafeCell`]: ../cell/struct.UnsafeCell.html
|
||||
/// [`UnwindSafe`]: ./trait.UnwindSafe.html
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "the type `{Self}` may contain interior mutability and a reference may not be safely \
|
||||
@ -138,7 +129,6 @@ pub auto trait RefUnwindSafe {}
|
||||
/// account. This wrapper struct is useful for a quick and lightweight
|
||||
/// annotation that a variable is indeed unwind safe.
|
||||
///
|
||||
/// [`catch_unwind`]: ./fn.catch_unwind.html
|
||||
/// # Examples
|
||||
///
|
||||
/// One way to use `AssertUnwindSafe` is to assert that the entire closure
|
||||
@ -352,8 +342,6 @@ impl<F: Future> Future for AssertUnwindSafe<F> {
|
||||
/// can fail on a regular basis. Additionally, this function is not guaranteed
|
||||
/// to catch all panics, see the "Notes" section below.
|
||||
///
|
||||
/// [`Result`]: ../result/enum.Result.html
|
||||
///
|
||||
/// The closure provided is required to adhere to the [`UnwindSafe`] trait to ensure
|
||||
/// that all captured variables are safe to cross this boundary. The purpose of
|
||||
/// this bound is to encode the concept of [exception safety][rfc] in the type
|
||||
@ -362,9 +350,6 @@ impl<F: Future> Future for AssertUnwindSafe<F> {
|
||||
/// becomes a problem the [`AssertUnwindSafe`] wrapper struct can be used to quickly
|
||||
/// assert that the usage here is indeed unwind safe.
|
||||
///
|
||||
/// [`AssertUnwindSafe`]: ./struct.AssertUnwindSafe.html
|
||||
/// [`UnwindSafe`]: ./trait.UnwindSafe.html
|
||||
///
|
||||
/// [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1236-stabilize-catch-panic.md
|
||||
///
|
||||
/// # Notes
|
||||
@ -399,8 +384,6 @@ pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
|
||||
/// This is designed to be used in conjunction with [`catch_unwind`] to, for
|
||||
/// example, carry a panic across a layer of C code.
|
||||
///
|
||||
/// [`catch_unwind`]: ./fn.catch_unwind.html
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Note that panics in Rust are not always implemented via unwinding, but they
|
||||
|
Loading…
Reference in New Issue
Block a user