From 1f38c472c26ab07001193c3983f9cee0feba8e50 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 21 Nov 2020 15:53:33 -0600 Subject: [PATCH] remove unstable book chapter --- .../src/language-features/or-patterns.md | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/doc/unstable-book/src/language-features/or-patterns.md diff --git a/src/doc/unstable-book/src/language-features/or-patterns.md b/src/doc/unstable-book/src/language-features/or-patterns.md deleted file mode 100644 index 55c31add26d..00000000000 --- a/src/doc/unstable-book/src/language-features/or-patterns.md +++ /dev/null @@ -1,36 +0,0 @@ -# `or_patterns` - -The tracking issue for this feature is: [#54883] - -[#54883]: https://github.com/rust-lang/rust/issues/54883 - ------------------------- - -The `or_pattern` language feature allows `|` to be arbitrarily nested within -a pattern, for example, `Some(A(0) | B(1 | 2))` becomes a valid pattern. - -## Examples - -```rust,no_run -#![feature(or_patterns)] - -pub enum Foo { - Bar, - Baz, - Quux, -} - -pub fn example(maybe_foo: Option) { - match maybe_foo { - Some(Foo::Bar | Foo::Baz) => { - println!("The value contained `Bar` or `Baz`"); - } - Some(_) => { - println!("The value did not contain `Bar` or `Baz`"); - } - None => { - println!("The value was `None`"); - } - } -} -```