-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some initial normalization method changes #104905
Conversation
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
debug!( | ||
"instantiate_bounds(bounds={:?}, substs={:?}) = {:?}, {:?}", | ||
bounds, substs, result, spans, | ||
); | ||
(result, spans) | ||
} | ||
|
||
pub(in super::super) fn normalize_associated_types_in<T>(&self, span: Span, value: T) -> T | ||
pub(in super::super) fn normalize<T>(&self, span: Span, value: T) -> T |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This intentionally takes a span instead of an ObligationCause
because all of FnCtxt::normalize
callers would be creating misc causes.
This comment has been minimized.
This comment has been minimized.
compiler/rustc_hir_typeck/src/lib.rs
Outdated
param_env, | ||
fn_sig, | ||
); | ||
// FIXME(compiler-errors): Remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have been fixed in the next commit
Looks good to me, as soon as #104835 lands r=me |
d790e59
to
ba76acd
Compare
@bors r=spastorino |
📌 Commit ba76acdd38645f7fc29a602436cfcdff4a13a840 has been approved by It is now in the queue for this repository. |
☔ The latest upstream changes (presumably #104935) made this pull request unmergeable. Please resolve the merge conflicts. |
ba76acd
to
c5e677e
Compare
@bors r=spastorino |
📌 Commit c5e677eb2c182b87ed8d7d9788d1f7f71d7dcc0e has been approved by It is now in the queue for this repository. |
☔ The latest upstream changes (presumably #105008) made this pull request unmergeable. Please resolve the merge conflicts. |
c5e677e
to
1e236ac
Compare
Some changes occurred in engine.rs, potentially modifying the public API of cc @lcnr |
Trivial rebase @bors r=spastorino |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general notes:
- we should probably remove
struct Normalized
and always useInferOk
- we have to add/update the comments for the normalization routines
- remove
normalize_to
andnormalize
in favor ofnormalize_with_depth_to
andnormalize_with_depth
apart from that r=me
thanks ❤️
Alright, I'll do that in a follow-up PR ✨ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (24606de): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
…s, r=spastorino Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of rust-lang#104835 for convenience. r? types
…s, r=spastorino Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of rust-lang#104835 for convenience. r? types
AtExt::normalize
toQueryNormalizeExt::query_normalize
(using theQueryNormalizer
)NormalizeExt::normalize
to replacepartially_normalize_associated_types_in
(using theAssocTypeNormalizer
)FnCtxt::normalize_associated_types_in
toFnCtxt::normalize
Inherited
andFnCtxt
Also includes one drive-by where we're no longer creating a
FnCtxt
inside ofcheck_fn
, but passing it in. This means we don't need such weirdFnCtxt
construction logic.Stacked on top of #104835 for convenience.
r? types