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
Copy file name to clipboardExpand all lines: docs/authoring.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,8 @@ This document serves as a guide for editors and reviewers. Some conventions and
15
15
* Code blocks should have an explicit language tag.
16
16
* Do not wrap long lines. This helps with reviewing diffs of the source.
17
17
* Use [smart punctuation] instead of Unicode characters. For example, use `---` for em-dash instead of the Unicode character. Characters like em-dash can be difficult to see in a fixed-width editor, and some editors may not have easy methods to enter such characters.
18
-
* Links should be relative with the `.md` extension. Links to other rust-lang books that are published with the reference or the standard library API should also be relative so that the linkchecker can validate them.
18
+
* Links should be relative with the `.md` extension. Links to other rust-lang books that are published with the reference should also be relative so that the linkchecker can validate them.
19
+
* Links to the standard library should use rustdoc-style links described in [Standard library links](#standard-library-links).
19
20
* The use of reference links is preferred, with shortcuts if appropriate. Place the sorted link reference definitions at the bottom of the file, or at the bottom of a section if there are an unusually large number of links that are specific to the section.
20
21
21
22
```markdown
@@ -154,4 +155,4 @@ The reference does not document which targets exist, or the properties of specif
154
155
155
156
### Editions
156
157
157
-
The main text and flow should document only the current edition. Whenever there is a difference between editions, the differences should be called out with an "Edition Differences" block.
158
+
The main text and flow should document only the current edition. Whenever there is a difference between editions, the differences should be called out with an "Edition differences" block.
Copy file name to clipboardExpand all lines: src/behavior-considered-undefined.md
+5-14Lines changed: 5 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,19 +12,10 @@ behaviors. `unsafe` code that satisfies this property for any safe client is
12
12
called *sound*; if `unsafe` code can be misused by safe code to exhibit
13
13
undefined behavior, it is *unsound*.
14
14
15
-
<divclass="warning">
16
-
17
-
***Warning:*** The following list is not exhaustive; it may grow or shrink.
18
-
There is no formal model of Rust's semantics for what is and is not allowed in
19
-
unsafe code, so there may be more behavior considered unsafe. We also reserve
20
-
the right to make some of the behavior in that list defined in the future. In
21
-
other words, this list does not say that anything will *definitely* always be
22
-
undefined in all future Rust version (but we might make such commitments for
23
-
some list items in the future).
24
-
25
-
Please read the [Rustonomicon] before writing unsafe code.
26
-
27
-
</div>
15
+
> [!WARNING]
16
+
> The following list is not exhaustive; it may grow or shrink. There is no formal model of Rust's semantics for what is and is not allowed in unsafe code, so there may be more behavior considered unsafe. We also reserve the right to make some of the behavior in that list defined in the future. In other words, this list does not say that anything will *definitely* always be undefined in all future Rust version (but we might make such commitments for some list items in the future).
17
+
>
18
+
> Please read the [Rustonomicon] before writing unsafe code.
28
19
29
20
* Data races.
30
21
* Accessing (loading from or storing to) a place that is [dangling] or [based on
@@ -87,7 +78,7 @@ The span of bytes a pointer or reference "points to" is determined by the pointe
87
78
A place is said to be "based on a misaligned pointer" if the last `*` projection
88
79
during place computation was performed on a pointer that was not aligned for its
89
80
type. (If there is no `*` projection in the place expression, then this is
90
-
accessing the field of a local and rustc will guarantee proper alignment. If
81
+
accessing the field of a local or `static`and rustc will guarantee proper alignment. If
91
82
there are multiple `*` projection, then each of them incurs a load of the
92
83
pointer-to-be-dereferenced itself from memory, and each of these loads is
93
84
subject to the alignment constraint. Note that some `*` projections can be
Copy file name to clipboardExpand all lines: src/conditional-compilation.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,11 +55,8 @@ configuration option from within the source code of the crate being compiled.
55
55
> by [Cargo][cargo-feature] for specifying compile-time options and optional
56
56
> dependencies.
57
57
58
-
<divclass="warning">
59
-
60
-
Warning: Arbitrarily-set configuration options can clash with compiler-set configuration options. For example, it is possible to do `rustc --cfg "unix" program.rs` while compiling to a Windows target, and have both `unix` and `windows` configuration options set at the same time. Doing this would be unwise.
61
-
62
-
</div>
58
+
> [!WARNING]
59
+
> Arbitrarily-set configuration options can clash with compiler-set configuration options. For example, it is possible to do `rustc --cfg "unix" program.rs` while compiling to a Windows target, and have both `unix` and `windows` configuration options set at the same time. Doing this would be unwise.
0 commit comments