9c5b6b2201
Improve the "try using a variant of the expected type" hint. Fix https://github.com/rust-lang/rust/issues/65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.