Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
ce42656
make the suggestions verbose
ada4a Oct 9, 2025
7b83f42
fix(match_like_matches_macro): don't create `matches!` with if-let gu…
ada4a Oct 9, 2025
3833ac3
misc: use `Symbol`s instead of `&str`s
ada4a Oct 8, 2025
95834c9
recognize `x.checked_sub(y).unwrap_or_default()` as well
ada4a Oct 8, 2025
96ac099
fix: `nonstandard_macro_braces` FN on macros with empty args
profetia Sep 1, 2025
5216ea6
ExprUseVisitor: properly report discriminant reads
meithecatte Mar 26, 2025
e0c6949
ExprUseVisitor: remove maybe_read_scrutinee
meithecatte Mar 26, 2025
213fa59
Add test case for issue 138973
meithecatte Mar 27, 2025
2d6503c
Avoid using #[derive] in test
meithecatte Apr 1, 2025
2b16835
Add debug logging in hir_typeck::upvar
meithecatte Apr 21, 2025
6890336
Add miri tests for new closure capture behavior
meithecatte Apr 22, 2025
bddc1e2
add a comment: MatchPair and ExprUseVisitor must stay in sync
meithecatte Apr 22, 2025
ca47a91
Mark crash 140011 as fixed
meithecatte May 30, 2025
21da351
ExprUseVisitor: resolve a FIXME – it's fine as is
meithecatte May 30, 2025
0bc7f13
Bless miri tests
traviscross Oct 15, 2025
a625b77
Add a test for deref projections in new pattern capture behavior
meithecatte Oct 18, 2025
39d09eb
Rewrite the comment on is_multivariant_adt
meithecatte Oct 18, 2025
736e322
Add more variations from the PR thread
meithecatte Oct 19, 2025
4e72c4d
re-bless miri tests
meithecatte Nov 14, 2025
9d031bc
`search_is_some`: move to nursery
meithecatte Nov 14, 2025
f4496bf
Fix suggestions in while_let_on_iterator for non-sized traits
sergiogiro Nov 16, 2025
6a14a52
clean-up: pass things by value to avoid copying
ada4a Nov 20, 2025
9ced0f5
use `note_once`
ada4a Nov 20, 2025
4b021f6
point the suggestion at each individual span
ada4a Nov 20, 2025
f3b905d
use `span_suggestion_verbose`
ada4a Nov 20, 2025
129a39d
fix: adjust the applicability for the suggestion
ada4a Nov 20, 2025
e6ad406
feat(manual_ilog2): new lint
ada4a Oct 11, 2025
110649f
Fix display of dropdown menu "buttons"
GuillaumeGomez Nov 28, 2025
099308a
Merge commit '92b4b68683249c781c3acad742fc6e57c4140ad9' into clippy-s…
flip1995 Nov 28, 2025
bbadb72
while_let_on_iterator: consider all deref adjustments for by_ref
sergiogiro Nov 29, 2025
9cb6306
New lint: decimal_bitwise_operands
Artur-Sulej Nov 23, 2025
2c95550
New lint: `decimal_bitwise_operands` (#15215)
llogiq Nov 29, 2025
a6162c3
add `ptr_offset_by_literal` lint
folkertdev Sep 3, 2025
65c339e
add `ptr_offset_by_literal` lint (#15606)
llogiq Nov 30, 2025
d706368
Changelog for Clippy 1.92
alex-semenyuk Nov 30, 2025
3e88c6a
stabilize [T]::array_windows
bend-n Nov 11, 2025
1b76a34
fix: `large_stack_frames` FP on compiler generated targets
profetia Jun 22, 2025
21c5ddd
Fix `large_stack_frames` FP on compiler generated targets (#15101)
blyxyas Dec 1, 2025
5ac2656
feat(transmute_ptr_to_ref): Handle a pointer wrapped in a struct
Oct 24, 2025
e9ceae4
feat(transmute_ptr_to_ptr): Handle a pointer wrapped in a struct
Dec 1, 2025
e4b8c5a
fix: `useless_conversion` wrongly unmangled macros
profetia Dec 1, 2025
b07013c
chore: Update annotate-snippets to 0.12.10
Muscraft Dec 1, 2025
9c0cbe9
Merge E0412 into E0425
xonx4l Nov 7, 2025
28eb74b
Fix display of dropdown menu "buttons" (#16151)
Alexendoo Dec 2, 2025
a10cafe
feat(manual_ilog2): new lint (#15865)
Alexendoo Dec 2, 2025
f2af204
fix: `zero_repeat_side_effects` misses curlies
profetia Oct 9, 2025
4180830
Fix: `zero_repeat_side_effects` misses curlies (#15853)
blyxyas Dec 2, 2025
270e88d
Rollup merge of #148678 - xonx4l:EO412_replacement_with_EO425, r=Kivooeo
matthiaskrgr Dec 2, 2025
7f61da9
account for safe target features in fndef<->closure and fndef<->fndef…
BoxyUwU Oct 28, 2025
298d13e
Revert "fixup warnings around the compiler"
jdonszelmann Dec 3, 2025
680a336
Remove myself from rotation
blyxyas Dec 3, 2025
6885741
Remove myself from rotation (#16187)
blyxyas Dec 3, 2025
d501df0
Rollup merge of #149597 - jdonszelmann:revert-iterator-exactly-one, r…
matthiaskrgr Dec 4, 2025
d21adb9
bootstrap: add `rustc-dev` install target
Nadrieril Dec 4, 2025
db927a0
Auto merge of #148602 - BoxyUwU:coercion_cleanup_uncontroversial, r=lcnr
bors Dec 5, 2025
a27bd22
clean-up
ada4a Dec 5, 2025
d6b5613
fix(len_without_is_empty): allow `is_empty(&self)` with `len(&mut self)`
ada4a Dec 5, 2025
28c1eec
fix(len_without_is_empty): allow `is_empty(&self)` with `len(&mut sel…
llogiq Dec 5, 2025
2081b7a
chore(len_without_is_empty): extract to a separate module
ada4a Dec 5, 2025
64f43bf
chore(len_without_is_empty): extract to a separate module (#16195)
llogiq Dec 5, 2025
c905503
fix: `panicking_unwrap` FP on field access with implicit deref
profetia Dec 5, 2025
c59e7a9
Fix `panicking_unwrap` FP on field access with implicit deref (#16196)
llogiq Dec 5, 2025
f81cf11
Rollup merge of #148814 - bend-n:stabilize_array_windows, r=scottmcm
matthiaskrgr Dec 6, 2025
c788c7c
Fix `map_entry` FP when it would cause `MutexGuard` to be held across an
relaxcn Dec 6, 2025
8cc9c5e
Add warn-by-default lint for visibility on `const _` declarations
Jules-Bertholet Sep 28, 2025
5a37f7b
Fix `map_entry` FP when it would cause `MutexGuard` to be held across…
llogiq Dec 6, 2025
9e970d7
Fix `useless_conversion` wrongly unmangled macros (#16171)
dswij Dec 7, 2025
6278cc8
Fix `nonstandard_macro_braces` FN on macros with empty args (#15601)
dswij Dec 8, 2025
d5d644f
refactor(missing_asserts_for_indexing): overhaul diagnostics (#16120)
Jarcho Dec 8, 2025
4648af6
Remove `[no-mentions]` handler in our triagebot config
Urgau Dec 8, 2025
66ebabe
Remove `[no-mentions]` handler in our triagebot config (#16206)
samueltardieu Dec 9, 2025
70a4d95
Fixes #16109: For non-sized types, use reborrow in suggestions to rem…
Jarcho Dec 9, 2025
3551aeb
fix: `tuple_array_conversions` FP when binded vars are used before co…
profetia Dec 5, 2025
94aa13a
Recognize `type Alias = dyn Trait` in `fn` return types
estebank Nov 4, 2025
52fea21
Fix `tuple_array_conversions` FP when binded vars are used before con…
Jarcho Dec 9, 2025
d0e4b5b
Fix typo in deprecated lint `string_to_string` message
relaxcn Dec 9, 2025
0cf51b1
Fix typo in deprecated lint `string_to_string` message (#16208)
llogiq Dec 9, 2025
1232c81
Add needless_type_cast lint
borngraced Dec 9, 2025
8293d5e
Add `needless_type_cast` lint (#16139)
llogiq Dec 9, 2025
9495686
Update clippy for the ast `TryBlock` change
scottmcm Nov 30, 2025
c47bc5d
Remove ICE fix that was already backported to 1.91
flip1995 Dec 10, 2025
5357257
Changelog for Clippy 1.92⛸️ (#16158)
flip1995 Dec 10, 2025
16eaf79
feat(transmute_ptr_to_ref): Handle a pointer wrapped in a struct (#15…
Alexendoo Dec 10, 2025
06ded88
fix(match_like_matches_macro): FP with guards containing `if let` (#1…
Alexendoo Dec 10, 2025
961ea1c
feat(manual_saturating_arithmetic): lint `x.checked_sub(y).unwrap_or_…
Alexendoo Dec 10, 2025
d196db7
Rollup merge of #149489 - scottmcm:try-bikeshed, r=nnethercote
matthiaskrgr Dec 10, 2025
c96ff2d
Remove uses of `cfg(any()/all())`
jamie-osec Dec 10, 2025
a96d486
Update snapshot
Nadrieril Dec 11, 2025
de365c0
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Dec 11, 2025
42c8b68
Bump nightly version -> 2025-12-11
flip1995 Dec 11, 2025
1ff4682
Bump Clippy version -> 0.1.94
flip1995 Dec 11, 2025
9e3e964
Rustup (#16217)
flip1995 Dec 11, 2025
39877b1
Merge commit '9e3e9649cbae7ed33ba62ca436f43081eaaedeb5' into clippy-s…
flip1995 Dec 11, 2025
26c164f
Update Cargo.lock
flip1995 Dec 11, 2025
0349359
Suggest `cfg(false)` instead of `cfg(FALSE)`
jamie-osec Dec 8, 2025
de0d961
triagebot: ping makai410 for rustc_public
makai410 Dec 12, 2025
24302fd
triagebot: add myself(makai410) to the review rotation
makai410 Dec 12, 2025
5aa2c14
mailmap: add makai410
makai410 Dec 12, 2025
97252d3
Remove from `MetaItemParser::from_attr`
JonathanBrouwer Dec 8, 2025
86a97c4
Remove lifetime param from parser types
JonathanBrouwer Dec 8, 2025
aa6db80
Remove lifetime param from parser functions
JonathanBrouwer Dec 8, 2025
8452e69
Rollup merge of #138961 - meithecatte:expr-use-visitor, r=Nadrieril,t…
matthiaskrgr Dec 12, 2025
ec394a6
Rollup merge of #149655 - Nadrieril:install-rustc-dev, r=Kobzol
matthiaskrgr Dec 12, 2025
5b2a41c
Rollup merge of #149789 - JonathanBrouwer:remove-lifetime-param, r=jd…
matthiaskrgr Dec 12, 2025
6758733
Rollup merge of #149791 - clubby789:cfg-bool-lints, r=jdonszelmann
matthiaskrgr Dec 12, 2025
8ef9d3a
Rollup merge of #149792 - clubby789:cfg-FALSE, r=jdonszelmann
matthiaskrgr Dec 12, 2025
1c58bbf
Rollup merge of #149884 - flip1995:clippy-subtree-update, r=matthiaskrgr
matthiaskrgr Dec 12, 2025
4fbca99
Rollup merge of #149896 - makai410:ping-me, r=jieyouxu
matthiaskrgr Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ Lzu Tao <taolzu@gmail.com>
Maik Klein <maikklein@googlemail.com>
Maja Kądziołka <maya@compilercrim.es> <github@compilercrim.es>
Maja Kądziołka <maya@compilercrim.es> <kuba@kadziolka.net>
Makai <m4kai410@gmail.com>
Malo Jaffré <jaffre.malo@gmail.com>
Manish Goregaokar <manishsmail@gmail.com>
Mara Bos <m-ou.se@m-ou.se>
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"

[[package]]
name = "clippy"
version = "0.1.93"
version = "0.1.94"
dependencies = [
"anstream",
"askama",
Expand All @@ -648,7 +648,7 @@ dependencies = [

[[package]]
name = "clippy_config"
version = "0.1.93"
version = "0.1.94"
dependencies = [
"clippy_utils",
"itertools",
Expand All @@ -671,7 +671,7 @@ dependencies = [

[[package]]
name = "clippy_lints"
version = "0.1.93"
version = "0.1.94"
dependencies = [
"arrayvec",
"cargo_metadata 0.18.1",
Expand Down Expand Up @@ -703,7 +703,7 @@ dependencies = [

[[package]]
name = "clippy_utils"
version = "0.1.93"
version = "0.1.94"
dependencies = [
"arrayvec",
"itertools",
Expand Down Expand Up @@ -1107,7 +1107,7 @@ dependencies = [

[[package]]
name = "declare_clippy_lint"
version = "0.1.93"
version = "0.1.94"

[[package]]
name = "derive-where"
Expand Down
22 changes: 11 additions & 11 deletions compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ impl<S: Stage> CombineAttributeParser<S> for AllowInternalUnstableParser {
]);
const TEMPLATE: AttributeTemplate = template!(Word, List: &["feat1, feat2, ..."]);

fn extend<'c>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
parse_unstable(cx, args, <Self as CombineAttributeParser<S>>::PATH[0])
.into_iter()
Expand All @@ -39,9 +39,9 @@ impl<S: Stage> CombineAttributeParser<S> for UnstableFeatureBoundParser {
]);
const TEMPLATE: AttributeTemplate = template!(Word, List: &["feat1, feat2, ..."]);

fn extend<'c>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
if !cx.features().staged_api() {
cx.emit_err(session_diagnostics::StabilityOutsideStd { span: cx.attr_span });
Expand All @@ -67,17 +67,17 @@ impl<S: Stage> CombineAttributeParser<S> for AllowConstFnUnstableParser {
]);
const TEMPLATE: AttributeTemplate = template!(Word, List: &["feat1, feat2, ..."]);

fn extend<'c>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
) -> impl IntoIterator<Item = Self::Item> + 'c {
fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
parse_unstable(cx, args, <Self as CombineAttributeParser<S>>::PATH[0])
}
}

fn parse_unstable<S: Stage>(
cx: &AcceptContext<'_, '_, S>,
args: &ArgParser<'_>,
args: &ArgParser,
symbol: Symbol,
) -> impl IntoIterator<Item = Symbol> {
let mut res = Vec::new();
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const CFG_ATTR_TEMPLATE: AttributeTemplate = template!(
"https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute"
);

pub fn parse_cfg<'c, S: Stage>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
pub fn parse_cfg<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> Option<CfgEntry> {
let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span);
Expand All @@ -52,7 +52,7 @@ pub fn parse_cfg<'c, S: Stage>(

pub fn parse_cfg_entry<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
item: &MetaItemOrLitParser<'_>,
item: &MetaItemOrLitParser,
) -> Result<CfgEntry, ErrorGuaranteed> {
Ok(match item {
MetaItemOrLitParser::MetaItemParser(meta) => match meta.args() {
Expand Down Expand Up @@ -98,7 +98,7 @@ pub fn parse_cfg_entry<S: Stage>(

fn parse_cfg_entry_version<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
list: &MetaItemListParser<'_>,
list: &MetaItemListParser,
meta_span: Span,
) -> Result<CfgEntry, ErrorGuaranteed> {
try_gate_cfg(sym::version, meta_span, cx.sess(), cx.features_option());
Expand Down Expand Up @@ -130,7 +130,7 @@ fn parse_cfg_entry_version<S: Stage>(

fn parse_cfg_entry_target<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
list: &MetaItemListParser<'_>,
list: &MetaItemListParser,
meta_span: Span,
) -> Result<CfgEntry, ErrorGuaranteed> {
if let Some(features) = cx.features_option()
Expand Down
36 changes: 18 additions & 18 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl<S: Stage> SingleAttributeParser<S> for OptimizeParser {
]);
const TEMPLATE: AttributeTemplate = template!(List: &["size", "speed", "none"]);

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
return None;
Expand Down Expand Up @@ -84,7 +84,7 @@ impl<S: Stage> SingleAttributeParser<S> for CoverageParser {
]);
const TEMPLATE: AttributeTemplate = template!(OneOf: &[sym::off, sym::on]);

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(args) = args.list() else {
cx.expected_specific_argument_and_list(cx.attr_span, &[sym::on, sym::off]);
return None;
Expand Down Expand Up @@ -135,7 +135,7 @@ impl<S: Stage> SingleAttributeParser<S> for ExportNameParser {
]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(nv) = args.name_value() else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand Down Expand Up @@ -164,7 +164,7 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcClassParser {
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "ClassName");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(nv) = args.name_value() else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand Down Expand Up @@ -196,7 +196,7 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcSelectorParser {
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "methodName");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(nv) = args.name_value() else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand Down Expand Up @@ -472,10 +472,10 @@ impl<S: Stage> AttributeParser<S> for UsedParser {
}
}

fn parse_tf_attribute<'c, S: Stage>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
) -> impl IntoIterator<Item = (Symbol, Span)> + 'c {
fn parse_tf_attribute<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = (Symbol, Span)> {
let mut features = Vec::new();
let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span);
Expand Down Expand Up @@ -529,10 +529,10 @@ impl<S: Stage> CombineAttributeParser<S> for TargetFeatureParser {
};
const TEMPLATE: AttributeTemplate = template!(List: &["enable = \"feat1, feat2\""]);

fn extend<'c>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
) -> impl IntoIterator<Item = Self::Item> + 'c {
fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
parse_tf_attribute(cx, args)
}

Expand Down Expand Up @@ -567,10 +567,10 @@ impl<S: Stage> CombineAttributeParser<S> for ForceTargetFeatureParser {
Allow(Target::Method(MethodKind::TraitImpl)),
]);

fn extend<'c>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
) -> impl IntoIterator<Item = Self::Item> + 'c {
fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
parse_tf_attribute(cx, args)
}
}
Expand Down Expand Up @@ -599,7 +599,7 @@ impl<S: Stage> SingleAttributeParser<S> for SanitizeParser {
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
return None;
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl<S: Stage> SingleAttributeParser<S> for CrateNameParser {
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let ArgParser::NameValue(n) = args else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand All @@ -35,7 +35,7 @@ impl<S: Stage> SingleAttributeParser<S> for RecursionLimitParser {
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N", "https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let ArgParser::NameValue(nv) = args else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand All @@ -58,7 +58,7 @@ impl<S: Stage> SingleAttributeParser<S> for MoveSizeLimitParser {
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let ArgParser::NameValue(nv) = args else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand All @@ -81,7 +81,7 @@ impl<S: Stage> SingleAttributeParser<S> for TypeLengthLimitParser {
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let ArgParser::NameValue(nv) = args else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand All @@ -104,7 +104,7 @@ impl<S: Stage> SingleAttributeParser<S> for PatternComplexityLimitParser {
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "N");
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let ArgParser::NameValue(nv) = args else {
cx.expected_name_value(cx.attr_span, None);
return None;
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<S: Stage> SingleAttributeParser<S> for WindowsSubsystemParser {
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
const TEMPLATE: AttributeTemplate = template!(NameValueStr: ["windows", "console"], "https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(nv) = args.name_value() else {
cx.expected_name_value(
args.span().unwrap_or(cx.inner_span),
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/debugger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ impl<S: Stage> CombineAttributeParser<S> for DebuggerViualizerParser {
type Item = DebugVisualizer;
const CONVERT: ConvertFn<Self::Item> = |v, _| AttributeKind::DebuggerVisualizer(v);

fn extend<'c>(
cx: &'c mut AcceptContext<'_, '_, S>,
args: &'c ArgParser<'_>,
) -> impl IntoIterator<Item = Self::Item> + 'c {
fn extend(
cx: &mut AcceptContext<'_, '_, S>,
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
let Some(l) = args.list() else {
cx.expected_list(args.span().unwrap_or(cx.attr_span));
return None;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/deprecation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn get<S: Stage>(
cx: &AcceptContext<'_, '_, S>,
name: Symbol,
param_span: Span,
arg: &ArgParser<'_>,
arg: &ArgParser,
item: &Option<Symbol>,
) -> Option<Symbol> {
if item.is_some() {
Expand Down Expand Up @@ -68,7 +68,7 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
NameValueStr: "reason"
);

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let features = cx.features();

let mut since = None;
Expand Down
Loading
Loading