doc: discuss try! in std::io#12817
Conversation
- Repurposes `MoveData.assignee_ids` to mean only `=` but not `+=`, so that borrowck effectively classifies all expressions into assignees, uses or both. - Removes two `span_err` in liveness analysis, which are now borrowck's responsibilities. Closes rust-lang#12527.
- Repurposes `MoveData.assignee_ids` to mean only `=` but not `+=`, so
that borrowck effectively classifies all expressions into assignees,
uses or both.
- Removes two `span_err` in liveness analysis, which are now borrowck's
responsibilities.
Closes rust-lang#12527.
There was a problem hiding this comment.
The title of this section should be enclosed in backticks (to show that the try macro is code). How about wording like this for this paragraph:
Explicit pattern matching on
IoResults often gets quite verbose, especially when many I/O operations are being performed. Some examples (like those above) are alleviated with extra methods implemented onIoResult, but others have more complex interdependencies among each I/O operation.The
try!macro fromstd::macrosis provided as a method of early-return insideResult-returning functions. It expands to an early-return onErrand otherwise unwraps the wrappedOkvalue.
|
Hey @tari, thanks for the PR, but did you mean to close it? (Looks like you may've deleted the branch accidentally?) |
|
Correct; fumbling with git a bit trying to squash edits (I'm usually a mercurial user). Will open a new PR when I get things sorted out. |
std::macros::try says to refer to std::io for more information. This patch adds an example of try! when doing I/O. Redo of #12817 following some fumbling with git.
…nicola Upgrade to expect-test@1.4.0, add CARGO_WORKSPACE_DIR env var This should make ra's test suite runnable from within `rust-analyzer/rust`. `@cuviper` ran into that when trying to run RA tests from rust CI: rust-lang#99444 (comment)
Don't lint `assertions_on_constants` on any const assertions close rust-lang#12816 close rust-lang#12847 cc rust-lang#12817 ---- changelog: Fix false positives in consts for `assertions_on_constants` and `unnecessary_operation`.
std::macros::try says to refer to std::io for more information. This patch adds an example of try! when doing I/O.