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 cycle error when emitting suggestion for mismatched fn type #69936

Merged
merged 1 commit into from
Mar 27, 2020

Commits on Mar 11, 2020

  1. Fix cycle error when emitting suggestion for mismatched fn type

    Fixes rust-lang#66667
    
    Previously, we called `tcx.typeck_tables_of` when determining whether or
    not to emit a suggestion for a type error. However, we might already be
    type-checking the `DefId` we pass to `typeck_tables_of` (it could be
    anywhere in the query stack).
    
    Fortunately, we only need the function signature, not the entire
    `TypeckTables`. By using `tcx.fn_sig`, we avoid the possibility of cycle
    errors while retaining the ability to emit a suggestion.
    Aaron1011 committed Mar 11, 2020
    Configuration menu
    Copy the full SHA
    ff65bff View commit details
    Browse the repository at this point in the history