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
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 30, 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
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
Future incompatibility report: Future breakage diagnostic:
warning: missing pattern for `...` argument
##[warning]  --> $DIR/c-variadic.rs:7:34
   |
LL | unsafe extern "C" fn foo(_: i32, ...) {}
   |                                  ^^^
   |
help: name the argument, or use `_` to continue ignoring it
   |
LL | unsafe extern "C" fn foo(_: i32, _: ...) {}
   |                                  ++




The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args thir-print/c-variadic.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/thir-print/c-variadic.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/thir-print/c-variadic" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zunpretty=thir-tree" "--crate-type=lib"
--- stdout -------------------------------
DefId(0:3 ~ c_variadic[a5de]::foo):
params: [
    Param {
        ty: i32
        ty_span: Some(/checkout/tests/ui/thir-print/c-variadic.rs:7:29: 7:32 (#0))
        self_kind: None
        hir_id: Some(HirId(DefId(0:3 ~ c_variadic[a5de]::foo).1))
        param: Some( 
            Pat {
                ty: i32
                span: /checkout/tests/ui/thir-print/c-variadic.rs:7:26: 7:27 (#0)
                kind: PatKind {
                    Wild
                }
            }
        )
    }
    Param {
        ty: std::ffi::VaList<'{erased}>
        ty_span: None
        self_kind: None
        hir_id: Some(HirId(DefId(0:3 ~ c_variadic[a5de]::foo).3))
        param: Some( 
            Pat {
                ty: std::ffi::VaList<'{erased}>
                span: /checkout/tests/ui/thir-print/c-variadic.rs:7:34: 7:37 (#0)
                kind: PatKind {
                    Missing
                }
            }
        )
    }
---
        span: /checkout/tests/ui/thir-print/c-variadic.rs:7:39: 7:41 (#0)
        kind: 
            Scope {
                region_scope: Node(6)
                hir_id: HirId(DefId(0:3 ~ c_variadic[a5de]::foo).6)
                value:
                    Expr {
                        ty: ()
                        temp_scope_id: 6
                        span: /checkout/tests/ui/thir-print/c-variadic.rs:7:39: 7:41 (#0)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /checkout/tests/ui/thir-print/c-variadic.rs:7:39: 7:41 (#0)
                                region_scope: Node(5)
                                safety_mode: Safe
                                stmts: []
                                expr: []
                            }
---
Future incompatibility report: Future breakage diagnostic:
warning: missing pattern for `...` argument
##[warning]  --> /checkout/tests/ui/thir-print/c-variadic.rs:7:34
   |
LL | unsafe extern "C" fn foo(_: i32, ...) {}
   |                                  ^^^
   |
help: name the argument, or use `_` to continue ignoring it
   |
LL | unsafe extern "C" fn foo(_: i32, _: ...) {}
   |                                  ++
------------------------------------------

---- [ui] tests/ui/thir-print/c-variadic.rs stdout end ----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-c_variadic `#![feature(c_variadic)]` I-lang-nominated Nominated for discussion during a lang team meeting. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants