Skip to content

Commit 278407a

Browse files
committed
doc: let-else is now stable
The `let else` feature was stabilized by [rust-lang/rust#93628][1] in Rust 1.65.0. [1]: rust-lang/rust#93628
1 parent 8fb7853 commit 278407a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ assert!(enums[1].is_var2());
103103
fn this_fn_expects_var1(foo: &Enum<[u8; 4]>) {
104104
let (i0, i1) = try_match!(foo, &Var1([_0, _, _, _1])).unwrap();
105105

106-
// Once RFC 1303 is stabilized, you can do instead:
107-
// let &Var1([i0, _, _, i1]) = foo else { panic!("{:?}", foo) };
106+
// Alternatively, you could use let-else (stabilized in Rust 1.65.0):
107+
// let &Var1([i0, _, _, i1]) = foo else { panic!("{foo:?}") };
108108

109109
assert_eq!((i0, i1), (42, 45));
110110
}

0 commit comments

Comments
 (0)