Port #[ignore] to the new attribute parsing infrastructure

Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
Jonathan Brouwer
2025-06-30 16:09:01 +02:00
parent 733b47ea4b
commit 2d8ffff10a
13 changed files with 117 additions and 40 deletions

View File

@@ -304,6 +304,7 @@ fn emit_malformed_attribute(
| sym::naked
| sym::no_mangle
| sym::non_exhaustive
| sym::ignore
| sym::must_use
| sym::track_caller
| sym::link_name
@@ -319,8 +320,7 @@ fn emit_malformed_attribute(
// Some of previously accepted forms were used in practice,
// report them as warnings for now.
let should_warn =
|name| matches!(name, sym::doc | sym::ignore | sym::link | sym::test | sym::bench);
let should_warn = |name| matches!(name, sym::doc | sym::link | sym::test | sym::bench);
let error_msg = format!("malformed `{name}` attribute input");
let mut suggestions = vec![];