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

Handle recursive instantiation of drop shims #67731

Merged
merged 1 commit into from Jan 17, 2020

Conversation

@matthewjasper
Copy link
Contributor

matthewjasper commented Dec 30, 2019

The compiler used to hang because the recursion limit was never hit.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 30, 2019

r? @zackmdavis

(rust_highfive has picked a reviewer for you, use r? to override)

@matthewjasper

This comment has been minimized.

Copy link
Contributor Author

matthewjasper commented Dec 30, 2019

r? @eddyb since they reviewed the PR that introduced this.

@rust-highfive rust-highfive assigned eddyb and unassigned zackmdavis Dec 30, 2019
@@ -434,7 +434,7 @@ fn check_recursion_limit<'tcx>(
// Code that needs to instantiate the same function recursively
// more than the recursion limit is assumed to be causing an
// infinite expansion.
if recursion_depth > *tcx.sess.recursion_limit.get() {
if adjusted_recursion_depth > *tcx.sess.recursion_limit.get() {
let error = format!("reached the recursion limit while instantiating `{}`", instance);
if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
tcx.sess.span_fatal(tcx.hir().span(hir_id), &error);

This comment has been minimized.

Copy link
@eddyb

eddyb Jan 16, 2020

Member

I feel like we should just search for hir().span and replace as many of them as possible...
(this should be tcx.def_span(def_id) and not check for def_id being local, but always use span_fatal).

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jan 16, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 16, 2020

📌 Commit 4843f22 has been approved by eddyb

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 17, 2020

⌛️ Testing commit 4843f22 with merge 91ff7c6...

bors added a commit that referenced this pull request Jan 17, 2020
Handle recursive instantiation of drop shims

The compiler used to hang because the recursion limit was never hit.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 17, 2020

☀️ Test successful - checks-azure
Approved by: eddyb
Pushing 91ff7c6 to master...

@bors bors added the merged-by-bors label Jan 17, 2020
@bors bors merged commit 4843f22 into rust-lang:master Jan 17, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20191230.38 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 17, 2020

📣 Toolstate changed by #67731!

Tested on commit 91ff7c6.
Direct link to PR: #67731

💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 17, 2020
Tested on commit rust-lang/rust@91ff7c6.
Direct link to PR: <rust-lang/rust#67731>

💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).
@matthewjasper matthewjasper deleted the matthewjasper:drop-in-place-reclimit branch Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.