Closed
Description
#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
forx.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 paramT
forFoo<i32, T, _>
"- remember the used parameters in
ty_to_string
for this
- remember the used parameters in
- 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 usingchannel()
.
- change
-
impl_candidates
inemit_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