From 9dfe5ef8b5496f5749223ef127d701563af4fe30 Mon Sep 17 00:00:00 2001 From: sisungo Date: Thu, 29 Feb 2024 13:16:24 +0800 Subject: [PATCH 1/2] Fix typo in `rustc_passes/messages.ftl` Line 190 contains unpaired parentheses. --- compiler/rustc_passes/messages.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl index 648ef9d51deaa..c223b8475288b 100644 --- a/compiler/rustc_passes/messages.ftl +++ b/compiler/rustc_passes/messages.ftl @@ -187,7 +187,7 @@ passes_doc_attr_not_crate_level = `#![doc({$attr_name} = "...")]` isn't allowed as a crate-level attribute passes_doc_cfg_hide_takes_list = - `#[doc(cfg_hide(...)]` takes a list of attributes + `#[doc(cfg_hide(...))]` takes a list of attributes passes_doc_expect_str = doc {$attr_name} attribute expects a string: #[doc({$attr_name} = "a")] From da37c8f1f2ed24bc06667bf13aedd63b4aad2b9f Mon Sep 17 00:00:00 2001 From: sisungo Date: Thu, 29 Feb 2024 14:59:10 +0800 Subject: [PATCH 2/2] Fix tests that are affected by this change --- tests/rustdoc-ui/lints/doc_cfg_hide.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rustdoc-ui/lints/doc_cfg_hide.stderr b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr index b7e8870fdf548..ca6a14a42b8f4 100644 --- a/tests/rustdoc-ui/lints/doc_cfg_hide.stderr +++ b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr @@ -18,7 +18,7 @@ help: to apply to the crate, use an inner attribute LL | #![doc(cfg_hide(doc))] | + -error: `#[doc(cfg_hide(...)]` takes a list of attributes +error: `#[doc(cfg_hide(...))]` takes a list of attributes --> $DIR/doc_cfg_hide.rs:4:8 | LL | #![doc(cfg_hide = "test")] @@ -27,7 +27,7 @@ LL | #![doc(cfg_hide = "test")] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #82730 -error: `#[doc(cfg_hide(...)]` takes a list of attributes +error: `#[doc(cfg_hide(...))]` takes a list of attributes --> $DIR/doc_cfg_hide.rs:6:8 | LL | #![doc(cfg_hide)]