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

Emit coercion suggestions in more places #67009

Merged
merged 2 commits into from
Dec 7, 2019

Commits on Dec 4, 2019

  1. Emit coercion suggestions in more places

    Fixes rust-lang#66910
    
    We have several different kinds of suggestions we can try to make when
    type coercion fails. However, we were previously only emitting these
    suggestions from `demand_coerce_diag`. This resulted in the compiler
    failing to emit applicable suggestions in several different cases, such
    as when the implicit return value of a function had the wrong type.
    
    This commit adds a new `emit_coerce_suggestions` method, which tries to
    emit a number of related suggestions. This method is called from both
    `demand_coerce_diag` and `CoerceMany::coerce_inner`, which covers a much
    wider range of cases than before.
    
    We now suggest using `.await` in more cases where it is applicable,
    among other improvements.
    Aaron1011 committed Dec 4, 2019
    Configuration menu
    Copy the full SHA
    462f06d View commit details
    Browse the repository at this point in the history
  2. Disable issue-59756 test for now

    Currently, rustfix has no notion of mutually exclusive suggestions. When
    it processes issue-59756, it will attempt to apply two mutually
    exclusive suggestions for the same span, causing an error.
    Aaron1011 committed Dec 4, 2019
    Configuration menu
    Copy the full SHA
    a6883c0 View commit details
    Browse the repository at this point in the history