diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-02-12 13:59:08 +0100 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-06-12 09:56:47 +0200 |
| commit | 6072207a1151f212163e3c19d92ff4ea22f291b2 (patch) | |
| tree | 53855f9f1b959d32f14f0ae33f4cdd8c17f9ea88 /compiler/rustc_lint/src/nonstandard_style.rs | |
| parent | 4e1b6d13a20e5b72922f085fb4b248848ca02910 (diff) | |
| download | rust-6072207a1151f212163e3c19d92ff4ea22f291b2.tar.gz rust-6072207a1151f212163e3c19d92ff4ea22f291b2.zip | |
introduce new lint infra
lint on duplicates during attribute parsing To do this we stuff them in the diagnostic context to be emitted after hir is constructed
Diffstat (limited to 'compiler/rustc_lint/src/nonstandard_style.rs')
| -rw-r--r-- | compiler/rustc_lint/src/nonstandard_style.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs index 31c18074466..1b60466a589 100644 --- a/compiler/rustc_lint/src/nonstandard_style.rs +++ b/compiler/rustc_lint/src/nonstandard_style.rs @@ -164,7 +164,7 @@ impl NonCamelCaseTypes { impl EarlyLintPass for NonCamelCaseTypes { fn check_item(&mut self, cx: &EarlyContext<'_>, it: &ast::Item) { let has_repr_c = matches!( - AttributeParser::parse_limited(cx.sess(), &it.attrs, sym::repr, it.span, true), + AttributeParser::parse_limited(cx.sess(), &it.attrs, sym::repr, it.span, it.id), Some(Attribute::Parsed(AttributeKind::Repr(r))) if r.iter().any(|(r, _)| r == &ReprAttr::ReprC) ); |
