Skip to content

Commit

Permalink
Rollup merge of rust-lang#87183 - RalfJung:option-doctest, r=jyn514
Browse files Browse the repository at this point in the history
fix typo in compile_fail doctest

Fixes a typo introduced by rust-lang#86211. For some reason this typo makes Miri go all crazy when running libcore doctests (rust-lang/miri#1852). Kudos to `@hyd-dev` for noticing the typo.

Cc `@tlyu` `@joshtriplett`
  • Loading branch information
GuillaumeGomez committed Jul 17, 2021
2 parents cf296c0 + 0d3d6f0 commit ed4b003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
//! // 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),
//! }
Expand Down

0 comments on commit ed4b003

Please sign in to comment.