rust-lang/rust-clippy

`single_range_in_vec_init` should detect all kind of ranges

已關閉

#16,508 建立於 2026年2月4日

 (13 則留言) (6 個反應) (1 位負責人)Rust (1,391 個分叉)batch import
C-enhancementgood first issue

倉庫指標

星標
 (10,406 顆星)
PR 合併指標
 (平均合併 19天 22小時) (30 天內合併 113 個 PR)

描述

Description

Right now, it looks like only a..b ranges are recognized. ..a, a.., and a..=b won't trigger the lint.

clippy_utils::higher::Range might be useful here.

Version

rustc 1.95.0-nightly (366a1b93e 2026-02-03)
binary: rustc
commit-hash: 366a1b93e7f466ebe559477add05f064873d0c71
commit-date: 2026-02-03
host: x86_64-unknown-linux-gnu
release: 1.95.0-nightly
LLVM version: 22.1.0

Additional Labels

No response

貢獻者指南