Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumentation for `?` operator and `Option` does not mention that `?` can be used with `Option` #1679
Comments
steveklabnik
added
the
Enhancement
label
Dec 12, 2018
This comment has been minimized.
This comment has been minimized.
arienmalec
commented
Dec 20, 2018
|
One more point: Documentation for As an example: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
arienmalec commentedDec 11, 2018
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:
Trytrait and corresponding?operator work withOptionas well as withResultand the?operator can returnNoneto the surrounding function (if the return from that function is declared asOption<T>as well asErr(if the return is declared asResult).?in anOptioncontext or forward reference 9.3 (or a subsequent section) that documents?in anOptioncontext.