Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/linkage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ statically and dynamically. This section will explore the various methods to
link crates together, and more information about native libraries can be
found in the [FFI section of the book][ffi].

[ffi]: ../book/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code
[ffi]: ../book/ch20-01-unsafe-rust.html#using-extern-functions-to-call-external-code

r[link.type]
In one session of compilation, the compiler can generate multiple artifacts
Expand Down
2 changes: 1 addition & 1 deletion src/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ r[lex.token.reserved-guards.edition2024]
[Integer literal expressions]: expressions/literal-expr.md#integer-literal-expressions
[keywords]: keywords.md
[literal expressions]: expressions/literal-expr.md
[loop labels]: expressions/loop-expr.md
[loop labels]: expressions/loop-expr.md#loop-labels
[macros]: macros-by-example.md
[String continuation escapes]: expressions/literal-expr.md#string-continuation-escapes
[syntax index]: syntax-index.md#operators-and-punctuation
Expand Down
2 changes: 1 addition & 1 deletion src/types/textual.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ r[type.text.char-value]
A value of type `char` is a [Unicode scalar value] (i.e. a code point that is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to 0xD7FF or 0xE000 to 0x10FFFF range.

r[type.text.char-precondition]
It is immediate [undefined behavior] to create a `char` that falls outside this range. A `[char]` is effectively a UCS-4 / UTF-32 string of length 1.
It is immediate [undefined behavior] to create a `char` that falls outside this range. A `char` is effectively a UCS-4 / UTF-32 string of length 1.

r[type.text.str-value]
A value of type `str` is represented the same way as `[u8]`, a slice of 8-bit unsigned bytes. However, the Rust standard library makes extra assumptions about `str`: methods working on `str` assume and ensure that the data in there is valid UTF-8. Calling a `str` method with a non-UTF-8 buffer can cause [undefined behavior] now or in the future.
Expand Down