about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-13 19:46:18 +0000
committerbors <bors@rust-lang.org>2023-11-13 19:46:18 +0000
commit85b84504669c6c779fab7b96fbe5b26635067cd1 (patch)
treec886e631cff3492babebfafb1c3e4085f7fb8186 /compiler/rustc_errors/src
parent531cb83fcfaa7568e2475c11e4e13ff4d9e06c01 (diff)
parented512e91d0318cb06ea2b3729198e64090b5648e (diff)
downloadrust-85b84504669c6c779fab7b96fbe5b26635067cd1.tar.gz
rust-85b84504669c6c779fab7b96fbe5b26635067cd1.zip
Auto merge of #116866 - slanterns:inspect-stabilize, r=BurntSushi
Stabilize `result_option_inspect`

This PR stabilizes `result_option_inspect`:

```rust
// core::option

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

// 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;
}
```

<br>

Tracking issue: https://github.com/rust-lang/rust/issues/91345.
Implementation PR: https://github.com/rust-lang/rust/pull/91346.

Closes https://github.com/rust-lang/rust/issues/91345.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index dd462cc6486..8ae95cbeed2 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -10,7 +10,6 @@
 #![feature(if_let_guard)]
 #![feature(let_chains)]
 #![feature(never_type)]
-#![feature(result_option_inspect)]
 #![feature(rustc_attrs)]
 #![feature(yeet_expr)]
 #![feature(try_blocks)]