diff options
| author | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-03-31 01:26:55 +0200 |
|---|---|---|
| committer | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-03-31 01:26:55 +0200 |
| commit | 73d33ed1bafdf3c0b32e936492eb6a9cdd9b080c (patch) | |
| tree | 6d3f66cc67fe7f4eb6a79f82389cfe6b59b3de93 /library/core/src | |
| parent | 45b40a75966b36d3588f173441896fddad01cd80 (diff) | |
| download | rust-73d33ed1bafdf3c0b32e936492eb6a9cdd9b080c.tar.gz rust-73d33ed1bafdf3c0b32e936492eb6a9cdd9b080c.zip | |
Remove mention of `exhaustive_patterns` from `never` docs
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/primitive_docs.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index 89c856fe107..ba4c849837e 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -127,15 +127,13 @@ mod prim_bool {} /// [`Result<String, !>`] which we can unpack like this: /// /// ``` -/// #![feature(exhaustive_patterns)] /// use std::str::FromStr; /// let Ok(s) = String::from_str("hello"); /// ``` /// -/// Since the [`Err`] variant contains a `!`, it can never occur. If the `exhaustive_patterns` -/// feature is present this means we can exhaustively match on [`Result<T, !>`] by just taking the -/// [`Ok`] variant. This illustrates another behavior of `!` - it can be used to "delete" certain -/// enum variants from generic types like `Result`. +/// Since the [`Err`] variant contains a `!`, it can never occur. This means we can exhaustively +/// match on [`Result<T, !>`] by just taking the [`Ok`] variant. This illustrates another behavior +/// of `!` - it can be used to "delete" certain enum variants from generic types like `Result`. /// /// ## Infinite loops /// |
