mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 03:36:21 +00:00

Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType` The ordering of ty var unification means that we may end up with a root variable whose ty var origin is from another item's params. Let's not rely on this by just unifying the infer vars with the params of the impl + resolving. It's kinda goofy but it's clearer IMO. Fixes #132826. r? `@fmease` or `@lcnr`
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.