-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
small normalization improvement #127570
small normalization improvement #127570
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ bitflags::bitflags! { | |
/// Does this have `ConstKind::Param`? | ||
const HAS_CT_PARAM = 1 << 2; | ||
|
||
const HAS_PARAM = TypeFlags::HAS_TY_PARAM.bits() | ||
const HAS_PARAM = TypeFlags::HAS_TY_PARAM.bits() | ||
| TypeFlags::HAS_RE_PARAM.bits() | ||
| TypeFlags::HAS_CT_PARAM.bits(); | ||
|
||
|
@@ -27,7 +27,7 @@ bitflags::bitflags! { | |
|
||
/// Does this have inference variables? Used to determine whether | ||
/// inference is required. | ||
const HAS_INFER = TypeFlags::HAS_TY_INFER.bits() | ||
const HAS_INFER = TypeFlags::HAS_TY_INFER.bits() | ||
| TypeFlags::HAS_RE_INFER.bits() | ||
| TypeFlags::HAS_CT_INFER.bits(); | ||
|
||
|
@@ -39,7 +39,7 @@ bitflags::bitflags! { | |
const HAS_CT_PLACEHOLDER = 1 << 8; | ||
|
||
/// Does this have placeholders? | ||
const HAS_PLACEHOLDER = TypeFlags::HAS_TY_PLACEHOLDER.bits() | ||
const HAS_PLACEHOLDER = TypeFlags::HAS_TY_PLACEHOLDER.bits() | ||
| TypeFlags::HAS_RE_PLACEHOLDER.bits() | ||
| TypeFlags::HAS_CT_PLACEHOLDER.bits(); | ||
|
||
|
@@ -81,7 +81,7 @@ bitflags::bitflags! { | |
/// Does this have `Alias` or `ConstKind::Unevaluated`? | ||
/// | ||
/// Rephrased, could this term be normalized further? | ||
const HAS_ALIASES = TypeFlags::HAS_TY_PROJECTION.bits() | ||
const HAS_ALIAS = TypeFlags::HAS_TY_PROJECTION.bits() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| TypeFlags::HAS_TY_WEAK.bits() | ||
| TypeFlags::HAS_TY_OPAQUE.bits() | ||
| TypeFlags::HAS_TY_INHERENT.bits() | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -230,7 +230,7 @@ pub trait TypeVisitableExt<I: Interner>: TypeVisitable<I> { | |||||
} | ||||||
|
||||||
fn has_aliases(&self) -> bool { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
too (my bad) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interstingly, we do use the plural for the functions, e.g. we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's leave this one |
||||||
self.has_type_flags(TypeFlags::HAS_ALIASES) | ||||||
self.has_type_flags(TypeFlags::HAS_ALIAS) | ||||||
} | ||||||
|
||||||
fn has_inherent_projections(&self) -> bool { | ||||||
|
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.
Logic here now inverted, is it ok?
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.
Ahh,
HAS_TY_OPAQUE
wasn't inflags
before.