-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
declare_interior_mutable_const
, borrow_interior_mutable_const
: resolve <T as Trait>::AssocT
projections
#14125
Conversation
declare_interior_mutable_const
, borrow_interior_mutable_const
: resolve <T as Trait>::AssocT
projections
This is a great idea! Would you like to implement it here, in another PR or would you like for someone else (probably me) to implement it? |
I think I might give it a try myself, but definitely in a separate PR, because for now I just want to unblock rust-lang/rust#136316 |
Oh I didn't know this was a blocking PR, sorry for the wait. I'll be swift in the reviews then. |
No problem, it's nothing urgent. In fact it is not even 100% blocking. We can just avoid using |
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.
LGTM, thanks! ❤️
For transparency, I had to open a thread on Zulip asking for some assistance because try_normalize_erasing_regions was out of my area of expertise, and with that newly-found knowledge, I think this is a good use of the function.
Also, compiler-errors took a look at this and he also thinks it's fine.
Yay, that is reassuring. As for the |
changelog: [
declare_interior_mutable_const
,borrow_interior_mutable_const
]: resolve<T as Trait>::AssocT
projectionsThis came up during rust-lang/rust#130543 where we have
<T as AtomicPrimitive>::Assoc = AtomicT
instead of justAtomicT
and clippy failed to resolve that properly.This really needs a review, because
try_normalize_erasing_regions
is the right thing to call here.ValTree::Branch
layers (I think I do).Also, shouldn't this lint's infrastructure rely on
Freeze
trait (rust-lang/rust#121675) instead of hardcoding a list of known-to-be-interior-mutable types?Previously filed this in the main rust repo (rust-lang/rust#136369), was asked to do it here instead (rust-lang/rust#136369 (comment)).