Skip to content

Tracking Issue for post #89862 cleanup #94483

Closed
@lcnr

Description

@lcnr

#89862 rewrote the inference error reporting, but slightly worsened some causes or requires some additional improvements.

  • readd a special diagnostic for for loops
  • maybe readd handling for try expressions ?
  • add InferSource for x.into() to <Type as Into<_>>::into(x)
  • add ty_msg back if no infer source is found
  • in the suggested type, try to only print _ for things while are fully inferred and use some different stuff for unresolved inference vars, e.g "specify the generic param T for Foo<i32, T, _>"
    • remember the used parameters in ty_to_string for this
  • remember the inferred type for InferSource::GenericArg and use them to compute the cost and for the error msg, generally improve cost computation, e.g. channel()
    • change source_cost to improve the diagnostics when using channel().
  • impl_candidates in emit_inference_failure_err IMPORTANT
  • figure out how to not mention macro internals in error messages.
  • fix the explicit FIXME(#89862) in some tests
  • inference var origins: https://github.com/rust-lang/rust/pull/89862/files#r870179263
  • figure out how to best deal with rewrite error handling for unresolved inference vars #89862 (comment)
  • autoborrow method call
  • ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.rs fixme
  • help: type parameter declared here readd maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions