Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustup to https://github.com/rust-lang/rust/pull/66789 #4873

Merged
merged 2 commits into from
Dec 2, 2019

Conversation

phansch
Copy link
Member

@phansch phansch commented Dec 2, 2019

changelog: none

@phansch
Copy link
Member Author

phansch commented Dec 2, 2019

maybe r? @oli-obk (this PR resulted from moving mir::SourceScopeLocalData to SourceScopeData in rust-lang/rust#66789)

scope_local_data[terminator.source_info.scope].lint_root
let scope = terminator.source_info.scope;
let node = if let mir::ClearCrossCrate::Set(scope_local_data) = &mir.source_scopes[scope].local_data {
scope_local_data.lint_root
} else {
unreachable!()
Copy link
Member

Choose a reason for hiding this comment

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

If you're going to panic, please use .as_ref().assert_crate_local() like I did in my PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense, thanks!

`assert_crate_local` does the same as the previous `if let` but with a
more explicit error message if it's not a `ClearCrossCrate::Set`.
@eddyb
Copy link
Member

eddyb commented Dec 2, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 2, 2019

@eddyb: 🔑 Insufficient privileges: Not in reviewers

@matthiaskrgr
Copy link
Member

@bors r=eddyb

@bors
Copy link
Collaborator

bors commented Dec 2, 2019

📌 Commit 474e9a1 has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Dec 2, 2019

⌛ Testing commit 474e9a1 with merge 574f3fd...

bors added a commit that referenced this pull request Dec 2, 2019
@bors
Copy link
Collaborator

bors commented Dec 2, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: eddyb
Pushing 574f3fd to master...

@bors bors merged commit 474e9a1 into rust-lang:master Dec 2, 2019
Sign up for free to 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.

4 participants