]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #106927 - Ezrashaw:e0606-make-machine-applicable, r=estebank
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 19 Jan 2023 10:19:34 +0000 (11:19 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Jan 2023 10:19:34 +0000 (11:19 +0100)
make `CastError::NeedsDeref` create a `MachineApplicable` suggestion

Fixes #106903

Simple impl for the linked issue. I also made some other small changes:
- `CastError::ErrorGuaranteed` now owns an actual `ErrorGuaranteed`. This better enforces the static guarantees of `ErrorGuaranteed`.
- `CastError::NeedDeref` code simplified a bit, we now just suggest the `*`, instead of the whole expression as well.

1  2 
compiler/rustc_hir/src/hir.rs

Simple merge