From af33b30bc6c725770f67bceade16e2127d3144ba Mon Sep 17 00:00:00 2001 From: Andrew Brinker Date: Tue, 7 Jun 2016 18:09:24 -0400 Subject: [PATCH] Fixed based on feedback from steveklabnik --- src/doc/nomicon/safe-unsafe-meaning.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/doc/nomicon/safe-unsafe-meaning.md b/src/doc/nomicon/safe-unsafe-meaning.md index 38c3842d45589..c4f939a608b79 100644 --- a/src/doc/nomicon/safe-unsafe-meaning.md +++ b/src/doc/nomicon/safe-unsafe-meaning.md @@ -4,17 +4,13 @@ What's the relationship between Safe Rust and Unsafe Rust? How do they interact? The separation between Safe Rust and Unsafe Rust is controlled with the -`unsafe` keyword, which acts as a sort of *foreign function interface* -from one to the other. This boundary is why we can say Safe Rust is a -safe language: all the unsafe parts are kept exclusively behind the FFI -boundary, *just like any other safe language*. Best of all, because Safe -Rust is a subset of Unsafe Rust, the two can be cleanly intermixed, -without headers, runtimes, or any other FFI boilerplate. - -The `unsafe` keyword has dual purposes: to declare the existence of -contracts the compiler can't check, and to declare that the adherence -of some code to those contracts has been checked by the programmer, -and the code can therefore be trusted. +`unsafe` keyword, which acts as an interface from one to the other. This is +why we can say Safe Rust is a safe language: all the unsafe parts are kept +exclusively behind the boundary. + +The `unsafe` keyword has two uses: to declare the existence of contracts the +compiler can't check, and to declare that the adherence of some code to +those contracts has been checked by the programmer. You can use `unsafe` to indicate the existence of unchecked contracts on _functions_ and on _trait declarations_. On functions, `unsafe` means that