-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Refactor TyStruct/TyEnum/TyUnion into TyAdt
#36331
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
|
The diff looks much better with whitespaces ignored https://github.com/rust-lang/rust/pull/36331/files?w=1 |
src/librustc/ty/layout.rs
Outdated
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.
The guard is unnecessary (because non_zero means it's the NonZero lang item).
|
LGTM modulo somewhat minor |
src/librustc/middle/dead.rs
Outdated
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.
What happens here if sty here was a TyEnum previously?
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.
struct_variant() reports another span_bug!
|
Updated, comments addressed. |
|
@bors r+ |
|
📌 Commit 553d5f0 has been approved by |
Refactor `TyStruct`/`TyEnum`/`TyUnion` into `TyAdt` r? @eddyb
r? @eddyb