about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-25 05:24:30 +0000
committerbors <bors@rust-lang.org>2020-08-25 05:24:30 +0000
commitc30341ddec0b99bb3bd8bb5fd8c8451778c78330 (patch)
treea7482a95b884e75d2a2bd66e4d2c40223a552e05 /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentee541284bf5008bb0425fae02412352025099707 (diff)
parentd6185f931435a161525f41d270207e33faa26ea2 (diff)
downloadrust-c30341ddec0b99bb3bd8bb5fd8c8451778c78330.tar.gz
rust-c30341ddec0b99bb3bd8bb5fd8c8451778c78330.zip
Auto merge of #75132 - scottmcm:stabilize-range-is-empty, r=dtolnay
Stabilize Range[Inclusive]::is_empty

I would like to propose these two simple methods for stabilization:
- Knowing that a range is exhausted isn't otherwise trivial
- Clippy would like to suggest them, but had to do extra work to disable that path <https://github.com/rust-lang/rust-clippy/issues/3807> because they're unstable
- These work on `PartialOrd`, consistently with the stable `contains` method, and are thus more general than iterator-based approaches that need `Step`
- They've been unchanged for some time, and have picked up uses in the compiler
- Stabilizing them doesn't block any future iterator-based `is_empty` plans, as these inherent ones are preferred in name resolution

https://doc.rust-lang.org/nightly/std/ops/struct.Range.html#method.is_empty
https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#method.is_empty

Closes #48111
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions