Skip to content

Rustc does not recommend raising the recursion limit #38852

Closed
@bluss

Description

@bluss

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);
}

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

    Issue actions