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-
6660A reference/pointer is "dangling" if it is null or not all of the bytes it
6761points to are part of the same allocation (so in particular they all have to be
6862part 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
7266large. 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