Implement try block expressions#52602
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
6fe5f79 to
26c185a
Compare
This comment has been minimized.
This comment has been minimized.
|
Ok, I think this is in good enough for a review pass. I've never touched most of these parts of the compiler before, so I suspect there are opportunities for improvement in how I did things 🙃 |
src/libsyntax_pos/symbol.rs
Outdated
There was a problem hiding this comment.
Nit: Keywords are not normally moved into the "used" category until the feature is stable (e.g. macro/yield/async are all "reserved for future use").
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Should probably rename this to try_expr?
|
r? @nikomatsakis for re-assignment. I don't think I'm the right person to review this. |
|
@bors r+ |
|
📌 Commit ec85915c5ccf9ec1ba2b4183add0fe7efbbaa00c has been approved by |
|
@bors r- |
|
One question: do we want to provide a kind of smoother path for people using |
|
Or do we just not care :) |
|
@nikomatsakis Here's a sourcegraph query for it, https://sourcegraph.com/search?q=repogroup:crates+case:yes++%5Cbdo%5Cs%2Bcatch%5Cb+max:400 Most of these occurrences are irrelevant and so I think we should not care. |
|
Also; having the feature called |
|
@bors retry |
|
⌛ Testing commit 0095471 with merge 127d02057977122d7ca0707c27d3ce2a4cbd66db... |
|
💔 Test failed - status-travis |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
I'm cursed today:
|
|
@bors retry |
|
☀️ Test successful - status-appveyor, status-travis |
fix clippy breakage due to rust-lang/rust#52602
|
As a heads up, we've got a pretty serious issue which may be a bit of a roadblock for this. Currently the compiler doesn't actually warn about usages of the For the edition we'll need to have at least some warning for users of the |
`async` was added in rust-lang/rust#50307 and is not yet implemented `try` was added in rust-lang/rust#52602 and is not yet stable: rust-lang/rust#31436
I noticed that
trywasn't a keyword yet in Rust 2018, so...Fixes #52604That was fixed by PR #53135cc #31436 #50412