-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 10 pull requests #79345
Merged
Merged
Rollup of 10 pull requests #79345
Conversation
This file contains 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
Also stabilize constctlz for const ctlz_nonzero. The public methods stabilized const by this commit are: * `{i*,u*}::checked_pow` * `{i*,u*}::saturating_pow` * `{i*,u*}::wrapping_pow` * `{i*,u*}::overflowing_pow` * `{i*,u*}::pow` * `u*::next_power_of_two` * `u*::checked_next_power_of_two` * `u*::wrapping_next_power_of_two` (the method itself is still unstable)
Same for constctlz.
stabilize const_int_pow This also requires stabilizing constctlz for const ctlz_nonzero.
…-schievink MIR visitor: Don't treat debuginfo field access as a use of the struct Fixes #77454. r? `@jonas-schievink`
const_generics: assert resolve hack causes an error prevent the min_const_generics `HACK`s in resolve from triggering a fallback path which successfully compiles so that we don't have to worry about future compat issues when removing it r? `@eddyb` cc `@varkor`
Allow using generic trait methods in `const fn` Next step for #67792, this now also allows code like the following: ```rust struct S; impl const PartialEq for S { fn eq(&self, _: &S) -> bool { true } } const fn equals_self<T: PartialEq>(t: &T) -> bool { *t == *t } pub const EQ: bool = equals_self(&S); ``` This works by threading const-ness of trait predicates through trait selection, in particular through `ParamCandidate`, and exposing it in the resulting `ImplSource`. Since this change makes two bounds `T: Trait` and `T: ?const Trait` that only differ in their const-ness be treated like different bounds, candidate winnowing has been changed to drop the `?const` candidate in favor of the const candidate, to avoid ambiguities when both a const and a non-const bound is present.
Use Option::and_then instead of open-coding it `@rustbot` modify labels to +C-cleanup.
Reduce boilerplate with the `?` operator `@rustbot` modify labels to +C-cleanup.
Fix typo in comment This is trivial enough I'm just going to merge without review. r? `@ghost`
doc typo plus a small edit for clarity
Use Option::map instead of open coding it r? `@jonas-schievink` since you're frequently sniping these minor cleanups anyway. `@rustbot` modify labels +C-cleanup +T-compiler
Add my (@flip1995) work mail to the mailmap
📌 Commit ea3c269 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Nov 23, 2020
☀️ Test successful - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Successful merges:
const fn
#79287 (Allow using generic trait methods inconst fn
)?
operator #79325 (Reduce boilerplate with the?
operator)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup