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

Don't ICE when logging unusual types #57865

Merged
merged 1 commit into from
Jan 25, 2019
Merged

Commits on Jan 23, 2019

  1. Don't ICE when logging unusual types

    MonoItemExt#to_string is used for both debug logging and LLVM symbol
    name generation. When debugging, we want to print out any type we
    encounter, even if it's something weird like GeneratorWitness. However,
    during codegen, we still want to error if we encounter an unexpected
    type when generating a name.
    
    To resolve this issue, this commit introduces a new 'debug' parameter to
    the relevant methods. When set to 'true', it allows any type to be
    printed - when set to 'false', it 'bug!'s when encountering an
    unexpected type.
    
    This prevents an ICE when enabling debug logging (via RUST_LOG) while
    running rustc on generator-related code.
    Aaron1011 committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    fc0c883 View commit details
    Browse the repository at this point in the history