-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove body_def_id
from Inherited
#108960
Conversation
Some changes occurred in need_type_info.rs cc @lcnr |
c2ed166
to
fd34549
Compare
if let Some(body_id) = self.tcx.hir().maybe_body_owned_by( | ||
self.tcx.typeck_root_def_id(body_def_id.to_def_id()).expect_local(), | ||
) { |
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 is the only "interesting" part of this PR, I think.
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.
Oh oh oh :), this is what I needed :), typeck_root_def_id
, I was trying something very similar in my last PR.
Great! That's as much possible confusion removed. |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#108879 (Unconstrained terms should account for infer vars being equated) - rust-lang#108936 (Rustdoc: don't hide anonymous reexport) - rust-lang#108940 (Add myself to compiler reviewers list) - rust-lang#108945 (Make some report and emit errors take DefIds instead of BodyIds) - rust-lang#108946 (Document the resulting values produced when using `From<bool>` on floats) - rust-lang#108956 (Make ptr::from_ref and ptr::from_mut in rust-lang#106116 const.) - rust-lang#108960 (Remove `body_def_id` from `Inherited`) - rust-lang#108963 (only call git on git checkouts during bootstrap) - rust-lang#108964 (Fix the docs for pointer method with_metadata_of) Failed merges: - rust-lang#108950 (Directly construct Inherited in typeck.) r? `@ghost` `@rustbot` modify labels: rollup
We can just use the body id from the obligation cause.
Follow-up to #108945, only my commit is relevant.
r? @cjgillot cc @spastorino