File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -381,11 +381,13 @@ mod enum_keyword {}
381
381
/// lazy_static;`. The other use is in foreign function interfaces (FFI).
382
382
///
383
383
/// `extern` is used in two different contexts within FFI. The first is in the form of external
384
- /// blocks, for declaring function interfaces that Rust code can call foreign code by.
384
+ /// blocks, for declaring function interfaces that Rust code can call foreign code by. Starting
385
+ /// with Rust 2024, external blocks must be marked as `unsafe`. In earlier editions, use of
386
+ /// the `unsafe` keyword remains optional.
385
387
///
386
388
/// ```rust ignore
387
389
/// #[link(name = "my_c_library")]
388
- /// extern "C" {
390
+ /// unsafe extern "C" {
389
391
/// fn my_c_function(x: i32) -> bool;
390
392
/// }
391
393
/// ```
You can’t perform that action at this time.
0 commit comments