Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GrigorenkoPV
Copy link
Contributor

@GrigorenkoPV GrigorenkoPV commented Jan 31, 2025

changelog: [declare_interior_mutable_const, borrow_interior_mutable_const]: resolve <T as Trait>::AssocT projections


This came up during rust-lang/rust#130543 where we have <T as AtomicPrimitive>::Assoc = AtomicT instead of just AtomicT and clippy failed to resolve that properly.

This really needs a review, because

  • I don't know if try_normalize_erasing_regions is the right thing to call here.
  • I'm not sure if I peel off the correct amount of 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)).

@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2025

r? @blyxyas

rustbot has assigned @blyxyas.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 31, 2025
@GrigorenkoPV GrigorenkoPV changed the title Resolve projections during internal mutability analysis declare_interior_mutable_const, borrow_interior_mutable_const: resolve <T as Trait>::AssocT projections Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants