Skip to content

Commit 9f73f16

Browse files
committed
Remove more mentions of the feature name.
1 parent e493dad commit 9f73f16

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

library/core/src/primitive_docs.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,13 @@ mod prim_bool {}
130130
/// [`Result<String, !>`] which we can unpack like this:
131131
///
132132
/// ```
133-
/// #![feature(exhaustive_patterns)]
134133
/// use std::str::FromStr;
135134
/// let Ok(s) = String::from_str("hello");
136135
/// ```
137136
///
138-
/// Since the [`Err`] variant contains a `!`, it can never occur. If the `exhaustive_patterns`
139-
/// feature is present this means we can exhaustively match on [`Result<T, !>`] by just taking the
140-
/// [`Ok`] variant. This illustrates another behaviour of `!` - it can be used to "delete" certain
141-
/// enum variants from generic types like `Result`.
137+
/// Since the [`Err`] variant contains a `!`, it can never occur. This means we can exhaustively
138+
/// match on [`Result<T, !>`] by just taking the [`Ok`] variant. This illustrates another behaviour
139+
/// of `!` - it can be used to "delete" certain enum variants from generic types like `Result`.
142140
///
143141
/// ## Infinite loops
144142
///

library/std/src/primitive_docs.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,13 @@ mod prim_bool {}
130130
/// [`Result<String, !>`] which we can unpack like this:
131131
///
132132
/// ```
133-
/// #![feature(exhaustive_patterns)]
134133
/// use std::str::FromStr;
135134
/// let Ok(s) = String::from_str("hello");
136135
/// ```
137136
///
138-
/// Since the [`Err`] variant contains a `!`, it can never occur. If the `exhaustive_patterns`
139-
/// feature is present this means we can exhaustively match on [`Result<T, !>`] by just taking the
140-
/// [`Ok`] variant. This illustrates another behaviour of `!` - it can be used to "delete" certain
141-
/// enum variants from generic types like `Result`.
137+
/// Since the [`Err`] variant contains a `!`, it can never occur. This means we can exhaustively
138+
/// match on [`Result<T, !>`] by just taking the [`Ok`] variant. This illustrates another behaviour
139+
/// of `!` - it can be used to "delete" certain enum variants from generic types like `Result`.
142140
///
143141
/// ## Infinite loops
144142
///

tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ pub struct IndirectUninhabitedVariants(UninhabitedVariants);
2929

3030
struct A;
3131

32-
// This test checks that an empty match on a non-exhaustive uninhabited type through a level of
33-
// indirection from the defining crate will not compile without `#![feature(exhaustive_patterns)]`.
34-
3532
fn cannot_empty_match_on_empty_enum_to_anything(x: IndirectUninhabitedEnum) -> A {
3633
match x {}
3734
}

0 commit comments

Comments
 (0)