]> git.lizzy.rs Git - rust.git/commitdiff
fix typo in compile_fail doctest
authorRalf Jung <post@ralfj.de>
Fri, 16 Jul 2021 08:31:56 +0000 (10:31 +0200)
committerRalf Jung <post@ralfj.de>
Fri, 16 Jul 2021 08:31:56 +0000 (10:31 +0200)
library/core/src/option.rs

index b7af3ea8c1af4e5680cec669f5e88a0884eb4687..c27db0767ac9d9cb90f48374c0455c8efb965707 100644 (file)
 //! // must have the same concrete type.
 //! fn make_iter(do_insert: bool) -> impl Iterator<Item = i32> {
 //!     // Explicit returns to illustrate return types not matching
-//!     match x {
+//!     match do_insert {
 //!         true => return (0..4).chain(once(42)).chain(4..8),
 //!         false => return (0..4).chain(empty()).chain(4..8),
 //!     }