about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-09-17 14:56:48 +1000
committerGitHub <noreply@github.com>2025-09-17 14:56:48 +1000
commit61f53585aae6f3bdada28a2ddd05b759b90150b8 (patch)
treee5ac0f735aef330b8da2e3b704dec11077933422 /compiler/rustc_llvm/llvm-wrapper
parent6473a0f02d6549dc25d8f98b3d06f80fa453fe49 (diff)
parente9270e3cba3da56d4d83ed74f648e53b041cb263 (diff)
downloadrust-61f53585aae6f3bdada28a2ddd05b759b90150b8.tar.gz
rust-61f53585aae6f3bdada28a2ddd05b759b90150b8.zip
Rollup merge of #146581 - estebank:issue-146489, r=lcnr
Detect attempt to use var-args in closure

```
error: unexpected `...`
  --> $DIR/no-closure.rs:11:14
   |
LL |     let f = |...| {};
   |              ^^^ not a valid pattern
   |
   = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list

error: unexpected `...`
  --> $DIR/no-closure.rs:16:17
   |
LL |     let f = |_: ...| {};
   |                 ^^^
   |
   = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
```

Fix rust-lang/rust#146489, when trying to use c-style var-args in a closure. We emit a more targeted message. We also silence inference errors when the pattern is `PatKind::Err`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions