-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Remove unneeded forbid_generic field from Res::SelfTyAlias
#150589
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 unneeded forbid_generic field from Res::SelfTyAlias
#150589
Conversation
|
HIR ty lowering was modified cc @fmease |
This comment has been minimized.
This comment has been minimized.
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.
thanks :3 can merge this once the link is removed from the commit description like the bot message talks about
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.
Ditto with what Boxy said.
The `forbid_generic` field in `Res::SelfTyAlias` is no longer needed. The check for generic `Self` types in anonymous constants is now handled by `check_param_uses_if_mcg` in HIR type lowering, making this field redundant. This removes: - The `forbid_generic` field from `Res::SelfTyAlias` - The hack in `rustc_resolve` that set `forbid_generic: true` when encountering `Self` in constant items - Related pattern matching and field propagation code
1952b0e to
cc563d5
Compare
Clean. |
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.
Thanks!
|
@bors r=camelid,BoxyUwU rollup |
…neric-field, r=camelid,BoxyUwU Remove unneeded `forbid_generic` field from `Res::SelfTyAlias` Following rust-lang#150519, the `forbid_generic` field in `Res::SelfTyAlias` is no longer needed and can be removed. - Remove the `forbid_generic: bool` field from `Res::SelfTyAlias` - Simplify the ConstantItem rib handling in `rustc_resolve` - no longer need to mutate res to set `forbid_generic: true` - Update all pattern matches and constructors of `SelfTyAlias` Closes rust-lang#150579 r? `@camelid`
Rollup of 5 pull requests Successful merges: - #150558 (Detect cases where `?` is applied on a type that could be coming from a different crate version than expected) - #150570 (Removed confusing diagnostics note for trait required for `?` operator use) - #150589 (Remove unneeded `forbid_generic` field from `Res::SelfTyAlias`) - #150635 (triagebot: Add a mention for `dec2flt`, `flt2dec`, and `fmt/num.rs`) - #150637 (Fix broken edit links in Unstable and rustc books) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #150589 - AprilNEA:remove-unneeded-forbid-generic-field, r=camelid,BoxyUwU Remove unneeded `forbid_generic` field from `Res::SelfTyAlias` Following #150519, the `forbid_generic` field in `Res::SelfTyAlias` is no longer needed and can be removed. - Remove the `forbid_generic: bool` field from `Res::SelfTyAlias` - Simplify the ConstantItem rib handling in `rustc_resolve` - no longer need to mutate res to set `forbid_generic: true` - Update all pattern matches and constructors of `SelfTyAlias` Closes #150579 r? ``@camelid``
Following #150519, the
forbid_genericfield inRes::SelfTyAliasis no longer needed and can be removed.forbid_generic: boolfield fromRes::SelfTyAliasrustc_resolve- no longer need to mutate res to setforbid_generic: trueSelfTyAliasCloses #150579
r? @camelid