-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Is TypeFlags::NOMINAL_FLAGS unnecessary now? #70836
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
Comments
If it contains all the flags, then it seems to have no purpose. I'm honestly not sure what the name "nominal" is even meant to refer to here exactly -- I'm sure I gave it that name, but it's not very clear. I guess the point is "flags that should be inherited by containing types; ie., if the type Are there any flags that don't meet that definition anymore? |
@nikomatsakis I think there were "nominal flags" and "cached properties" (using interior mutability), but now the latter is completely gone. |
that sounds right. I'd be in favor of removing |
I would love to help with this one. A quick search shows that rust/src/librustc_middle/ty/flags.rs Lines 30 to 32 in 537ccdf
Looks like this could just be changed to Is that all it will take? |
Sounds correct, yeah. |
Cool great |
Oops, I'm still learning git. Sorry for the spam there. Only 4cdb206 is relevant. |
Remove unnecessary TypeFlags::NOMINAL_FLAGS This was a relic from when we had "nominal flags" and "cached properties." The latter no longer exists, so nominal flags are no longer necessary. In fact, every flag is considered a nominal flag. I went ahead and removed all references to NOMINAL_FLAGS. Fixes rust-lang#70836
This seems to contain all the flags in
TypeFlags
. If I'm guessing right, the flags that used to not be in here, all turned into queries? So they're now cached as queries, instead of by mutatingTy
itself?rust/src/librustc_middle/ty/mod.rs
Lines 603 to 624 in af89eb5
cc @nikomatsakis @Zoxc
The text was updated successfully, but these errors were encountered: