You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Copy file name to clipboardexpand all lines: src/behavior-considered-undefined.md
+5-10
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,12 @@ Please read the [Rustonomicon] before writing unsafe code.
30
30
* Accessing (loading from or storing to) a place that is [dangling] or [based on
31
31
a misaligned pointer].
32
32
* 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
34
34
expression][project-field], a [tuple index expression][project-tuple], or an
35
35
[array/slice index expression][project-slice].
36
36
* Breaking the [pointer aliasing rules]. `Box<T>`, `&mut T` and `&T` follow
37
37
LLVM’s scoped [noalias] model, except if the `&T` contains an
38
-
[`UnsafeCell<U>`]. References and boxes must not be [dangling] while they are
38
+
[`UnsafeCell<U>`](std::cell::UnsafeCell). References and boxes must not be [dangling] while they are
39
39
live. The exact liveness duration is not specified, but some bounds exist:
40
40
* For references, the liveness duration is upper-bounded by the syntactic
41
41
lifetime assigned by the borrow checker; it cannot be live any *longer* than
@@ -44,13 +44,13 @@ Please read the [Rustonomicon] before writing unsafe code.
44
44
considered live.
45
45
* When a reference (but not a `Box`!) is passed to a function, it is live at
46
46
least as long as that function call, again except if the `&T` contains an
47
-
[`UnsafeCell<U>`].
47
+
[`UnsafeCell<U>`](std::cell::UnsafeCell).
48
48
49
49
All this also applies when values of these
50
50
types are passed in a (nested) field of a compound type, but not behind
51
51
pointer indirections.
52
52
* Mutating immutable bytes. All bytes inside a [`const`] item are immutable.
53
-
The bytes owned by an immutable binding or immutable `static` are immutable, unless those bytes are part of an [`UnsafeCell<U>`].
53
+
The bytes owned by an immutable binding or immutable `static` are immutable, unless those bytes are part of an [`UnsafeCell<U>`](std::cell::UnsafeCell).
54
54
55
55
Moreover, the bytes [pointed to] by a shared reference, including transitively through other references (both shared and mutable) and `Box`es, are immutable; transitivity includes those references stored in fields of compound types.
56
56
@@ -159,7 +159,7 @@ Whether a value is valid depends on the type:
159
159
Furthermore, for wide references and [`Box<T>`], slice metadata is invalid
160
160
if it makes the total size of the pointed-to value bigger than `isize::MAX`.
161
161
* If a type has a custom range of a valid values, then a valid value must be in that range.
162
-
In the standard library, this affects [`NonNull<T>`] and [`NonZero<T>`].
162
+
In the standard library, this affects [`NonNull<T>`](core::ptr::NonNull) and [`NonZero<T>`](core::num::NonZero).
163
163
164
164
> **Note**: `rustc` achieves this with the unstable
165
165
> `rustc_layout_scalar_valid_range_*` attributes.
@@ -176,16 +176,11 @@ reading uninitialized memory is permitted are inside `union`s and in "padding"
0 commit comments