-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Check lazy type aliases for well-formedness #114228
Conversation
compiler/rustc_lint/src/builtin.rs
Outdated
|| ty.has_opaque_types() | ||
|| ty.has_inherent_projections() | ||
{ | ||
// Bounds of lazy type aliases and on eager ones that contain opaque types or inherent |
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.
Let me know if the phrasing is ok, bounds sounds ambiguous to me. One might wonder it refers to the bounds on the generic parameters (which is the case) or if it refers to the item bounds (i.e. the B
in type T: B = …
which is obviously invalid for type aliases).
Update: Done. |
aaf9e2d
to
4308ce6
Compare
This comment has been minimized.
This comment has been minimized.
4308ce6
to
fc41ee0
Compare
☔ The latest upstream changes (presumably #114226) made this pull request unmergeable. Please resolve the merge conflicts. |
fc41ee0
to
0ca4328
Compare
@bors r+ rollup |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#114111 (Improve test case for experimental API remove_matches) - rust-lang#114169 (refactor builtin unsize handling, extend comments) - rust-lang#114182 (clean up after 113312) - rust-lang#114193 (Update lexer emoji diagnostics to Unicode 15.0) - rust-lang#114200 (Detect trait upcasting through struct tail unsizing in new solver select) - rust-lang#114228 (Check lazy type aliases for well-formedness) - rust-lang#114267 (Map RPITIT's opaque type bounds back from projections to opaques) - rust-lang#114269 (Migrate GUI colors test to original CSS color format) - rust-lang#114286 (Add missing feature gate in multiple_supertrait_upcastable doc) r? `@ghost` `@rustbot` modify labels: rollup
Previously we didn't check if
T: Mul
holds given lazytype Alias<T> = <T as Mul>::Output;
.Now we do. It only makes sense.
@rustbot label F-lazy_type_alias
r? @oli-obk