Skip to content

Rustc does not recommend raising the recursion limit #38852

Closed
@bluss

Description

@bluss
Member

It used to be that when you reach the macro recursion limit, rustc would recommend raising it and give the attribute to do so. This has been lost.

Expected Result:

Diagnostic tells how to increase recursion limit.

Actual Result:

No note/help.

Reproduce (playground gist)

macro_rules! recurse {
    () => { };
    ($t:tt $($tail:tt)*) => { recurse!($($tail)*) };
}

fn main() {
    recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9);
}

Activity

added
A-diagnosticsArea: Messages for errors, warnings, and lints
on Jan 5, 2017
bluss

bluss commented on Jan 5, 2017

@bluss
MemberAuthor

rust.godbolt.org doesn't show the help to raise the limit for historical Rust release, maybe I am mistaken that this is a regression.

durka

durka commented on Jan 5, 2017

@durka
Contributor

There surely was a situation in which you could get the suggestion, and it won't regress because there is a test. But maybe it never showed up for macro evaluation?

durka

durka commented on Jan 5, 2017

@durka
Contributor

I can work on this.

added a commit that references this issue on Mar 2, 2017

Rollup merge of rust-lang#39655 - durka:recursion-limit-suggestion, r…

afb9831
added a commit that references this issue on Mar 2, 2017

Auto merge of #39655 - durka:recursion-limit-suggestion, r=nikomatsakis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @durka@bluss

        Issue actions

          Rustc does not recommend raising the recursion limit · Issue #38852 · rust-lang/rust