@@ -1916,10 +1916,6 @@ mod type_keyword {}
1916
1916
/// - and to declare that a programmer has checked that these contracts have been upheld (`unsafe
1917
1917
/// {}` and `unsafe impl`, but also `unsafe fn` -- see below).
1918
1918
///
1919
- /// They are not mutually exclusive, as can be seen in `unsafe fn`: the body of an `unsafe fn` is,
1920
- /// by default, treated like an unsafe block. The `unsafe_op_in_unsafe_fn` lint can be enabled to
1921
- /// change that.
1922
- ///
1923
1919
/// # Unsafe abilities
1924
1920
///
1925
1921
/// **No matter what, Safe Rust can't cause Undefined Behavior**. This is
@@ -1961,13 +1957,6 @@ mod type_keyword {}
1961
1957
/// - `unsafe impl`: the contract necessary to implement the trait has been
1962
1958
/// checked by the programmer and is guaranteed to be respected.
1963
1959
///
1964
- /// By default, `unsafe fn` also acts like an `unsafe {}` block
1965
- /// around the code inside the function. This means it is not just a signal to
1966
- /// the caller, but also promises that the preconditions for the operations
1967
- /// inside the function are upheld. Mixing these two meanings can be confusing, so the
1968
- /// `unsafe_op_in_unsafe_fn` lint can be enabled to warn against that and require explicit unsafe
1969
- /// blocks even inside `unsafe fn`.
1970
- ///
1971
1960
/// See the [Rustonomicon] and the [Reference] for more information.
1972
1961
///
1973
1962
/// # Examples
@@ -2161,8 +2150,7 @@ mod type_keyword {}
2161
2150
/// defined by the trait (or a stronger contract, i.e., weaker preconditions).
2162
2151
///
2163
2152
/// Of course, the implementation may choose to call other unsafe operations, and then it needs an
2164
- /// `unsafe` *block* to indicate it discharged the proof obligations of its callees. (We enabled
2165
- /// `unsafe_op_in_unsafe_fn`, so the body of `idx_unchecked` is not implicitly an unsafe block.) For
2153
+ /// `unsafe` *block* to indicate it discharged the proof obligations of its callees. For
2166
2154
/// that purpose it can make use of the contract that all its callers must uphold -- the fact that
2167
2155
/// `idx < LEN`.
2168
2156
///
0 commit comments