Skip to content

rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.#66789

Merged
bors merged 3 commits intorust-lang:masterfrom
eddyb:mir-source-scope-local-data
Dec 2, 2019
Merged

rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.#66789
bors merged 3 commits intorust-lang:masterfrom
eddyb:mir-source-scope-local-data

Conversation

@eddyb
Copy link
Copy Markdown
Member

@eddyb eddyb commented Nov 26, 2019

By having one ClearCrossCrate<SourceScopeLocalData> for each scope, as opposed to a single ClearCrossCrate for all the SourceScopeLocalDatas, we can represent the fact that some scopes have SourceScopeLocalData associated with them, and some don't.

This is useful when doing MIR inlining across crates, because the ClearCrossCrate will be Clear for the cross-crate MIR scopes and Set for the local ones.

Also see #66203 (comment) for some context around this approach.

Fixes #51314.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken MIR: scope[1] index exists, but source_scope_local_data.len() == 1

6 participants