Repository navigation
Copy over some methods from At to InferCtxt - #163978
rust-bors[bot] merged 3 commits into
Conversation
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? lcnr |
2904319 to
8880c1b
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
hmm, this change by itself feels somewhat 🤷 would it be easier to copy these methods over one by one instead of one PR which copies the method and then having later PRs which copy these methods incrementally? right now we have a weird intermediate state where it's unclear which of the At vs InferCtxt methods should be used, while we don't have that when incrementally copying methods over to the |
|
I'd rather copy the methods in this module all at once, then start picking out the use of At methods individually shortly afterwards. Could mark the At methods as soft-depreciated in their doc comments? |
|
sure, I guess, please add a "FIXME: Should be removed in favor of the methods directly on |
| /// call like `foo(x)`, where `foo: fn(i32)`, you might have | ||
| /// `sup(i32, x)`, since the "expected" type is the type that | ||
| /// appears in the signature. | ||
| pub fn sup<T>( |
There was a problem hiding this comment.
I feel like we may want to name all these functions X_raw with a comment that one should prefer the wrappers on either ObligationCtxt, FnCtxt or rustc_borrowck::TypeChecker when available
|
@bors r+ rollup |
…hods-on-infctxt, r=lcnr Copy over some methods from At to InferCtxt Replaces rust-lang#163448. @lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
…hods-on-infctxt, r=lcnr Copy over some methods from At to InferCtxt Replaces rust-lang#163448. @lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
…uwer Rollup of 8 pull requests Successful merges: - #164196 (`rust-analyzer` subtree update) - #164037 (Restrict application of optimization attributes from instance) - #164201 (Improve `--bless` output for `tests/debuginfo`) - #164202 ([rustdoc] Move the creation of `IndividualTestOptions` into the test runner closure to ensure the temporary folder is removed right after the test is done running) - #162140 (fn_addr_eq: we actually can guarantee basically nothing) - #163946 (Fix transmutability type mismatch bug) - #163978 (Copy over some methods from At to InferCtxt) - #164045 (-Zassumptions-on-binders: replace region vars with bound vars when handling alias outlives')
Rollup merge of #163978 - fallible-algebra:at-removal/at-methods-on-infctxt, r=lcnr Copy over some methods from At to InferCtxt Replaces #163448. @lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
Replaces #163448.
@lcnr wants the
Atstruct removed, this is the first step in doing that. This change naively copies over some of the methods fromAtontoInferCtxtwithout removing any calls toInferCtxt::ator theAtmethods themselves.