small normalization improvement#127570
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 10, 2024
Merged
Conversation
fmease
reviewed
Jul 10, 2024
| /// | ||
| /// Rephrased, could this term be normalized further? | ||
| const HAS_ALIASES = TypeFlags::HAS_TY_PROJECTION.bits() | ||
| const HAS_ALIAS = TypeFlags::HAS_TY_PROJECTION.bits() |
fmease
reviewed
Jul 10, 2024
| @@ -230,7 +230,7 @@ pub trait TypeVisitableExt<I: Interner>: TypeVisitable<I> { | |||
| } | |||
|
|
|||
| fn has_aliases(&self) -> bool { | |||
Member
There was a problem hiding this comment.
Suggested change
| fn has_aliases(&self) -> bool { | |
| fn has_alias(&self) -> bool { |
too (my bad)
Contributor
Author
There was a problem hiding this comment.
interstingly, we do use the plural for the functions, e.g. we have has_inherent_projections and has_opaque_types even though the type flag is HAS_TY_OPAQUE
Contributor
There was a problem hiding this comment.
let's leave this one
| match reveal { | ||
| Reveal::UserFacing => {} | ||
| Reveal::All => flags |= ty::TypeFlags::HAS_TY_OPAQUE, | ||
| Reveal::UserFacing => flags ^= ty::TypeFlags::HAS_TY_OPAQUE, |
Contributor
There was a problem hiding this comment.
is it possible to & with the complement here? xor feels confusing to reason about
compiler-errors
approved these changes
Jul 10, 2024
Contributor
|
@bors r+ rollup |
Collaborator
klensy
reviewed
Jul 10, 2024
Comment on lines
-120
to
+118
| Reveal::UserFacing => {} | ||
| Reveal::All => flags |= ty::TypeFlags::HAS_TY_OPAQUE, | ||
| Reveal::UserFacing => flags.remove(ty::TypeFlags::HAS_TY_OPAQUE), | ||
| Reveal::All => {} |
Contributor
There was a problem hiding this comment.
Logic here now inverted, is it ok?
Contributor
There was a problem hiding this comment.
Ahh, HAS_TY_OPAQUE wasn't in flags before.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 10, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0) - rust-lang#127094 (E0191 suggestion correction, inserts turbofish) - rust-lang#127554 ( do not run test where it cannot run) - rust-lang#127564 (Temporarily remove me from review rotation.) - rust-lang#127568 (instantiate higher ranked goals in candidate selection again) - rust-lang#127569 (Fix local download of Docker caches from CI) - rust-lang#127570 ( small normalization improvement) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 10, 2024
Rollup merge of rust-lang#127570 - lcnr:normalize-cool, r=compiler-errors small normalization improvement r? `@compiler-errors`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r? @compiler-errors