Skip to content

Commit 9cc0af8

Browse files
committed
Refocus unsafe code chapter on unsafe itself.
1 parent 3860240 commit 9cc0af8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/doc/trpl/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
* [Deref coercions](deref-coercions.md)
5656
* [Macros](macros.md)
5757
* [Raw Pointers](raw-pointers.md)
58+
* [`unsafe`](unsafe.md)
5859
* [Nightly Rust](nightly-rust.md)
5960
* [Compiler Plugins](compiler-plugins.md)
6061
* [Inline Assembly](inline-assembly.md)

src/doc/trpl/unsafe-code.md renamed to src/doc/trpl/unsafe.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Unsafe Code
1+
% Unsafe
22

33
Rust’s main draw is its powerful static guarantees about behavior. But safety
44
checks are conservative by nature: there are some programs that are actually
@@ -76,7 +76,7 @@ behaviors that are certainly bad, but are expressly _not_ unsafe:
7676
* Integer overflow
7777

7878
Rust cannot prevent all kinds of software problems. Buggy code can and will be
79-
written in Rust. These things arne’t great, but they don’t qualify as `unsafe`
79+
written in Rust. These things aren’t great, but they don’t qualify as `unsafe`
8080
specifically.
8181

8282
# Unsafe Superpowers

src/librustc/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ fn main() {
208208
unsafe { f(); }
209209
}
210210
211-
See also http://doc.rust-lang.org/book/unsafe-code.html
211+
See also http://doc.rust-lang.org/book/unsafe.html
212212
"##,
213213

214214
E0152: r##"

0 commit comments

Comments
 (0)