From 6c3c4308bb2bb24032490be8085c57074dcc22b6 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Fri, 21 Jun 2024 13:05:00 -0400 Subject: [PATCH] document rustfmt support for `#![feature(unsafe_extern_blocks)]` --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79910fb7c27..89e90fb17dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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