can_eq
This works correctly with inference variables.
For more information about how rustc works, see the rustc dev guide.