-
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 11 pull requests #80105
Merged
Merged
Rollup of 11 pull requests #80105
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
See rust-lang#80045 (comment) Coverage statements are moved to the beginning of the BCB. This does also affect what's counted before a panic, changing some results, but I think these results may even be preferred? In any case, there are no guarantees about what's counted when a panic occurs (by design).
Integer types have a `count_ones` method that end up calling `intrinsics::ctpop`. On some architectures, that intrinsic is translated as a corresponding CPU instruction know as "popcount" or "popcnt". This PR makes it so that searching for those names in rustdoc shows those methods. CC https://blog.rust-lang.org/2020/11/19/Rust-1.48.html#adding-search-aliases
…thewjasper Implement if-let match guards Implements rust-lang/rfcs#2294 (tracking issue: rust-lang#51114). I probably should do a few more things before this can be merged: - [x] Add tests (added basic tests, more advanced tests could be done in the future?) - [x] Add lint for exhaustive if-let guard (comparable to normal if-let statements) - [x] Fix clippy However since this is a nightly feature maybe it's fine to land this and do those steps in follow-up PRs. Thanks a lot `@matthewjasper` ❤️ for helping me with lowering to MIR! Would you be interested in reviewing this? r? `@ghost` for now
Allow `since="TBD"` for rustc_deprecated Closes rust-lang#78381. This PR only affects `#[rustc_deprecated]`, not `#[deprecated]`, so there is no effect on any stable language feature. Likewise this PR only implements `since="TBD"`, it does not actually tag any library functions with it, so there is no effect on any stable API. Overview of changes: * `rustc_middle/stability.rs`: * change `deprecation_in_effect` function to return `false` when `since="TBD"` * tidy up the compiler output when a deprecated item has `since="TBD"` * `rustc_passes/stability.rs`: * allow `since="TBD"` to pass the sanity check for stable_version < deprecated_version * refactor the "invalid stability version" and "invalid deprecation version" error into separate errors * rustdoc: make `since="TBD"` message on a deprecated item's page match the command-line deprecation output * tests: * test rustdoc output * test that the `deprecated_in_future` lint fires when `since="TBD"` * test the new "invalid deprecation version" error message
Fix issue rust-lang#78496 EarlyOtherwiseBranch finds MIR structures like: ``` bb0: { ... _2 = discriminant(X) ... switchInt(_2) -> [1_isize: bb1, otherwise: bb3] } bb1: { ... _3 = discriminant(Y) ... switchInt(_3) -> [1_isize: bb2, otherwise: bb3] } bb2: {...} bb3: {...} ``` And transforms them into something like: ``` bb0: { ... _2 = discriminant(X) _3 = discriminant(Y) _4 = Eq(_2, _3) switchInt(_4) -> [true: bb4, otherwise: bb3] } bb2: {...} // unchanged bb3: {...} // unchanged bb4: { switchInt(_2) -> [1_isize: bb2, otherwise: bb3] } ``` But that is not always a safe thing to do -- sometimes the early `otherwise` branch is necessary so the later block could assume the value of `discriminant(X)`. I am not totally sure what's the best way to detect that, but fixing rust-lang#78496 should be easy -- we just check if `X` is a sub-expression of `Y`. A more precise test might be to check if `Y` contains a `Downcast(1)` of `X`, but I think this might be good enough. Fix rust-lang#78496
…Mark-Simulacrum expand-yaml-anchors: Make the output directory separator-insensitive Fixes rust-lang#75709
…=matthewjasper Remove unused `TyEncoder::tcx` required method Unsure if this is helpful or not... r? ``@ghost`` cc ``@matthewjasper`` ``@jackh726``
Test that `core::assert!` is valid Closes rust-lang#55482. r? `@dtolnay`
…2.1, r=tmandry Fixed conflict with drop elaboration and coverage See rust-lang#80045 (comment) Coverage statements are moved to the beginning of the BCB. This does also affect what's counted before a panic, changing some results, but I think these results may even be preferred? In any case, there are no guarantees about what's counted when a panic occurs (by design). r? `@tmandry` FYI `@wesleywiser` `@ecstatic-morse`
…r=varkor Add support for target aliases Closes rust-lang#68214, see that for more info. `@varkor`
…k-Simulacrum Revert rust-lang#78790 - rust-src vendoring This reverts the rust-src vendor changes from rust-lang#78790. There were a few issues (see rust-lang#79218, rust-lang/cargo#8962, rust-lang/cargo#8963), that I don't think will get fixed in the next few days before the beta branch. Fixes rust-lang#79218
Add `popcount` and `popcnt` as doc aliases for `count_ones` methods. Integer types have a `count_ones` method that end up calling `intrinsics::ctpop`. On some architectures, that intrinsic is translated as a corresponding CPU instruction know as "popcount" or "popcnt". This PR makes it so that searching for those names in rustdoc shows those methods. CC https://blog.rust-lang.org/2020/11/19/Rust-1.48.html#adding-search-aliases
…c_expand, r=jyn514 Remove docs for non-existent parameters in `rustc_expand`
@bors r+ p=5 rollup=never |
📌 Commit e2582e4 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
Dec 17, 2020
☀️ Test successful - checks-actions |
This was referenced Dec 17, 2020
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:
since="TBD"
for rustc_deprecated #79877 (Allowsince="TBD"
for rustc_deprecated)TyEncoder::tcx
required method #80039 (Remove unusedTyEncoder::tcx
required method)core::assert!
is valid #80069 (Test thatcore::assert!
is valid)popcount
andpopcnt
as doc aliases forcount_ones
methods. #80097 (Addpopcount
andpopcnt
as doc aliases forcount_ones
methods.)rustc_expand
#80103 (Remove docs for non-existent parameters inrustc_expand
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup