about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-01 10:50:22 +0100
committerGitHub <noreply@github.com>2021-12-01 10:50:22 +0100
commitce197e2bceca00372c172a02a966b96287476c55 (patch)
treec9ea56c75b2c5ce11db09ba35d50ba517fc73c42 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentc09c16c0dff47b1ec143c266c3c06acdc84a4257 (diff)
parent2e8358e1ab933c6599b40294c0b33a1a17d19a23 (diff)
downloadrust-ce197e2bceca00372c172a02a966b96287476c55.tar.gz
rust-ce197e2bceca00372c172a02a966b96287476c55.zip
Rollup merge of #91346 - ibraheemdev:result-inspect, r=dtolnay
Add `Option::inspect` and `Result::{inspect, inspect_err}`

```rust
// core::result

impl Result<T, E> {
    pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
    pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self;
}

// core::option

impl Option<T> {
    pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
}
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions