Skip to content

Commit 6f4681b

Browse files
committed
Convert str -> prim@str in std
1 parent 373432e commit 6f4681b

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

library/std/src/error.rs

+4
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ impl From<String> for Box<dyn Error> {
296296
impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> {
297297
/// Converts a [`str`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
298298
///
299+
/// [`str`]: prim@str
300+
///
299301
/// # Examples
300302
///
301303
/// ```
@@ -317,6 +319,8 @@ impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> {
317319
impl From<&str> for Box<dyn Error> {
318320
/// Converts a [`str`] into a box of dyn [`Error`].
319321
///
322+
/// [`str`]: prim@str
323+
///
320324
/// # Examples
321325
///
322326
/// ```

library/std/src/ffi/c_str.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use crate::sys;
6969
/// extern functions. See the documentation for that function for a
7070
/// discussion on ensuring the lifetime of the raw pointer.
7171
///
72-
/// [`&str`]: str
72+
/// [`&str`]: prim@str
7373
/// [slice.as_ptr]: ../primitive.slice.html#method.as_ptr
7474
/// [slice.len]: ../primitive.slice.html#method.len
7575
/// [`Deref`]: ops::Deref
@@ -180,7 +180,7 @@ pub struct CString {
180180
/// println!("string: {}", my_string_safe());
181181
/// ```
182182
///
183-
/// [`&str`]: str
183+
/// [`&str`]: prim@str
184184
#[derive(Hash)]
185185
#[stable(feature = "rust1", since = "1.0.0")]
186186
// FIXME:
@@ -1351,7 +1351,7 @@ impl CStr {
13511351
/// function will return the corresponding [`&str`] slice. Otherwise,
13521352
/// it will return an error with details of where UTF-8 validation failed.
13531353
///
1354-
/// [`&str`]: str
1354+
/// [`&str`]: prim@str
13551355
///
13561356
/// # Examples
13571357
///
@@ -1379,6 +1379,7 @@ impl CStr {
13791379
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a
13801380
/// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result.
13811381
///
1382+
/// [`str`]: prim@str
13821383
/// [`Borrowed`]: Cow::Borrowed
13831384
/// [`Owned`]: Cow::Owned
13841385
/// [U+FFFD]: crate::char::REPLACEMENT_CHARACTER

library/std/src/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ where
480480
/// ```
481481
///
482482
/// [`read()`]: Read::read
483-
/// [`&str`]: str
483+
/// [`&str`]: prim@str
484484
/// [`std::io`]: self
485485
/// [`File`]: crate::fs::File
486486
/// [slice]: ../../std/primitive.slice.html

library/std/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
//! [`Vec<T>`]: vec::Vec
173173
//! [`atomic`]: sync::atomic
174174
//! [`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
175+
//! [`str`]: prim@str
175176
//! [`mpsc`]: sync::mpsc
176177
//! [`std::cmp`]: cmp
177178
//! [`std::slice`]: slice

0 commit comments

Comments
 (0)