rust/tests
bors 1bdc08a6bc Auto merge of #13599 - RuairidhWilliamson:proc_macro_attr, r=blyxyas
Fix allow_attributes when expanded from some macros

fixes #13349

The issue here was that the start pattern being matched on the original source code was not specific enough. When using derive macros or in the issue case a `#[repr(C)]` the `#` would match the start pattern meaning that the expanded macro appeared to be unchanged and clippy would lint it.

The change I made was to make the matching more specific by matching `#[ident` at the start. We still need the second string to match just the ident on its own because of things like `#[cfg_attr(panic = "unwind", allow(unused))]`.

I also noticed some typos with start and end, these code paths weren't being reached so this doesn't fix anything.

changelog: FP: [`allow_attributes`]: don't trigger when expanded from some macros
2024-10-30 15:22:47 +00:00
..
test_utils
ui Auto merge of #13599 - RuairidhWilliamson:proc_macro_attr, r=blyxyas 2024-10-30 15:22:47 +00:00
ui-cargo
ui-internal
ui-toml
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs
config-metadata.rs
dogfood.rs
headers.rs
integration.rs
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs
workspace.rs