Skip to content

stabilise ?, attributes on stmts, deprecate Reflect - #36995

Merged
bors merged 4 commits into
rust-lang:masterfrom
nrc:stable
Oct 13, 2016
Merged

stabilise ?, attributes on stmts, deprecate Reflect#36995
bors merged 4 commits into
rust-lang:masterfrom
nrc:stable

Conversation

@nrc

@nrcnrc commented Oct 6, 2016

Copy link
Copy Markdown
Member

@ManishearthManishearth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, not sure if libs/lang team folks need to sign off. r=me otherwise

Comment threadsrc/librustc/diagnostics.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

doesn't this text apply to ? as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe he removed it because its not accurate anymore: #36988

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

No, annoyingly you get an error message about the Carrier trait

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.

propogation -> propagation

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.

? is built in to the language and is more succinct than try!, it is the standard method for error propogation.

These are two separate sentences and probably shouldn't be separated by a comma.

@frewsxcv

Copy link
Copy Markdown
Contributor

For the sake of cross-linking, here's the link to the tracking issue: #31436

@nrc

nrc commented Oct 6, 2016

Copy link
Copy Markdown
MemberAuthor

Also cc #15701, #27749

@nrcnrc added beta-nominated Nominated for backporting to the compiler in the beta channel. beta-accepted Accepted for backporting to the compiler in the beta channel. labels Oct 6, 2016
@bors

bors commented Oct 7, 2016

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #36945) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis

Copy link
Copy Markdown
Contributor

This looks good to me, though I do think we ought to try and address #36988.

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 11, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit adb4e2f has been approved by nikomatsakis

@bluss

Copy link
Copy Markdown
Contributor

What's the type inference situation? It used to be that replacing try!(x) with x? would not infer as often.

Has this been cratered to look for such issues?

@nrc

nrc commented Oct 11, 2016

Copy link
Copy Markdown
MemberAuthor

@bluss good point, I had mis-remembered this issue. We have indeed done a bunch of Crater runs, but to test whether ? is forwards compatible with the Carrier trait, which requires some backwards incompatibility between try! and ?. I don't think we can ever replace the implementation of try! in a backwards compatible way and that shouldn't be in this PR.

@bors: r-

Nick Cameron added 4 commits October 12, 2016 08:40
cc [`?` tracking issue](rust-lang#31436)
Note that attributes on expressions are still unstable and are behind the `stmt_expr_attributes` flag.
cc [Tracking issue](rust-lang#15701)
@nrc

nrc commented Oct 11, 2016

Copy link
Copy Markdown
MemberAuthor

@bors: r=@nikomatsakis

@bors

bors commented Oct 11, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 79b5177 has been approved by @nikomatsakis

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 12, 2016
stabilise ?, attributes on stmts, deprecate Reflect
r? @nikomatsakis
bors added a commit that referenced this pull request Oct 12, 2016
@nikomatsakis

Copy link
Copy Markdown
Contributor

@nrc

I don't think we can ever replace the implementation of try! in a backwards compatible way and that shouldn't be in this PR.

argh, I missed that this change was even in the PR! good catch @bluss

@bors
bors merged commit 79b5177 into rust-lang:masterOct 13, 2016
@nrcnrc mentioned this pull request Oct 18, 2016
@brsonbrson mentioned this pull request Oct 19, 2016
@alexcrichtonalexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 19, 2016
@brsonbrson mentioned this pull request Nov 7, 2016
dtolnay added a commit to dtolnay/erased-serde that referenced this pull request Dec 24, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@nrc@frewsxcv@bors@nikomatsakis@bluss@Manishearth@msjyoo@petrochenkov@est31@alexcrichton