Skip to content

Commit 1fc9b11

Browse files
committed
avoid two notes right next to each other
1 parent 5c7362c commit 1fc9b11

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/behavior-considered-undefined.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ code.
5757
> **Note**: For `rustc`, those types are [`NonNull<T>`] and [`NonZero*`].
5858
> Requesting custom invalid types requires the unstable `rustc_layout_scalar_valid_range_*` attributes.
5959
60-
> **Note**: Undefined behavior affects the entire program. For example, calling
61-
> a function in C that exhibits undefined behavior of C means your entire
62-
> program contains undefined behaviour that can also affect the Rust code. And
63-
> vice versa, undefined behavior in Rust can cause adverse affects on code
64-
> executed by any FFI calls to other languages.
65-
6660
A reference/pointer is "dangling" if it is null or not all of the bytes it
6761
points to are part of the same allocation (so in particular they all have to be
6862
part of *some* allocation). The span of bytes it points to is determined by the
@@ -72,6 +66,12 @@ entire range, so it is important that the length metadata is never too
7266
large. In particular, allocations and therefore slices cannot be bigger than
7367
`isize::MAX` bytes.
7468

69+
> **Note**: Undefined behavior affects the entire program. For example, calling
70+
> a function in C that exhibits undefined behavior of C means your entire
71+
> program contains undefined behaviour that can also affect the Rust code. And
72+
> vice versa, undefined behavior in Rust can cause adverse affects on code
73+
> executed by any FFI calls to other languages.
74+
7575
[noalias]: http://llvm.org/docs/LangRef.html#noalias
7676
[pointer aliasing rules]: http://llvm.org/docs/LangRef.html#pointer-aliasing-rules
7777
[undef]: http://llvm.org/docs/LangRef.html#undefined-values

0 commit comments

Comments
 (0)