From e2feea47bc568748af4bf58ba3f7d317708cd93b Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Tue, 18 Jun 2024 17:00:38 -0400 Subject: [PATCH] Document fix for retaining inner attributes on const blocks --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee07a02b7d..d94f32fa51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,16 @@ builtin # type_ascribe(10, usize) } ``` +- rustfmt no longer removes inner attributes from inline const blocks [#6158](https://github.com/rust-lang/rustfmt/issues/6158) + ```rust + fn main() { + const { + #![allow(clippy::assertions_on_constants)] + + assert!(1 < 2); + } + } + ``` ### Changed