document rustfmt support for #![feature(unsafe_extern_blocks)]

This commit is contained in:
Yacin Tmimi 2024-06-21 13:05:00 -04:00 committed by Caleb Cartwright
parent 6daf3c1778
commit 6c3c4308bb

View File

@ -58,6 +58,16 @@
}
}
```
- rustfmt no longer removes `safe` and `unsafe` keywords from static items in extern blocks.
This helps support [`#![feature(unsafe_extern_blocks)]`](https://github.com/rust-lang/rust/issues/123743) [#6204](https://github.com/rust-lang/rustfmt/pull/6204)
```rust
#![feature(unsafe_extern_blocks)]
unsafe extern "C" {
safe static TEST1: i32;
unsafe static TEST2: i32;
}
```
### Changed