See the discussion in the following Reddit thread:
https://www.reddit.com/r/rust/comments/a4za5j/where_is_for_option_in_the_rfc_process/
Based on discussion, there is behavior released in Edition 2018 that is not documented in the Edition 2018 book, as well as behavior that is incorrectly documented:
- The
Try trait and corresponding ? operator work with Option as well as with Result and the ? operator can return None to the surrounding function (if the return from that function is declared as Option<T> as well as Err (if the return is declared as Result).
- Section 9.3 incorrectly states : "The ? operator can only be used in functions that have a return type of Result, because it is defined to work in the same way as the match expression we defined in Listing 9-6."
- Section 6.3 should either document
? in an Option context or forward reference 9.3 (or a subsequent section) that documents ? in an Option context.