Skip to content

Document try!'s error conversion behaviour - #36099

Merged
bors merged 1 commit into
rust-lang:masterfrom
skade:better-try-documentation
Sep 3, 2016
Merged

Document try!'s error conversion behaviour#36099
bors merged 1 commit into
rust-lang:masterfrom
skade:better-try-documentation

Conversation

@skade

Copy link
Copy Markdown
Contributor

try!'s documentation currently doesn't document the error conversion behaviour of the macro. This patch extends the documentation.

Open questions:

  • is it worthwhile to have seperate examples with and without wrapping behaviour? It's not immediately obvious that From for T is always defined. Though this is necessary for the macro to work in any case, is this the place to expect that knowledge.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

Comment threadsrc/libcore/macros.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Can/It can/

Comment threadsrc/libcore/macros.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"unwrap" is an unfortunate choice of words here, since unwrap() is a method, and it doesn't use it

@skade
skadeforce-pushed the better-try-documentation branch from ac71520 to 33ba3dfCompareAugust 29, 2016 17:54
@skade

Copy link
Copy Markdown
ContributorAuthor

Fixed all comments.

@skade
skadeforce-pushed the better-try-documentation branch from 33ba3df to dea3179CompareAugust 29, 2016 18:06
@skade
skadeforce-pushed the better-try-documentation branch from dea3179 to 0f8eb81CompareSeptember 1, 2016 17:17
@skade

skade commented Sep 1, 2016

Copy link
Copy Markdown
ContributorAuthor

@steveklabnik updated. Made it more concise (hopefully) and direct.

@steveklabnik

Copy link
Copy Markdown
Contributor

I'm into it. Build failure looks spurious. Thanks!

@bors: r+ rollup

@bors

bors commented Sep 1, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 0f8eb81 has been approved by steveklabnik

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…teveklabnik
Document try!'s error conversion behaviour
try!'s documentation currently doesn't document the error conversion behaviour of the macro. This patch extends the documentation.
Open questions:
* is it worthwhile to have seperate examples with and without wrapping behaviour? It's not immediately obvious that From<T> for T is always defined. Though this is necessary for the macro to work in any case, is this the place to expect that knowledge.
@sophiajtsophiajt mentioned this pull request Sep 2, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…teveklabnik
Document try!'s error conversion behaviour
try!'s documentation currently doesn't document the error conversion behaviour of the macro. This patch extends the documentation.
Open questions:
* is it worthwhile to have seperate examples with and without wrapping behaviour? It's not immediately obvious that From<T> for T is always defined. Though this is necessary for the macro to work in any case, is this the place to expect that knowledge.
@sophiajtsophiajt mentioned this pull request Sep 2, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…teveklabnik
Document try!'s error conversion behaviour
try!'s documentation currently doesn't document the error conversion behaviour of the macro. This patch extends the documentation.
Open questions:
* is it worthwhile to have seperate examples with and without wrapping behaviour? It's not immediately obvious that From<T> for T is always defined. Though this is necessary for the macro to work in any case, is this the place to expect that knowledge.
@sophiajtsophiajt mentioned this pull request Sep 2, 2016
bors added a commit that referenced this pull request Sep 3, 2016
@bors
bors merged commit 0f8eb81 into rust-lang:masterSep 3, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@skade@rust-highfive@steveklabnik@bors@apasel422@aturon