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

suggest doubling recursion limit in more situations #39655

Merged
merged 2 commits into from
Mar 2, 2017

Conversation

durka
Copy link
Contributor

@durka durka commented Feb 8, 2017

Fixes #38852.

r? @bluss


error[E0055]: reached the recursion limit while auto-dereferencing I
|
= help: consider adding a `#[recursion_limit="20"]` attribute to your crate
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This duplicate error shouldn't be here and yet it is. cc #38940 @jseyfried

@durka durka force-pushed the recursion-limit-suggestion branch 2 times, most recently from fbaef50 to 422b789 Compare February 9, 2017 06:35
@durka durka force-pushed the recursion-limit-suggestion branch from 422b789 to b4993ec Compare February 9, 2017 06:40
@durka
Copy link
Contributor Author

durka commented Feb 28, 2017

r?

ei.callee.name()));
err.note(&format!(
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate",
suggested_limit));
Copy link
Member

Choose a reason for hiding this comment

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

Can this be .help() too or is there a reason it can't?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think it can be.

44 | is_send::<A>();
| ^^^^^^^^^^^^
|
= note: consider adding a `#![recursion_limit="20"]` attribute to your crate
Copy link
Member

Choose a reason for hiding this comment

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

This will need update to help I think

@bluss
Copy link
Member

bluss commented Feb 28, 2017

Thanks. I'll approve this after checking with rustc devs

@eddyb
Copy link
Member

eddyb commented Feb 28, 2017

r? @nikomatsakis

@durka durka force-pushed the recursion-limit-suggestion branch from 80cd3cf to e1773cb Compare February 28, 2017 18:57
@rust-highfive rust-highfive assigned nikomatsakis and unassigned bluss Feb 28, 2017
ei.callee.name()));
err.help(&format!(
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate",
suggested_limit));
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should factor this code into some sort of helper?

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like it'd also be nice to make this into an error code ("recursion limit reached") with a note giving the specific details. That way, we could give an extended error description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Where should I put the helper and diagnostic code? Note that the PR is split across libsyntax and librustc_typeck.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Can we only put diagnostic codes into rustc crates? I'm not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are diagnostic codes in libsyntax. Can I define it there and use the same one from librustc_typeck?

Copy link
Contributor

Choose a reason for hiding this comment

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

Meh. I think we should improve this, but it's not that big a deal.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 1, 2017

📌 Commit e1773cb has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 2, 2017

⌛ Testing commit e1773cb with merge f46ed40...

@bors
Copy link
Contributor

bors commented Mar 2, 2017

💔 Test failed - status-appveyor

@durka durka force-pushed the recursion-limit-suggestion branch from e1773cb to 6e259dc Compare March 2, 2017 07:11
@durka
Copy link
Contributor Author

durka commented Mar 2, 2017

Should be fixed.

@bluss
Copy link
Member

bluss commented Mar 2, 2017

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 2, 2017

📌 Commit 6e259dc has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 2, 2017

⌛ Testing commit 6e259dc with merge 907f26d...

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 2, 2017
…=nikomatsakis

suggest doubling recursion limit in more situations

Fixes rust-lang#38852.

r? @bluss
@frewsxcv
Copy link
Member

frewsxcv commented Mar 2, 2017

@bors retry

@bors
Copy link
Contributor

bors commented Mar 2, 2017

⌛ Testing commit 6e259dc with merge 5907ed6...

bors added a commit that referenced this pull request Mar 2, 2017
suggest doubling recursion limit in more situations

Fixes #38852.

r? @bluss
@bors
Copy link
Contributor

bors commented Mar 2, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 5907ed6 to master...

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.

6 participants