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

Fix line numbers for MIR inlined code #103071

Merged
merged 2 commits into from
Oct 28, 2022

Commits on Oct 14, 2022

  1. Configuration menu
    Copy the full SHA
    9363a14 View commit details
    Browse the repository at this point in the history
  2. Fix line numbers for MIR inlined code

    `should_collapse_debuginfo` detects if the specified span is part of a
    macro expansion however it does this by checking if the span is anything
    other than a normal (non-expanded) kind, then the span sequence is
    walked backwards to the root span.
    
    This doesn't work when the MIR inliner inlines code as it creates spans
    with expansion information set to `ExprKind::Inlined` and results in the
    line number being attributed to the inline callsite rather than the
    normal line number of the inlined code.
    wesleywiser committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    34d90a4 View commit details
    Browse the repository at this point in the history