Skip to content

report the varargs_without_pattern lint in deps#154599

Open
folkertdev wants to merge 1 commit intorust-lang:mainfrom
folkertdev:varargs-without-pattern-in-deps
Open

report the varargs_without_pattern lint in deps#154599
folkertdev wants to merge 1 commit intorust-lang:mainfrom
folkertdev:varargs-without-pattern-in-deps

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

tracking issue: #44930

After discussion in rust-lang/reference#2177 (comment).

Based on #143619 (comment) there was only one actual impacted crate https://crates.io/crates/binrw. The issue was fixed in jam1garner/binrw#342, and has since been released jam1garner/binrw#342 (comment).

Hence we may as well report this loudly.

r? @ghost

@folkertdev folkertdev added F-c_variadic `#![feature(c_variadic)]` I-lang-nominated Nominated for discussion during a lang team meeting. labels Mar 30, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 30, 2026
@rust-log-analyzer

This comment has been minimized.

@folkertdev folkertdev force-pushed the varargs-without-pattern-in-deps branch from 1ed0d34 to b54ad89 Compare March 30, 2026 18:27
@rust-log-analyzer

This comment has been minimized.

@folkertdev folkertdev force-pushed the varargs-without-pattern-in-deps branch from b54ad89 to 5cdad1e Compare March 30, 2026 20:07
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@folkertdev folkertdev force-pushed the varargs-without-pattern-in-deps branch from 5cdad1e to fbe90e6 Compare March 30, 2026 21:37
@traviscross traviscross added P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang T-lang Relevant to the language team labels Apr 1, 2026
@joshtriplett
Copy link
Copy Markdown
Member

When we move FCWs to warn in deps, we typically change them to deny-by-default as well. Could you please make that change too?

@traviscross traviscross added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Apr 1, 2026
@joshtriplett
Copy link
Copy Markdown
Member

@rfcbot merge lang

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

rust-rfcbot commented Apr 1, 2026

Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Apr 1, 2026
@traviscross
Copy link
Copy Markdown
Contributor

traviscross commented Apr 1, 2026

@rfcbot reviewed

(Inclusive of changing this to deny-by-default.)

@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Apr 1, 2026
@rust-rfcbot
Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@folkertdev folkertdev force-pushed the varargs-without-pattern-in-deps branch from fbe90e6 to 923279e Compare April 1, 2026 15:20
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 1, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@folkertdev
Copy link
Copy Markdown
Contributor Author

I'm confused by that failure, there are 3 failing tests which is weird given the diff

failures:
    compiler/rustc_lint_defs/src/builtin.rs - builtin::FORBIDDEN_LINT_GROUPS (line 166)
    compiler/rustc_lint_defs/src/builtin.rs - builtin::VARARGS_WITHOUT_PATTERN (line 5559)
    compiler/rustc_lint_defs/src/builtin.rs - builtin::WARNINGS (line 1068)

Also locally the doc tests (which I believe is what these are) work fine when I run ./x test compiler/rustc_lint_defs --doc.

@ehuss
Copy link
Copy Markdown
Contributor

ehuss commented Apr 1, 2026

Also locally the doc tests (which I believe is what these are) work fine when I run ./x test compiler/rustc_lint_defs --doc.

You need --stage 2 to reproduce.

The problem is a bit complicated. What happens is that rustdoc combines doctests into a single crate. When it fails to build that crate, it then falls back to the "unmerged" mode. With varargs_without_pattern being changed to Deny, the merged doctests no longer compile because fn foo(...) is now an error by default.

The example needs to be marked with ,compile_fail. I would also double-check that everything continues to work when testing with both stage1 and stage2, but I think that should be sufficient.

@folkertdev folkertdev force-pushed the varargs-without-pattern-in-deps branch from 923279e to e2d01c6 Compare April 1, 2026 23:06
@folkertdev
Copy link
Copy Markdown
Contributor Author

Thanks, that's very helpful. With that change stage 2 works but now stage 1 complains that compilation was successful even though the code block is marked as compile_fail. I guess/hope that just doesn't get tested in CI?

@ehuss
Copy link
Copy Markdown
Contributor

ehuss commented Apr 2, 2026

Unfortunately stage1 is tested in CI (see here).

You can probably add something like this to make it fail on both:

# #![deny(varargs_without_pattern)]

add that towards the top of the example.

@traviscross traviscross added I-lang-radar Items that are on lang's radar and will need eventual work or consideration. and removed I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. F-c_variadic `#![feature(c_variadic)]` final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants