Remove the At struct in favor of just splatting the fields into function parameters. - #163448
fallible-algebra wants to merge 9 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
|
changes to the core type system cc @lcnr Some changes occurred in engine.rs, potentially modifying the public API of cc @lcnr Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor
cc @rust-lang/clippy |
|
rustbot has assigned @JonathanBrouwer. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
A lot of the |
| if infcx | ||
| .at(&cause, param_env) | ||
| .relate(DefineOpaqueTypes::Yes, source_ty, ty::Variance::Invariant, target_ty) | ||
| .relate_at( |
There was a problem hiding this comment.
jup, please just infcx.relate. no need for the at 😁
| let impl_ty = self.normalize(span, tcx.type_of(impl_def_id).instantiate(tcx, args)); | ||
| let self_ty = self.normalize(span, Unnormalized::new_wip(self_ty)); | ||
| match self.at(&self.misc(span), self.param_env).eq( | ||
| match self.eq_at( |
There was a problem hiding this comment.
i'd like us to be consistent with the order of fields
I think normalize does span, relevant data and looking at ObligatioNCtxt, it's Span, env, data. So please change all methods to also have that order 😊
| expression_ty | ||
| }) | ||
| fcx.eq_at( | ||
| // needed for tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs |
There was a problem hiding this comment.
comment should stay on DefineOpaqueTypes::Yes
also. Why are we using at here. We should be using some FnCtxt::eq method 🤔 we have FnCtxt::demand_eq but no eq which doesn't eagerly error. I guess that makes sense as eq outside of a probe always taints the root context. I guess that's separate from this PR 😁 so nothing to do here
| infcx: self.infcx, | ||
| cause: self.cause, | ||
| param_env: self.param_env, | ||
| infcx: &self, |
There was a problem hiding this comment.
why &self 🤔 shouldn't self already be &InferCtxt?
36ab6d4 to
48dcf59
Compare
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #163609) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
AKA "splat the
At"Draft as I still need to rebase.