1
- // `library/{std,core}/src/primitive_docs.rs` should have the same contents.
2
- // These are different files so that relative links work properly without
3
- // having to have `CARGO_PKG_NAME` set, but conceptually they should always be the same.
4
1
#[ rustc_doc_primitive = "bool" ]
5
2
#[ doc( alias = "true" ) ]
6
3
#[ doc( alias = "false" ) ]
@@ -106,7 +103,7 @@ mod prim_bool {}
106
103
/// behaviour of the `!` type - expressions with type `!` will coerce into any other type.
107
104
///
108
105
/// [`u32`]: prim@u32
109
- #[ doc = concat ! ( "[`exit`]: " , include_str! ( "../primitive_docs/process_exit.md" ) ) ]
106
+ #[ doc = concat ! ( "[`exit`]: " , "../std/process/fn.exit.html" ) ]
110
107
///
111
108
/// # `!` and generics
112
109
///
@@ -191,7 +188,7 @@ mod prim_bool {}
191
188
/// because `!` coerces to `Result<!, ConnectionError>` automatically.
192
189
///
193
190
/// [`String::from_str`]: str::FromStr::from_str
194
- #[ doc = concat ! ( "[`String`]: " , include_str! ( "../primitive_docs/string_string.md" ) ) ]
191
+ #[ doc = concat ! ( "[`String`]: " , "../std/string/struct.String.html" ) ]
195
192
/// [`FromStr`]: str::FromStr
196
193
///
197
194
/// # `!` and traits
@@ -267,7 +264,7 @@ mod prim_bool {}
267
264
/// `impl` for this which simply panics, but the same is true for any type (we could `impl
268
265
/// Default` for (eg.) [`File`] by just making [`default()`] panic.)
269
266
///
270
- #[ doc = concat ! ( "[`File`]: " , include_str! ( "../primitive_docs/fs_file.md" ) ) ]
267
+ #[ doc = concat ! ( "[`File`]: " , "../std/fs/struct.File.html" ) ]
271
268
/// [`Debug`]: fmt::Debug
272
269
/// [`default()`]: Default::default
273
270
///
@@ -355,7 +352,7 @@ mod prim_never {}
355
352
/// assert_eq!(5, s.len() * std::mem::size_of::<u8>());
356
353
/// ```
357
354
///
358
- #[ doc = concat ! ( "[`String`]: " , include_str! ( "../primitive_docs/string_string.md" ) ) ]
355
+ #[ doc = concat ! ( "[`String`]: " , "../std/string/struct.String.html" ) ]
359
356
///
360
357
/// As always, remember that a human intuition for 'character' might not map to
361
358
/// Unicode's definitions. For example, despite looking similar, the 'é'
@@ -572,7 +569,7 @@ impl Copy for () {
572
569
/// [`null_mut`]: ptr::null_mut
573
570
/// [`is_null`]: pointer::is_null
574
571
/// [`offset`]: pointer::offset
575
- #[ doc = concat ! ( "[`into_raw`]: " , include_str! ( "../primitive_docs/box_into_raw.md" ) ) ]
572
+ #[ doc = concat ! ( "[`into_raw`]: " , "../std/boxed/struct.Box.html#method.into_raw" ) ]
576
573
/// [`write`]: ptr::write
577
574
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
578
575
mod prim_pointer { }
@@ -1361,7 +1358,7 @@ mod prim_usize {}
1361
1358
///
1362
1359
/// [`std::fmt`]: fmt
1363
1360
/// [`Hash`]: hash::Hash
1364
- #[ doc = concat ! ( "[`ToSocketAddrs`]: " , include_str! ( "../primitive_docs/net_tosocketaddrs.md" ) ) ]
1361
+ #[ doc = concat ! ( "[`ToSocketAddrs`]: " , "../std/net/trait.ToSocketAddrs.html" ) ]
1365
1362
///
1366
1363
/// `&mut T` references get all of the above except `ToSocketAddrs`, plus the following, if `T`
1367
1364
/// implements that trait:
@@ -1381,10 +1378,10 @@ mod prim_usize {}
1381
1378
///
1382
1379
/// [`FusedIterator`]: iter::FusedIterator
1383
1380
/// [`TrustedLen`]: iter::TrustedLen
1384
- #[ doc = concat ! ( "[`Seek`]: " , include_str! ( "../primitive_docs/io_seek.md" ) ) ]
1385
- #[ doc = concat ! ( "[`BufRead`]: " , include_str! ( "../primitive_docs/io_bufread.md" ) ) ]
1386
- #[ doc = concat ! ( "[`Read`]: " , include_str! ( "../primitive_docs/io_read.md" ) ) ]
1387
- #[ doc = concat ! ( "[`io::Write`]: " , include_str! ( "../primitive_docs/io_write.md" ) ) ]
1381
+ #[ doc = concat ! ( "[`Seek`]: " , "../std/io/trait.Seek.html" ) ]
1382
+ #[ doc = concat ! ( "[`BufRead`]: " , "../std/io/trait.BufRead.html" ) ]
1383
+ #[ doc = concat ! ( "[`Read`]: " , "../std/io/trait.Read.html" ) ]
1384
+ #[ doc = concat ! ( "[`io::Write`]: " , "../std/io/trait.Write.html" ) ]
1388
1385
///
1389
1386
/// Note that due to method call deref coercion, simply calling a trait method will act like they
1390
1387
/// work on references as well as they do on owned values! The implementations described here are
0 commit comments