Skip to content

Commit d18719b

Browse files
authored
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.
2 parents 5498367 + 0e010a6 commit d18719b

File tree

2 files changed

+10
-30
lines changed

2 files changed

+10
-30
lines changed

library/std/src/ascii.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
//!
1111
//! The [`escape_default`] function provides an iterator over the bytes of an
1212
//! escaped version of the character given.
13-
//!
14-
//! [`AsciiExt`]: trait.AsciiExt.html
15-
//! [`escape_default`]: fn.escape_default.html
1613
1714
#![stable(feature = "rust1", since = "1.0.0")]
1815

@@ -52,7 +49,7 @@ pub trait AsciiExt {
5249
///
5350
/// # Note
5451
///
55-
/// This method will be deprecated in favor of the identically-named
52+
/// This method is deprecated in favor of the identically-named
5653
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
5754
#[stable(feature = "rust1", since = "1.0.0")]
5855
fn is_ascii(&self) -> bool;
@@ -69,10 +66,10 @@ pub trait AsciiExt {
6966
///
7067
/// # Note
7168
///
72-
/// This method will be deprecated in favor of the identically-named
69+
/// This method is deprecated in favor of the identically-named
7370
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
7471
///
75-
/// [`make_ascii_uppercase`]: #tymethod.make_ascii_uppercase
72+
/// [`make_ascii_uppercase`]: AsciiExt::make_ascii_uppercase
7673
/// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
7774
#[stable(feature = "rust1", since = "1.0.0")]
7875
#[allow(deprecated)]
@@ -90,10 +87,10 @@ pub trait AsciiExt {
9087
///
9188
/// # Note
9289
///
93-
/// This method will be deprecated in favor of the identically-named
90+
/// This method is deprecated in favor of the identically-named
9491
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
9592
///
96-
/// [`make_ascii_lowercase`]: #tymethod.make_ascii_lowercase
93+
/// [`make_ascii_lowercase`]: AsciiExt::make_ascii_lowercase
9794
/// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
9895
#[stable(feature = "rust1", since = "1.0.0")]
9996
#[allow(deprecated)]
@@ -106,7 +103,7 @@ pub trait AsciiExt {
106103
///
107104
/// # Note
108105
///
109-
/// This method will be deprecated in favor of the identically-named
106+
/// This method is deprecated in favor of the identically-named
110107
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
111108
#[stable(feature = "rust1", since = "1.0.0")]
112109
fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
@@ -121,10 +118,10 @@ pub trait AsciiExt {
121118
///
122119
/// # Note
123120
///
124-
/// This method will be deprecated in favor of the identically-named
121+
/// This method is deprecated in favor of the identically-named
125122
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
126123
///
127-
/// [`to_ascii_uppercase`]: #tymethod.to_ascii_uppercase
124+
/// [`to_ascii_uppercase`]: AsciiExt::to_ascii_uppercase
128125
#[stable(feature = "ascii", since = "1.9.0")]
129126
fn make_ascii_uppercase(&mut self);
130127

@@ -138,10 +135,10 @@ pub trait AsciiExt {
138135
///
139136
/// # Note
140137
///
141-
/// This method will be deprecated in favor of the identically-named
138+
/// This method is deprecated in favor of the identically-named
142139
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
143140
///
144-
/// [`to_ascii_lowercase`]: #tymethod.to_ascii_lowercase
141+
/// [`to_ascii_lowercase`]: AsciiExt::to_ascii_lowercase
145142
#[stable(feature = "ascii", since = "1.9.0")]
146143
fn make_ascii_lowercase(&mut self);
147144
}

library/std/src/panic.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ pub use core::panic::{Location, PanicInfo};
3030
/// purpose of this trait is to encode what types are safe to cross a [`catch_unwind`]
3131
/// boundary with no fear of unwind safety.
3232
///
33-
/// [`Send`]: ../marker/trait.Send.html
34-
/// [`Sync`]: ../marker/trait.Sync.html
35-
/// [`catch_unwind`]: ./fn.catch_unwind.html
36-
///
3733
/// ## What is unwind safety?
3834
///
3935
/// In Rust a function can "return" early if it either panics or calls a
@@ -99,8 +95,6 @@ pub use core::panic::{Location, PanicInfo};
9995
/// above, the lack of `unsafe` means it is mostly an advisory. The
10096
/// [`AssertUnwindSafe`] wrapper struct can be used to force this trait to be
10197
/// implemented for any closed over variables passed to `catch_unwind`.
102-
///
103-
/// [`AssertUnwindSafe`]: ./struct.AssertUnwindSafe.html
10498
#[stable(feature = "catch_unwind", since = "1.9.0")]
10599
#[rustc_on_unimplemented(
106100
message = "the type `{Self}` may not be safely transferred across an unwind boundary",
@@ -116,9 +110,6 @@ pub auto trait UnwindSafe {}
116110
///
117111
/// This is a "helper marker trait" used to provide impl blocks for the
118112
/// [`UnwindSafe`] trait, for more information see that documentation.
119-
///
120-
/// [`UnsafeCell`]: ../cell/struct.UnsafeCell.html
121-
/// [`UnwindSafe`]: ./trait.UnwindSafe.html
122113
#[stable(feature = "catch_unwind", since = "1.9.0")]
123114
#[rustc_on_unimplemented(
124115
message = "the type `{Self}` may contain interior mutability and a reference may not be safely \
@@ -138,7 +129,6 @@ pub auto trait RefUnwindSafe {}
138129
/// account. This wrapper struct is useful for a quick and lightweight
139130
/// annotation that a variable is indeed unwind safe.
140131
///
141-
/// [`catch_unwind`]: ./fn.catch_unwind.html
142132
/// # Examples
143133
///
144134
/// One way to use `AssertUnwindSafe` is to assert that the entire closure
@@ -352,8 +342,6 @@ impl<F: Future> Future for AssertUnwindSafe<F> {
352342
/// can fail on a regular basis. Additionally, this function is not guaranteed
353343
/// to catch all panics, see the "Notes" section below.
354344
///
355-
/// [`Result`]: ../result/enum.Result.html
356-
///
357345
/// The closure provided is required to adhere to the [`UnwindSafe`] trait to ensure
358346
/// that all captured variables are safe to cross this boundary. The purpose of
359347
/// 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> {
362350
/// becomes a problem the [`AssertUnwindSafe`] wrapper struct can be used to quickly
363351
/// assert that the usage here is indeed unwind safe.
364352
///
365-
/// [`AssertUnwindSafe`]: ./struct.AssertUnwindSafe.html
366-
/// [`UnwindSafe`]: ./trait.UnwindSafe.html
367-
///
368353
/// [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1236-stabilize-catch-panic.md
369354
///
370355
/// # Notes
@@ -399,8 +384,6 @@ pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
399384
/// This is designed to be used in conjunction with [`catch_unwind`] to, for
400385
/// example, carry a panic across a layer of C code.
401386
///
402-
/// [`catch_unwind`]: ./fn.catch_unwind.html
403-
///
404387
/// # Notes
405388
///
406389
/// Note that panics in Rust are not always implemented via unwinding, but they

0 commit comments

Comments
 (0)