about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-27 05:21:18 +0100
committerGitHub <noreply@github.com>2024-03-27 05:21:18 +0100
commit19a40ec5bf41d4bf5a8635be511ac9cb84308f25 (patch)
treef17426859245d97e33698d2ee87cb979ca0470fe /compiler/rustc_interface/src
parentfc51dbd379ec80000343fa03315a113b2389c454 (diff)
parent07d3806eb1a9dcfc6acdc54476c9cc2b7bbbad7b (diff)
downloadrust-19a40ec5bf41d4bf5a8635be511ac9cb84308f25.tar.gz
rust-19a40ec5bf41d4bf5a8635be511ac9cb84308f25.zip
Rollup merge of #123107 - avandesa:vec_pop_if, r=joboet
Implement `Vec::pop_if`

This PR adds `Vec::pop_if` to the public API, behind the `vec_pop_if` feature.

```rust
impl<T> Vec<T> {
    pub fn pop_if<F>(&mut self, f: F) -> Option<T>
        where F: FnOnce(&mut T) -> bool;
}
```

Tracking issue: #122741

## Open questions

- [ ] Should the first unit test be split up?
- [ ] I don't see any guidance on ordering of methods in impl blocks, should I move the method elsewhere?
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions