- 
        Couldn't load subscription status. 
- Fork 13.9k
Split {ast,hir,...}::Static(Mutability) into Static and StaticMut. #60110
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
Conversation
| r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) | 
| 
 This seems like a step backwards wrt. #54912 and extending it to arbitrary patterns, e.g.  | 
| r? @oli-obk | 
| This is impractical, IMO. See the next comment regarding data in  | 
| How I see  
 
 The most commonly used cached data is the " Mutability in  | 
| I definitely prefer #60124. In fact my first reaction to this PR was "why isn't it using the  | 
| FWIW, I'm already doing the refactor in question, and  | 
Staticis currently the only variant ofDefthat describes anItemand contains more than theDefIdof that item (i.e. it contains the mutability).This lack of uniformity is making some refactors/cleanups a bit harder, or more annoying.
There are primarily two alternatives, AFAICT:
StaticMutits own kind of item/def (this PR)is_const_fn)DefIdand not{ast,hir}::ItemKind::StaticI was hoping 1. would be simpler than it turned out to be, but I did the work anyway, so I'm presenting this PR for people to judge which approach they prefer.
(e.g. all the changes to
Static | StaticMut, in patterns, would be unnecessary for 2.)cc @petrochenkov @oli-obk @nikomatsakis @michaelwoerister