about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-03-31 14:36:23 +0200
committerGitHub <noreply@github.com>2025-03-31 14:36:23 +0200
commit6cf2d185eaae1c7ef56aa78c8930117ac950c1ae (patch)
tree406e21f1c7b33abc2b42755ac86ba8df89acd3d4
parentb17948ad522b42665bcd1718f8c01b17c17fc9db (diff)
parent73d33ed1bafdf3c0b32e936492eb6a9cdd9b080c (diff)
downloadrust-6cf2d185eaae1c7ef56aa78c8930117ac950c1ae.tar.gz
rust-6cf2d185eaae1c7ef56aa78c8930117ac950c1ae.zip
Rollup merge of #139157 - mejrs:never, r=Noratrieb
Remove mention of `exhaustive_patterns` from `never` docs

The example shows an exhaustive match:
```rust
#![feature(exhaustive_patterns)]
use std::str::FromStr;
let Ok(s) = String::from_str("hello");
```
But https://github.com/rust-lang/rust/issues/119612 moved this functionality to `#![feature(min_exhaustive_patterns)` and then stabilized it.
-rw-r--r--library/core/src/primitive_docs.rs8
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
 ///