report the varargs_without_pattern lint in deps rust-lang/rust#154599

Merged

34 comments and reviews loaded in 1.33s

folkertdev Avatar

View all comments

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

rust-log-analyzer Avatar
rust-log-analyzer on 2026-03-30 16:56:22 UTC · hidden as outdated
View on GitHub

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)
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/zero-sized/zero-sized-btreemap-insert.rs ... ok

failures:

---- [ui] tests/ui/c-variadic/parse-errors.rs#e2015 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/c-variadic/parse-errors.e2015/parse-errors.e2015.stderr`
diff of stderr:

44 
45 error: aborting due to 3 previous errors
46 
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |     unsafe extern "C" fn f(_: ...) {
+    |                            ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:14:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:20:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
47 

Note: some mismatched output was normalized before being compared
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |     unsafe extern "C" fn f(_: ...) {
+    |                            ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:14:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:20:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 


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 c-variadic/parse-errors.rs`

error in revision `e2015`: 1 errors occurred comparing output.
status: exit status: 1
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/c-variadic/parse-errors.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" "--cfg" "e2015" "--check-cfg" "cfg(test,FALSE,e2015,e2018)" "--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/c-variadic/parse-errors.e2015" "-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" "--edition=2015"
stdout: none
--- stderr -------------------------------
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:11:28
   |
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |     unsafe extern "C" fn f(_: ...) {
   |                            ++

error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:14:32
   |
LL |         unsafe extern "C" fn f(...) {}
   |                                ^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:20:32
   |
LL |         unsafe extern "C" fn f(...) {}
   |                                ^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

error: aborting due to 3 previous errors

Future incompatibility report: Future breakage diagnostic:
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |     unsafe extern "C" fn f(_: ...) {
   |                            ++

Future breakage diagnostic:
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:14:32
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

Future breakage diagnostic:
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:20:32
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++
------------------------------------------

---- [ui] tests/ui/c-variadic/parse-errors.rs#e2015 stdout end ----
---- [ui] tests/ui/c-variadic/parse-errors.rs#e2018 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/c-variadic/parse-errors.e2018/parse-errors.e2018.stderr`
diff of stderr:

57 
58 error: aborting due to 4 previous errors
59 
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |     unsafe extern "C" fn f(_: ...) {
+    |                            ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:14:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:20:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:26:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
60 

Note: some mismatched output was normalized before being compared
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |     unsafe extern "C" fn f(_: ...) {
+    |                            ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:14:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:20:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 
+ Future breakage diagnostic:
+ error: missing pattern for `...` argument
+   --> $DIR/parse-errors.rs:26:32
---
+ LL | #![deny(varargs_without_pattern)]
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+ help: name the argument, or use `_` to continue ignoring it
+    |
+ LL |         unsafe extern "C" fn f(_: ...) {}
+    |                                ++
+ 


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 c-variadic/parse-errors.rs`

error in revision `e2018`: 1 errors occurred comparing output.
status: exit status: 1
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/c-variadic/parse-errors.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" "--cfg" "e2018" "--check-cfg" "cfg(test,FALSE,e2015,e2018)" "--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/c-variadic/parse-errors.e2018" "-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" "--edition=2018"
stdout: none
--- stderr -------------------------------
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:11:28
   |
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |     unsafe extern "C" fn f(_: ...) {
   |                            ++

error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:14:32
   |
LL |         unsafe extern "C" fn f(...) {}
   |                                ^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:20:32
   |
LL |         unsafe extern "C" fn f(...) {}
   |                                ^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:26:32
   |
LL |         unsafe extern "C" fn f(...) {}
   |                                ^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

error: aborting due to 4 previous errors

Future incompatibility report: Future breakage diagnostic:
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |     unsafe extern "C" fn f(_: ...) {
   |                            ++

Future breakage diagnostic:
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:14:32
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

Future breakage diagnostic:
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:20:32
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++

Future breakage diagnostic:
error: missing pattern for `...` argument
##[error]  --> /checkout/tests/ui/c-variadic/parse-errors.rs:26:32
---
LL | #![deny(varargs_without_pattern)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: name the argument, or use `_` to continue ignoring it
   |
LL |         unsafe extern "C" fn f(_: ...) {}
   |                                ++
------------------------------------------

---- [ui] tests/ui/c-variadic/parse-errors.rs#e2018 stdout end ----
---- [ui] tests/ui/thir-print/c-variadic.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/thir-print/c-variadic/c-variadic.stderr`
normalized stderr:
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 ----

rust-log-analyzer Avatar
rust-log-analyzer on 2026-03-30 19:10:59 UTC · hidden as outdated
View on GitHub

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)
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
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 ----

rustbot Avatar
rustbot on 2026-03-30 20:07:24 UTC · hidden as outdated
rustbot Avatar
rustbot on 2026-03-30 20:07:24 UTC · hidden as outdated
View on GitHub

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 Avatar
rust-log-analyzer on 2026-03-30 20:45:45 UTC · hidden as outdated
View on GitHub

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 ----

joshtriplett Avatar

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?

joshtriplett Avatar
rust-rfcbot Avatar

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.

traviscross Avatar

@rfcbot reviewed

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

rust-rfcbot Avatar

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

rustbot Avatar
rustbot on 2026-04-01 15:20:06 UTC · hidden as outdated
rustbot Avatar
rustbot on 2026-04-01 15:20:06 UTC · hidden as outdated
View on GitHub

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 Avatar
rust-log-analyzer on 2026-04-01 15:54:58 UTC · hidden as outdated
View on GitHub

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

Click to see the possible cause of the failure (guessed by this bot)
Executing "/scripts/stage_2_test_set2.sh"
+ /scripts/stage_2_test_set2.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
---- compiler/rustc_lint_defs/src/builtin.rs - builtin::FORBIDDEN_LINT_GROUPS (line 166) stdout ----
warning: warn(bad_style) incompatible with previous forbid
   --> compiler/rustc_lint_defs/src/builtin.rs:168:9
    |
167 | #![forbid(warnings)]
    |           -------- `forbid` level set here
168 | #![warn(bad_style)]
    |         ^^^^^^^^^ overruled by previous forbid
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
    = note: `#[warn(forbidden_lint_groups)]` (part of `#[warn(future_incompatible)]`) on by default
---
    |         ^^^^^^^^^^^^^^^^ overruled by previous forbid
    |
   ::: compiler/rustc_lint_defs/src/builtin.rs:167:11
    |
167 | #![forbid(warnings)]
    |           -------- `forbid` level set here
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>

error: the feature `rustdoc_internals` is internal to the compiler or standard library
---
    = note: using it is strongly discouraged
note: the lint level is defined here
   --> compiler/rustc_lint_defs/src/builtin.rs:167:11
    |
167 | #![forbid(warnings)]
    |           ^^^^^^^^
    = note: `#[forbid(internal_features)]` implied by `#[forbid(warnings)]`

error: aborting due to 1 previous error; 2 warnings emitted

Couldn't compile the test.
\ (no newline at end of output)
---
     |        ^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
     = note: `#[deny(varargs_without_pattern)]` (part of `#[deny(future_incompatible)]`) on by default
help: name the argument, or use `_` to continue ignoring it
     |
5564 | fn foo(_: ...) {
     |        ++

error: aborting due to 1 previous error; 1 warning emitted
---

test result: FAILED. 115 passed; 3 failed; 29 ignored; 0 measured; 0 filtered out; finished in 2.32s

all doctests ran in 3.64s; merged doctests compilation took 1.31s
error: doctest failed, to rerun pass `-p rustc_lint_defs --doc`
Bootstrap failed while executing `--stage 2 test --skip tidy --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 0:30:04
  local time: Wed Apr  1 15:54:45 UTC 2026
  network time: Wed, 01 Apr 2026 15:54:46 GMT
##[error]Process completed with exit code 1.
folkertdev Avatar

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 Avatar

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 Avatar

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 Avatar

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.

rust-rfcbot Avatar

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

rustbot Avatar
rustbot on 2026-04-11 15:24:59 UTC · hidden as outdated
rustbot Avatar
rustbot on 2026-04-11 15:24:59 UTC · hidden as outdated
View on GitHub

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.

folkertdev Avatar

Let's see if that stage1 fix works as expected

@bors try jobs=x86_64-gnu-llvm3

rust-bors Avatar
rust-bors on 2026-04-11 15:25:35 UTC · hidden as outdated
rust-bors Avatar
rust-bors on 2026-04-11 15:25:35 UTC · hidden as outdated
View on GitHub

⌛ Trying commit baec033 with merge 84bef62

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24285542763

rust-bors Avatar
rust-log-analyzer Avatar
rust-log-analyzer on 2026-04-11 15:27:22 UTC · hidden as outdated
View on GitHub

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling ureq v3.0.8
   Compiling citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)
    Finished `dev` profile [unoptimized] target(s) in 49.42s
     Running `target/debug/citool calculate-job-matrix`
Run type: TryJob { job_patterns: Some(["x86_64-gnu-llvm3"]) }
Error: Failed to calculate job matrix

Caused by:
    Patterns `x86_64-gnu-llvm3` did not match any auto jobs
##[error]Process completed with exit code 1.
folkertdev Avatar
rust-bors Avatar
rust-bors on 2026-04-11 15:30:11 UTC · hidden as outdated
rust-bors Avatar
rust-bors on 2026-04-11 15:30:11 UTC · hidden as outdated
View on GitHub

⌛ Trying commit baec033 with merge 6fff4c8

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24285626071

rust-bors Avatar

☀️ Try build successful (CI)
Build commit: 6fff4c8 (6fff4c80932abe41842174589cac6a3aafefbce3, parent: 5f36a7f8072e835d73d9e1f7ab8a2134ac7352dc)

folkertdev Avatar

given that you've been looking at this already

r? ehuss

ehuss Avatar
compiler/rustc_lint_defs/src/builtin.rs · outdated
5561 /// ```rust,compile_fail
5562 /// # #![deny(varargs_without_pattern)]

View changes since the review

An alternate solution brought up in #152853 is to do:

Suggested change
/// ```rust,compile_fail
/// # #![deny(varargs_without_pattern)]
#[cfg_attr(bootstrap, doc = "```rust")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]

I don't have a preference, though. I suppose the cfg_attr approach ensures it tests that it defaults to deny.

ehuss Avatar

given that you've been looking at this already

I am not on the compiler team, and would prefer to assign to someone else.

rustbot Avatar

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.

folkertdev Avatar
rust-bors Avatar
rust-bors on 2026-04-13 15:44:08 UTC · hidden as outdated
rust-bors Avatar
rust-bors on 2026-04-13 15:44:08 UTC · hidden as outdated
View on GitHub

⌛ Trying commit 7c4cf96 with merge 42f6f47

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24352572039

rust-bors Avatar

☀️ Try build successful (CI)
Build commit: 42f6f47 (42f6f477d9c331e3f8098ad33221b9f17c377866, parent: 14196dbfa3eb7c30195251eac092b1b86c8a2d84)

mati865 Avatar
rust-bors Avatar

📌 Commit 7c4cf96 has been approved by mati865

It is now in the queue for this repository.