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.
41#[ rustc_doc_primitive = "bool" ]
52#[ doc( alias = "true" ) ]
63#[ doc( alias = "false" ) ]
@@ -106,7 +103,7 @@ mod prim_bool {}
106103/// behaviour of the `!` type - expressions with type `!` will coerce into any other type.
107104///
108105/// [`u32`]: prim@u32
109- # [ doc = concat ! ( " [`exit`]: " , include_str! ( " ../primitive_docs/process_exit.md" ) ) ]
106+ /// [`exit`]: ../std/process/fn.exit.html
110107///
111108/// # `!` and generics
112109///
@@ -191,7 +188,7 @@ mod prim_bool {}
191188/// because `!` coerces to `Result<!, ConnectionError>` automatically.
192189///
193190/// [`String::from_str`]: str::FromStr::from_str
194- # [ doc = concat ! ( " [`String`]: " , include_str! ( " ../primitive_docs/string_string.md" ) ) ]
191+ /// [`String`]: ../std/string/struct.String.html
195192/// [`FromStr`]: str::FromStr
196193///
197194/// # `!` and traits
@@ -267,7 +264,7 @@ mod prim_bool {}
267264/// `impl` for this which simply panics, but the same is true for any type (we could `impl
268265/// Default` for (eg.) [`File`] by just making [`default()`] panic.)
269266///
270- # [ doc = concat ! ( " [`File`]: " , include_str! ( " ../primitive_docs/fs_file.md" ) ) ]
267+ /// [`File`]: ../std/fs/struct.File.html
271268/// [`Debug`]: fmt::Debug
272269/// [`default()`]: Default::default
273270///
@@ -355,7 +352,7 @@ mod prim_never {}
355352/// assert_eq!(5, s.len() * std::mem::size_of::<u8>());
356353/// ```
357354///
358- # [ doc = concat ! ( " [`String`]: " , include_str! ( " ../primitive_docs/string_string.md" ) ) ]
355+ /// [`String`]: ../std/string/struct.String.html
359356///
360357/// As always, remember that a human intuition for 'character' might not map to
361358/// Unicode's definitions. For example, despite looking similar, the 'é'
@@ -572,7 +569,7 @@ impl Copy for () {
572569/// [`null_mut`]: ptr::null_mut
573570/// [`is_null`]: pointer::is_null
574571/// [`offset`]: pointer::offset
575- # [ doc = concat ! ( " [`into_raw`]: " , include_str! ( " ../primitive_docs/box_into_raw.md" ) ) ]
572+ /// [`into_raw`]: ../std/boxed/struct.Box.html#method.into_raw
576573/// [`write`]: ptr::write
577574#[ stable( feature = "rust1" , since = "1.0.0" ) ]
578575mod prim_pointer { }
@@ -1361,7 +1358,7 @@ mod prim_usize {}
13611358///
13621359/// [`std::fmt`]: fmt
13631360/// [`Hash`]: hash::Hash
1364- # [ doc = concat ! ( " [`ToSocketAddrs`]: " , include_str! ( " ../primitive_docs/net_tosocketaddrs.md" ) ) ]
1361+ /// [`ToSocketAddrs`]: ../std/net/trait.ToSocketAddrs.html
13651362///
13661363/// `&mut T` references get all of the above except `ToSocketAddrs`, plus the following, if `T`
13671364/// implements that trait:
@@ -1381,10 +1378,10 @@ mod prim_usize {}
13811378///
13821379/// [`FusedIterator`]: iter::FusedIterator
13831380/// [`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+ /// [`Seek`]: ../std/io/trait.Seek.html
1382+ /// [`BufRead`]: ../std/io/trait.BufRead.html
1383+ /// [`Read`]: ../std/io/trait.Read.html
1384+ /// [`io::Write`]: ../std/io/trait.Write.html
13881385///
13891386/// Note that due to method call deref coercion, simply calling a trait method will act like they
13901387/// work on references as well as they do on owned values! The implementations described here are
0 commit comments