Skip to content

Commit 9cc7fab

Browse files
committedAug 17, 2024
Switch to automatic standard library links
This removes the explicit links to the standard library. In particular, this makes it nicer to view locally since you can set SPEC_RELATIVE=0 to make the links work. There are a bunch of changes to the actual URL because rustdoc resolves re-exports to link to the original definition instead of the re-export site. From what I can tell, everything should otherwise be the same. Not all links were able to be converted due to some limitations in rustdoc, such as: - Links to rexports from std_arch don't work due to rust-lang/rust#96506. - Links to keywords aren't supported. - Links to trait impls where the trait is not in the prelude doesn't work (they must be in scope).
1 parent cf34668 commit 9cc7fab

37 files changed

+69
-144
lines changed
 

‎src/attributes/codegen.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,7 @@ trait object whose methods are attributed.
427427
[undefined behavior]: ../behavior-considered-undefined.md
428428
[unsafe function]: ../unsafe-keyword.md
429429
[rust-abi]: ../items/external-blocks.md#abi
430-
[`core::intrinsics::caller_location`]: ../../core/intrinsics/fn.caller_location.html
431-
[`core::panic::Location::caller`]: ../../core/panic/struct.Location.html#method.caller
432-
[`Location`]: ../../core/panic/struct.Location.html
430+
[`Location`]: core::panic::Location
433431

434432
## The `instruction_set` attribute
435433

‎src/attributes/derive.md

-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ has no direct effect, but it may be used by tools and diagnostic lints to
3737
detect these automatically generated implementations.
3838

3939
[_MetaListPaths_]: ../attributes.md#meta-item-attribute-syntax
40-
[`Clone`]: ../../std/clone/trait.Clone.html
41-
[`PartialEq`]: ../../std/cmp/trait.PartialEq.html
4240
[`impl` item]: ../items/implementations.md
4341
[items]: ../items.md
4442
[derive macros]: ../procedural-macros.md#derive-macros

‎src/attributes/diagnostics.md

-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,6 @@ error[E0277]: My Message for `ImportantTrait<i32>` implemented for `String`
491491
= note: Note 2
492492
```
493493

494-
[`std::fmt`]: ../../std/fmt/index.html
495494
[Clippy]: https://github.com/rust-lang/rust-clippy
496495
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
497496
[_MetaListPaths_]: ../attributes.md#meta-item-attribute-syntax

‎src/attributes/testing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ fn mytest() {
8282

8383
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
8484
[_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
85-
[`Termination`]: ../../std/process/trait.Termination.html
86-
[`report`]: ../../std/process/trait.Termination.html#tymethod.report
85+
[`Termination`]: std::process::Termination
86+
[`report`]: std::process::Termination::report
8787
[`test` conditional compilation option]: ../conditional-compilation.md#test
8888
[attributes]: ../attributes.md
89-
[`ExitCode`]: ../../std/process/struct.ExitCode.html
89+
[`ExitCode`]: std::process::ExitCode

‎src/behavior-considered-undefined.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Please read the [Rustonomicon] before writing unsafe code.
3030
* Accessing (loading from or storing to) a place that is [dangling] or [based on
3131
a misaligned pointer].
3232
* Performing a place projection that violates the requirements of [in-bounds
33-
pointer arithmetic][offset]. A place projection is a [field
33+
pointer arithmetic](pointer#method.offset). A place projection is a [field
3434
expression][project-field], a [tuple index expression][project-tuple], or an
3535
[array/slice index expression][project-slice].
3636
* Breaking the [pointer aliasing rules]. `Box<T>`, `&mut T` and `&T` follow
@@ -176,16 +176,14 @@ reading uninitialized memory is permitted are inside `union`s and in "padding"
176176
[pointer aliasing rules]: http://llvm.org/docs/LangRef.html#pointer-aliasing-rules
177177
[undef]: http://llvm.org/docs/LangRef.html#undefined-values
178178
[`target_feature`]: attributes/codegen.md#the-target_feature-attribute
179-
[`UnsafeCell<U>`]: ../std/cell/struct.UnsafeCell.html
179+
[`UnsafeCell<U>`]: std::cell::UnsafeCell
180180
[Rustonomicon]: ../nomicon/index.html
181-
[`NonNull<T>`]: ../core/ptr/struct.NonNull.html
182-
[`NonZero<T>`]: ../core/num/struct.NonZero.html
183-
[`Box<T>`]: ../alloc/boxed/struct.Box.html
181+
[`NonNull<T>`]: core::ptr::NonNull
182+
[`NonZero<T>`]: core::num::NonZero
184183
[place expression context]: expressions.md#place-expressions-and-value-expressions
185184
[rules]: inline-assembly.md#rules-for-inline-assembly
186185
[points to]: #pointed-to-bytes
187186
[pointed to]: #pointed-to-bytes
188-
[offset]: ../std/primitive.pointer.html#method.offset
189187
[project-field]: expressions/field-expr.md
190188
[project-tuple]: expressions/tuple-expr.md#tuple-indexing-expressions
191189
[project-slice]: expressions/array-expr.md#array-and-slice-indexing-expressions

‎src/conditional-compilation.md

-3
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ atomic loads, stores, and compare-and-swap operations.
201201
When this cfg is present, all of the stable [`core::sync::atomic`] APIs are available for
202202
the relevant atomic width.
203203

204-
[`core::sync::atomic`]: ../core/sync/atomic/index.html
205-
206204
Possible values:
207205

208206
* `"8"`
@@ -374,7 +372,6 @@ println!("I'm running on a {} machine!", machine_kind);
374372
[`cfg`]: #the-cfg-attribute
375373
[`cfg` macro]: #the-cfg-macro
376374
[`cfg_attr`]: #the-cfg_attr-attribute
377-
[`debug_assert!`]: ../std/macro.debug_assert.html
378375
[`target_feature` attribute]: attributes/codegen.md#the-target_feature-attribute
379376
[attribute]: attributes.md
380377
[attributes]: attributes.md

‎src/crates-and-source-files.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ or `_` (U+005F) characters.
129129
ECMA-335 CLI model, a *library* in the SML/NJ Compilation Manager, a *unit*
130130
in the Owens and Flatt module system, or a *configuration* in Mesa.
131131

132-
[Unicode alphanumeric]: ../std/primitive.char.html#method.is_alphanumeric
132+
[Unicode alphanumeric]: char::is_alphanumeric
133133
[`!`]: types/never.md
134134
[_InnerAttribute_]: attributes.md
135135
[_Item_]: items.md
136136
[_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax
137-
[`ExitCode`]: ../std/process/struct.ExitCode.html
138-
[`Infallible`]: ../std/convert/enum.Infallible.html
139-
[`Termination`]: ../std/process/trait.Termination.html
137+
[`ExitCode`]: std::process::ExitCode
138+
[`Infallible`]: std::convert::Infallible
139+
[`Termination`]: std::process::Termination
140140
[attribute]: attributes.md
141141
[attributes]: attributes.md
142142
[function]: items/functions.md

‎src/destructors.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dropped.
88

99
The destructor of a type `T` consists of:
1010

11-
1. If `T: Drop`, calling [`<T as std::ops::Drop>::drop`]
11+
1. If `T: Drop`, calling [`<T as std::ops::Drop>::drop`](std::ops::Drop::drop)
1212
2. Recursively running the destructor of all of its fields.
1313
* The fields of a [struct] are dropped in declaration order.
1414
* The fields of the active [enum variant] are dropped in declaration order.
@@ -400,8 +400,3 @@ variable or field from being dropped automatically.
400400
[`match`]: expressions/match-expr.md
401401
[`while let`]: expressions/loop-expr.md#predicate-pattern-loops
402402
[`while`]: expressions/loop-expr.md#predicate-loops
403-
404-
[`<T as std::ops::Drop>::drop`]: ../std/ops/trait.Drop.html#tymethod.drop
405-
[`std::ptr::drop_in_place`]: ../std/ptr/fn.drop_in_place.html
406-
[`std::mem::forget`]: ../std/mem/fn.forget.html
407-
[`std::mem::ManuallyDrop`]: ../std/mem/struct.ManuallyDrop.html

‎src/expressions.md

-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ They are never allowed before:
284284
[destructors]: destructors.md
285285
[drop scope]: destructors.md#drop-scopes
286286

287-
[`Box<T>`]: ../std/boxed/struct.Box.html
288287
[`Copy`]: special-types-and-traits.md#copy
289288
[`Drop`]: special-types-and-traits.md#drop
290289
[`Sized`]: special-types-and-traits.md#sized

‎src/expressions/array-expr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ arr[10]; // warning: index out of bounds
7676
The array index expression can be implemented for types other than arrays and slices by implementing the [Index] and [IndexMut] traits.
7777

7878
[`Copy`]: ../special-types-and-traits.md#copy
79-
[IndexMut]: ../../std/ops/trait.IndexMut.html
80-
[Index]: ../../std/ops/trait.Index.html
79+
[IndexMut]: std::ops::IndexMut
80+
[Index]: std::ops::Index
8181
[_Expression_]: ../expressions.md
8282
[array]: ../types/array.md
8383
[constant expression]: ../const_eval.md#constant-expressions

‎src/expressions/await-expr.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ The variable `current_context` refers to the context taken from the async enviro
4949
[_Expression_]: ../expressions.md
5050
[`async fn`]: ../items/functions.md#async-functions
5151
[`async` block]: block-expr.md#async-blocks
52-
[`context`]: ../../std/task/struct.Context.html
53-
[`future::poll`]: ../../std/future/trait.Future.html#tymethod.poll
54-
[`pin::new_unchecked`]: ../../std/pin/struct.Pin.html#method.new_unchecked
55-
[`poll::Pending`]: ../../std/task/enum.Poll.html#variant.Pending
56-
[`poll::Ready`]: ../../std/task/enum.Poll.html#variant.Ready
52+
[`Context`]: std::task::Context
53+
[`future::poll`]: std::future::Future::poll
54+
[`pin::new_unchecked`]: std::pin::Pin::new_unchecked
55+
[`poll::Pending`]: std::task::Poll::Pending
56+
[`poll::Ready`]: std::task::Poll::Ready
5757
[async context]: ../expressions/block-expr.md#async-context
58-
[future]: ../../std/future/trait.Future.html
59-
[`IntoFuture`]: ../../std/future/trait.IntoFuture.html
60-
[`IntoFuture::into_future`]: ../../std/future/trait.IntoFuture.html#tymethod.into_future
58+
[future]: std::future::Future
59+
[`IntoFuture`]: std::future::IntoFuture
60+
[`IntoFuture::into_future`]: std::future::IntoFuture::into_future

‎src/expressions/block-expr.md

-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ fn is_unix_platform() -> bool {
231231
[`cfg`]: ../conditional-compilation.md
232232
[`for`]: loop-expr.md#iterator-loops
233233
[`loop`]: loop-expr.md#infinite-loops
234-
[`std::ops::Fn`]: ../../std/ops/trait.Fn.html
235-
[`std::future::Future`]: ../../std/future/trait.Future.html
236234
[`unsafe` blocks]: ../unsafe-keyword.md#unsafe-blocks-unsafe-
237235
[`while let`]: loop-expr.md#predicate-pattern-loops
238236
[`while`]: loop-expr.md#predicate-loops

‎src/expressions/call-expr.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,8 @@ Refer to [RFC 132] for further details and motivations.
8787

8888
[RFC 132]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
8989
[_Expression_]: ../expressions.md
90-
[`default()`]: ../../std/default/trait.Default.html#tymethod.default
91-
[`size_of()`]: ../../std/mem/fn.size_of.html
92-
[`std::ops::FnMut`]: ../../std/ops/trait.FnMut.html
93-
[`std::ops::FnOnce`]: ../../std/ops/trait.FnOnce.html
94-
[`std::ops::Fn`]: ../../std/ops/trait.Fn.html
90+
[`default()`]: std::default::Default::default
91+
[`size_of()`]: std::mem::size_of
9592
[automatically dereferenced]: field-expr.md#automatic-dereferencing
9693
[fully-qualified syntax]: ../paths.md#qualified-paths
9794
[non-function types]: ../types/function-item.md

‎src/expressions/literal-expr.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ The expression's type is the primitive [boolean type], and its value is:
419419
[String continuation escapes]: #string-continuation-escapes
420420
[boolean type]: ../types/boolean.md
421421
[constant expression]: ../const_eval.md#constant-expressions
422-
[CStr]: ../../core/ffi/struct.CStr.html
422+
[CStr]: core::ffi::CStr
423423
[floating-point types]: ../types/numeric.md#floating-point-types
424424
[lint check]: ../attributes/diagnostics.md#lint-check-attributes
425425
[literal tokens]: ../tokens.md#literals
@@ -432,14 +432,7 @@ The expression's type is the primitive [boolean type], and its value is:
432432
[Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value
433433
[Unicode scalar values]: http://www.unicode.org/glossary/#unicode_scalar_value
434434
[`f32::from_str`]: ../../core/primitive.f32.md#method.from_str
435-
[`f32::INFINITY`]: ../../core/primitive.f32.md#associatedconstant.INFINITY
436-
[`f32::NAN`]: ../../core/primitive.f32.md#associatedconstant.NAN
437435
[`f64::from_str`]: ../../core/primitive.f64.md#method.from_str
438-
[`f64::INFINITY`]: ../../core/primitive.f64.md#associatedconstant.INFINITY
439-
[`f64::NAN`]: ../../core/primitive.f64.md#associatedconstant.NAN
440-
[`u8::from_str_radix`]: ../../core/primitive.u8.md#method.from_str_radix
441-
[`u32::from_str_radix`]: ../../core/primitive.u32.md#method.from_str_radix
442-
[`u128::from_str_radix`]: ../../core/primitive.u128.md#method.from_str_radix
443436
[CHAR_LITERAL]: ../tokens.md#character-literals
444437
[STRING_LITERAL]: ../tokens.md#string-literals
445438
[RAW_STRING_LITERAL]: ../tokens.md#raw-string-literals

‎src/expressions/method-call-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ Just don't define inherent methods on trait objects with the same name as a trai
9393
[dereference]: operator-expr.md#the-dereference-operator
9494
[methods]: ../items/associated-items.md#methods
9595
[unsized coercion]: ../type-coercions.md#unsized-coercions
96-
[`IntoIterator`]: ../../std/iter/trait.IntoIterator.html
96+
[`IntoIterator`]: std::iter::IntoIterator

‎src/expressions/operator-expr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ See [this test] for an example of using this dependency.
674674
[Function pointer]: ../types/function-pointer.md
675675
[Function item]: ../types/function-item.md
676676
[undefined behavior]: ../behavior-considered-undefined.md
677-
[addr_of]: ../../std/ptr/macro.addr_of.html
678-
[addr_of_mut]: ../../std/ptr/macro.addr_of_mut.html
677+
[addr_of]: std::ptr::addr_of
678+
[addr_of_mut]: std::ptr::addr_of_mut
679679

680680
[_BorrowExpression_]: #borrow-operators
681681
[_DereferenceExpression_]: #the-dereference-operator

‎src/inline-assembly.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ r[asm.intro]
66
Support for inline assembly is provided via the [`asm!`] and [`global_asm!`] macros.
77
It can be used to embed handwritten assembly in the assembly output generated by the compiler.
88

9-
[`asm!`]: ../core/arch/macro.asm.html
10-
[`global_asm!`]: ../core/arch/macro.global_asm.html
9+
[`asm!`]: core::arch::asm
10+
[`global_asm!`]: core::arch::global_asm
1111

1212
r[asm.stable-targets]
1313
Support for inline assembly is stable on the following architectures:
@@ -119,7 +119,7 @@ These targets impose an additional restriction on the assembly code: any assembl
119119
Assembly code that does not conform to the GAS syntax will result in assembler-specific behavior.
120120
Further constraints on the directives used by inline assembly are indicated by [Directives Support](#directives-support).
121121

122-
[format-syntax]: ../std/fmt/index.html#syntax
122+
[format-syntax]: std::fmt#syntax
123123
[rfc-2795]: https://github.com/rust-lang/rfcs/pull/2795
124124

125125
## Operand type

‎src/input-format.md

-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ This prevents an [inner attribute] at the start of a source file being removed.
4444
The resulting sequence of characters is then converted into tokens as described in the remainder of this chapter.
4545

4646

47-
[`include!`]: ../std/macro.include.md
48-
[`include_bytes!`]: ../std/macro.include_bytes.md
49-
[`include_str!`]: ../std/macro.include_str.md
5047
[inner attribute]: attributes.md
5148
[BYTE ORDER MARK]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
5249
[comments]: comments.md

‎src/interior-mutability.md

-5
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,3 @@ across threads.
2222

2323
[shared reference]: types/pointer.md#shared-references-
2424
[ub]: behavior-considered-undefined.md
25-
[`std::cell::UnsafeCell<T>`]: ../std/cell/struct.UnsafeCell.html
26-
[`std::cell::RefCell<T>`]: ../std/cell/struct.RefCell.html
27-
[`std::sync::atomic`]: ../std/sync/atomic/index.html
28-
29-

‎src/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ We also want the reference to be as normative as possible, so if you see anythin
131131

132132
[book]: ../book/index.html
133133
[github issues]: https://github.com/rust-lang/reference/issues
134-
[standard library]: ../std/index.html
134+
[standard library]: std
135135
[the Rust Reference repository]: https://github.com/rust-lang/reference/
136136
[Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/
137137
[_Expression_]: expressions.md

‎src/items/enumerations.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ enum OverflowingDiscriminantError2 {
197197

198198
#### Via `mem::discriminant`
199199

200-
[`mem::discriminant`] returns an opaque reference to the discriminant of
200+
[`std::mem::discriminant`] returns an opaque reference to the discriminant of
201201
an enum value which can be compared. This cannot be used to get the value
202202
of the discriminant.
203203

@@ -331,7 +331,6 @@ enum E {
331331
[_Visibility_]: ../visibility-and-privacy.md
332332
[_WhereClause_]: generics.md#where-clauses
333333
[`C` representation]: ../type-layout.md#the-c-representation
334-
[`mem::discriminant`]: ../../std/mem/fn.discriminant.html
335334
[call expression]: ../expressions/call-expr.md
336335
[constant expression]: ../const_eval.md#constant-expressions
337336
[default representation]: ../type-layout.md#the-default-representation

‎src/items/functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ fn foo_oof(#[some_inert_attribute] arg: u8) {
418418
[`export_name`]: ../abi.md#the-export_name-attribute
419419
[`link_section`]: ../abi.md#the-link_section-attribute
420420
[`no_mangle`]: ../abi.md#the-no_mangle-attribute
421-
[built-in attributes]: ../attributes.html#built-in-attributes-index
421+
[built-in attributes]: ../attributes.md#built-in-attributes-index
422422
[trait item]: traits.md
423423
[method]: associated-items.md#methods
424424
[associated function]: associated-items.md#associated-functions-and-methods

‎src/items/unions.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,8 @@ checking, etc etc etc).
175175
[_GenericParams_]: generics.md
176176
[_WhereClause_]: generics.md#where-clauses
177177
[_StructFields_]: structs.md
178-
[`transmute`]: ../../std/mem/fn.transmute.html
179-
[`Copy`]: ../../std/marker/trait.Copy.html
178+
[`transmute`]: std::mem::transmute
180179
[boolean type]: ../types/boolean.md
181-
[ManuallyDrop]: ../../std/mem/struct.ManuallyDrop.html
182180
[the C representation]: ../type-layout.md#reprc-unions
183181
[type namespace]: ../names/namespaces.md
184-
[undefined behavior]: ../behavior-considered-undefined.html
182+
[undefined behavior]: ../behavior-considered-undefined.md

‎src/names/preludes.md

+1-14
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ added as long as the [`no_std` attribute] is not specified in the crate root.
5252
> the extern prelude, so it is considered unidiomatic to use `extern crate`.
5353
5454
> **Note**: Additional crates that ship with `rustc`, such as [`alloc`], and
55-
> [`test`], are not automatically included with the `--extern` flag when using
55+
> [`test`](mod@test), are not automatically included with the `--extern` flag when using
5656
> Cargo. They must be brought into scope with an `extern crate` declaration,
5757
> even in the 2018 edition.
5858
>
@@ -137,24 +137,11 @@ This attribute does not affect the [language prelude].
137137
> from the standard library are still included in the `macro_use` prelude.
138138
> Starting in the 2018 edition, it will remove the `macro_use` prelude.
139139
140-
[`alloc`]: ../../alloc/index.html
141-
[`Box`]: ../../std/boxed/struct.Box.html
142-
[`core::prelude::v1`]: ../../core/prelude/v1/index.html
143-
[`core::prelude::rust_2015`]: ../../core/prelude/rust_2015/index.html
144-
[`core::prelude::rust_2018`]: ../../core/prelude/rust_2018/index.html
145-
[`core::prelude::rust_2021`]: ../../core/prelude/rust_2021/index.html
146-
[`core`]: ../../core/index.html
147140
[`extern crate`]: ../items/extern-crates.md
148141
[`macro_use` attribute]: ../macros-by-example.md#the-macro_use-attribute
149142
[`macro_use` prelude]: #macro_use-prelude
150143
[`no_std` attribute]: #the-no_std-attribute
151144
[`no_std` attribute]: #the-no_std-attribute
152-
[`std::prelude::v1`]: ../../std/prelude/v1/index.html
153-
[`std::prelude::rust_2015`]: ../../std/prelude/rust_2015/index.html
154-
[`std::prelude::rust_2018`]: ../../std/prelude/rust_2018/index.html
155-
[`std::prelude::rust_2021`]: ../../std/prelude/rust_2021/index.html
156-
[`std`]: ../../std/index.html
157-
[`test`]: ../../test/index.html
158145
[attribute]: ../attributes.md
159146
[Boolean type]: ../types/boolean.md
160147
[Built-in attributes]: ../attributes.md#built-in-attributes-index

‎src/procedural-macros.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,15 @@ their equivalent `#[doc = r"str"]` attributes when passed to macros.
338338
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
339339
[Derive macros]: #derive-macros
340340
[Function-like macros]: #function-like-procedural-macros
341-
[`Delimiter::None`]: ../proc_macro/enum.Delimiter.html#variant.None
342-
[`Group`]: ../proc_macro/struct.Group.html
343-
[`TokenStream`]: ../proc_macro/struct.TokenStream.html
344-
[`TokenStream`s]: ../proc_macro/struct.TokenStream.html
345-
[`TokenTree`s]: ../proc_macro/enum.TokenTree.html
346-
[`compile_error`]: ../std/macro.compile_error.html
341+
[`Delimiter::None`]: proc_macro::Delimiter::None
342+
[`Group`]: proc_macro::Group
343+
[`TokenStream`]: proc_macro::TokenStream
344+
[`TokenStream`s]: proc_macro::TokenStream
345+
[`TokenTree`s]: proc_macro::TokenTree
347346
[`derive` attribute]: attributes/derive.md
348347
[`extern` blocks]: items/external-blocks.md
349348
[`macro_rules`]: macros-by-example.md
350-
[`proc_macro` crate]: ../proc_macro/index.html
349+
[`proc_macro` crate]: proc_macro
351350
[attribute]: attributes.md
352351
[attributes]: attributes.md
353352
[block]: expressions/block-expr.md

‎src/runtime.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ display a console window on startup. It will run detached from any existing cons
7575
```
7676

7777
[_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax
78-
[`GlobalAlloc`]: ../alloc/alloc/trait.GlobalAlloc.html
79-
[`PanicInfo`]: ../core/panic/struct.PanicInfo.html
78+
[`GlobalAlloc`]: alloc::alloc::GlobalAlloc
79+
[`PanicInfo`]: core::panic::PanicInfo
8080
[abort]: ../book/ch09-01-unrecoverable-errors-with-panic.html
8181
[attribute]: attributes.md
8282
[crate types]: linkage.md
83-
[set_hook]: ../std/panic/fn.set_hook.html
83+
[set_hook]: std::panic::set_hook
8484
[static item]: items/static-items.md
8585
[subsystem]: https://msdn.microsoft.com/en-us/library/fcc1zstk.aspx

‎src/special-types-and-traits.md

+10-21
Original file line numberDiff line numberDiff line change
@@ -140,26 +140,15 @@ The [`Sized`] trait indicates that the size of this type is known at compile-tim
140140
`Sized` is always implemented automatically by the compiler, not by [implementation items].
141141
These implicit `Sized` bounds may be relaxed by using the special `?Sized` bound.
142142

143-
[`Arc<Self>`]: ../std/sync/struct.Arc.html
144-
[`Box<T>`]: ../std/boxed/struct.Box.html
145-
[`Clone`]: ../std/clone/trait.Clone.html
146-
[`Copy`]: ../std/marker/trait.Copy.html
147-
[`Deref`]: ../std/ops/trait.Deref.html
148-
[`DerefMut`]: ../std/ops/trait.DerefMut.html
149-
[`Drop`]: ../std/ops/trait.Drop.html
150-
[`Pin<P>`]: ../std/pin/struct.Pin.html
151-
[`Rc<Self>`]: ../std/rc/struct.Rc.html
152-
[`RefUnwindSafe`]: ../std/panic/trait.RefUnwindSafe.html
153-
[`Send`]: ../std/marker/trait.Send.html
154-
[`Sized`]: ../std/marker/trait.Sized.html
155-
[`std::cell::UnsafeCell<T>`]: ../std/cell/struct.UnsafeCell.html
156-
[`std::cmp`]: ../std/cmp/index.html
157-
[`std::marker::PhantomData<T>`]: ../std/marker/struct.PhantomData.html
158-
[`std::ops`]: ../std/ops/index.html
159-
[`Termination`]: ../std/process/trait.Termination.html
160-
[`UnwindSafe`]: ../std/panic/trait.UnwindSafe.html
161-
[`Sync`]: ../std/marker/trait.Sync.html
162-
[`Unpin`]: ../std/marker/trait.Unpin.html
143+
[`Arc<Self>`]: std::sync::Arc
144+
[`Deref`]: std::ops::Deref
145+
[`DerefMut`]: std::ops::DerefMut
146+
[`Pin<P>`]: std::pin::Pin
147+
[`Rc<Self>`]: std::rc::Rc
148+
[`RefUnwindSafe`]: std::panic::RefUnwindSafe
149+
[`Termination`]: std::process::Termination
150+
[`UnwindSafe`]: std::panic::UnwindSafe
151+
[`Unpin`]: std::marker::Unpin
163152

164153
[Arrays]: types/array.md
165154
[associated types]: items/associated-items.md#associated-types
@@ -181,7 +170,7 @@ These implicit `Sized` bounds may be relaxed by using the special `?Sized` bound
181170
[orphan rules]: items/implementations.md#trait-implementation-coherence
182171
[`static` items]: items/static-items.md
183172
[test functions]: attributes/testing.md#the-test-attribute
184-
[the standard library]: ../std/index.html
173+
[the standard library]: std
185174
[trait object]: types/trait-object.md
186175
[Tuples]: types/tuple.md
187176
[Type parameters]: types/parameters.md

‎src/tokens.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ followed by the character `U+0022`. If the character `U+0022` is present within
336336
the literal, it must be _escaped_ by a preceding `U+005C` (`\`) character.
337337
Alternatively, a C string literal can be a _raw C string literal_, defined below.
338338

339-
[CStr]: ../core/ffi/struct.CStr.html
339+
[CStr]: core::ffi::CStr
340340

341341
C strings are implicitly terminated by byte `0x00`, so the C string literal
342342
`c""` is equivalent to manually constructing a `&CStr` from the byte string

‎src/type-coercions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,6 @@ precisely.
271271
[subtype]: subtyping.md
272272
[object safe]: items/traits.md#object-safety
273273
[type cast operator]: expressions/operator-expr.md#type-cast-expressions
274-
[`Unsize`]: ../std/marker/trait.Unsize.html
275-
[`CoerceUnsized`]: ../std/ops/trait.CoerceUnsized.html
274+
[`Unsize`]: std::marker::Unsize
275+
[`CoerceUnsized`]: std::ops::CoerceUnsized
276276
[method-call expressions]: expressions/method-call-expr.md

‎src/type-layout.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -600,12 +600,12 @@ primitive field will have the ABI of the primitive field.
600600
Because this representation delegates type layout to another type, it cannot be
601601
used with any other representation.
602602
603-
[`align_of_val`]: ../std/mem/fn.align_of_val.html
604-
[`size_of_val`]: ../std/mem/fn.size_of_val.html
605-
[`align_of`]: ../std/mem/fn.align_of.html
606-
[`size_of`]: ../std/mem/fn.size_of.html
607-
[`Sized`]: ../std/marker/trait.Sized.html
608-
[`Copy`]: ../std/marker/trait.Copy.html
603+
[`align_of_val`]: std::mem::align_of_val
604+
[`size_of_val`]: std::mem::size_of_val
605+
[`align_of`]: std::mem::align_of
606+
[`size_of`]: std::mem::size_of
607+
[`Sized`]: std::marker::Sized
608+
[`Copy`]: std::marker::Copy
609609
[dynamically sized types]: dynamically-sized-types.md
610610
[field-less enums]: items/enumerations.md#field-less-enum
611611
[enumerations]: items/enumerations.md
@@ -618,4 +618,4 @@ used with any other representation.
618618
[primitive representations]: #primitive-representations
619619
[structs]: items/structs.md
620620
[`transparent`]: #the-transparent-representation
621-
[`Layout`]: ../std/alloc/struct.Layout.html
621+
[`Layout`]: std::alloc::Layout

‎src/types/array.md

-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ always bounds-checked in safe methods and operators.
2626
2727
[_Expression_]: ../expressions.md
2828
[_Type_]: ../types.md#type-expressions
29-
[`Vec<T>`]: ../../std/vec/struct.Vec.html
3029
[`usize`]: numeric.md#machine-dependent-integer-types
3130
[constant expression]: ../const_eval.md#constant-expressions

‎src/types/boolean.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Like all primitives, the boolean type [implements][p-impl] the
3030
[traits][p-traits] [`Clone`][p-clone], [`Copy`][p-copy], [`Sized`][p-sized],
3131
[`Send`][p-send], and [`Sync`][p-sync].
3232

33-
> **Note**: See the [standard library docs][std] for library operations.
33+
> **Note**: See the [standard library docs](bool) for library operations.
3434
3535
## Operations on boolean values
3636

@@ -119,6 +119,5 @@ are invalid `bool`s, the inverse is not always sound).
119119
[p-sync]: ../special-types-and-traits.md#sync
120120
[p-traits]: ../items/traits.md
121121
[size and alignment]: ../type-layout.md#size-and-alignment
122-
[std]: ../../std/primitive.bool.html
123122
[undefined behavior]: ../behavior-considered-undefined.md
124123
[while expressions]: ../expressions/loop-expr.md#predicate-loops

‎src/types/closure.md

-3
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ Because captures are often by reference, the following general rules arise:
170170

171171
[`Clone`]: ../special-types-and-traits.md#clone
172172
[`Copy`]: ../special-types-and-traits.md#copy
173-
[`FnMut`]: ../../std/ops/trait.FnMut.html
174-
[`FnOnce`]: ../../std/ops/trait.FnOnce.html
175-
[`Fn`]: ../../std/ops/trait.Fn.html
176173
[`Send`]: ../special-types-and-traits.md#send
177174
[`Sized`]: ../special-types-and-traits.md#sized
178175
[`Sync`]: ../special-types-and-traits.md#sync

‎src/types/function-item.md

-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ All function items implement [`Fn`], [`FnMut`], [`FnOnce`], [`Copy`],
4848

4949
[`Clone`]: ../special-types-and-traits.md#clone
5050
[`Copy`]: ../special-types-and-traits.md#copy
51-
[`FnMut`]: ../../std/ops/trait.FnMut.html
52-
[`FnOnce`]: ../../std/ops/trait.FnOnce.html
53-
[`Fn`]: ../../std/ops/trait.Fn.html
5451
[`Send`]: ../special-types-and-traits.md#send
5552
[`Sync`]: ../special-types-and-traits.md#sync
5653
[coercion]: ../type-coercions.md

‎src/types/pointer.md

-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ For thin raw pointers (i.e., for `P = *const T` or `P = *mut T` for `T: Sized`),
6060
the inverse direction (transmuting from an integer or array of integers to `P`) is always valid.
6161
However, the pointer produced via such a transmutation may not be dereferenced (not even if `T` has size zero).
6262

63-
[`core::ptr::addr_of!`]: ../../core/ptr/macro.addr_of.html
64-
[`core::ptr::addr_of_mut!`]: ../../core/ptr/macro.addr_of_mut.html
6563
[Interior mutability]: ../interior-mutability.md
6664
[_Lifetime_]: ../trait-bounds.md
6765
[_TypeNoBounds_]: ../types.md#type-expressions

‎src/types/union.md

-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ The memory layout of a `union` is undefined by default (in particular, fields do
1515
fix a layout.
1616

1717
[`Copy`]: ../special-types-and-traits.md#copy
18-
[`ManuallyDrop`]: ../../std/mem/struct.ManuallyDrop.html
1918
[item]: ../items/unions.md

‎src/unsafe-keyword.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ By writing `unsafe impl`, the programmer states that they have taken care of sat
5454
Unsafe trait implementations are the logical dual to unsafe traits: where unsafe traits define a proof obligation that implementations must uphold, unsafe implementations state that all relevant proof obligations have been discharged.
5555

5656
[keyword]: ../std/keyword.unsafe.html
57-
[`get_unchecked`]: ../std/primitive.slice.html#method.get_unchecked
57+
[`get_unchecked`]: slice::get_unchecked
5858
[`unsafe_op_in_unsafe_fn`]: ../rustc/lints/listing/allowed-by-default.html#unsafe-op-in-unsafe-fn
5959

6060
## Unsafe external blocks (`unsafe extern`)

0 commit comments

Comments
 (0)
Please sign in to comment.