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

inliner: use caller param_env #77568

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Oct 5, 2020

We used the callee param env instead of the caller param env by accident in #77430, this PR fixes that and caches it in the Inliner struct.

fixes #77564

r? @ecstatic-morse

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2020
@ecstatic-morse
Copy link
Contributor

Damn. Thanks @lcnr

@bors r+

@bors
Copy link
Contributor

bors commented Oct 5, 2020

📌 Commit daf48b8 has been approved by ecstatic-morse

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2020
@@ -300,9 +301,6 @@ impl Inliner<'tcx> {
debug!(" final inline threshold = {}", threshold);

// FIXME: Give a bonus to functions with only a single caller

let param_env = tcx.param_env(callee_body.source.def_id());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: this was wrong even if it used the caller source as we have to use a ParamEnv with RevealAll. This caused an ICE in #77306

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 6, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#76784 (Add some docs to rustdoc::clean::inline and def_id functions)
 - rust-lang#76911 (fix VecDeque::iter_mut aliasing issues)
 - rust-lang#77400 (Fix suggestions for x.py setup)
 - rust-lang#77515 (Update to chalk 0.31)
 - rust-lang#77568 (inliner: use caller param_env)
 - rust-lang#77571 (Use matches! for core::char methods)
 - rust-lang#77582 (Move `EarlyOtherwiseBranch` to mir-opt-level 2)
 - rust-lang#77590 (Update RLS and Rustfmt)
 - rust-lang#77605 (Fix rustc_def_path to show the full path and not the trimmed one)
 - rust-lang#77614 (Let backends access span information)
 - rust-lang#77624 (Add c as a shorthand check alternative for new options rust-lang#77603)

Failed merges:

r? `@ghost`
@bors bors merged commit 83c58d6 into rust-lang:master Oct 7, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 7, 2020
@lcnr lcnr deleted the mir-inline-def-id branch October 7, 2020 08:01
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 10, 2020
require `Reveal::All` in `normalize_erasing_regions`

would have caught a bug in mir inlining, see rust-lang#77568 (comment)
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.

[ICE] in normalize_erasing_regions with mir-opt-level=2
5 participants