-
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
Rollup of 10 pull requests #82443
Merged
Merged
Rollup of 10 pull requests #82443
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
Clean up code
Before this change, the suggestion was `std::panic::panic_any(123]`, changing the opening brace but not the closing one.
An attempt to compute HIR stats for crates with nested foreign items results in an ICE. ``` fn main() { extern "C" { fn f(); } } ``` ``` thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor' ``` Provide required implementation of visitor method.
Changes from 81473 extended the dead code lint with an ability to detect fields that are written to but never read from. The implementation skips over fields on the left hand side of an assignment, without marking them as live. A field access might involve an automatic dereference and de-facto read the field. Conservatively mark expressions with deref adjustments as live to avoid generating false positive warnings.
Update conflict_errors.rs Add deref definition location
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Fixes rust-lang#81918 Fixes rust-lang#82326 (duplicate) Fixes rust-lang#82325
I left some of them so this change doesn't balloon in size and because removing the RefCell in `DocContext.resolver` would require compiler changes. Thanks to `@jyn514` for making this a lot easier with rust-lang#82020!
…1011 Point out implicit deref coercions in borrow Fixes rust-lang#81365 `@Aaron1011` I'm not sure why my code shows the note even in an implicit `Deref` call. See the output for `issue-81365-8.rs`.
Improve non_fmt_panic lint. This change: - fixes the span used by this lint in the case the panic argument is a single macro expansion (e.g. `panic!(a!())`); - adds a suggestion for `panic!(format!(..))` to remove `format!()` instead of adding `"{}", ` or using `panic_any` like it does now; and - fixes the incorrect suggestion to replace `panic![123]` by `panic_any(123]`. Fixes rust-lang#82109. Fixes rust-lang#82110. Fixes rust-lang#82111. Example output: ``` warning: panic message is not a string literal --> src/main.rs:8:12 | 8 | panic!(format!("error: {}", "oh no")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(non_fmt_panic)]` on by default = note: this is no longer accepted in Rust 2021 = note: the panic!() macro supports formatting, so there's no need for the format!() macro here help: remove the `format!(..)` macro call | 8 | panic!("error: {}", "oh no"); | -- -- ``` r? `@estebank`
Implement -Z hir-stats for nested foreign items An attempt to compute HIR stats for crates with nested foreign items results in an ICE. ```rust fn main() { extern "C" { fn f(); } } ``` ``` thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor' ``` Provide required implementation of visitor method.
Support `pub` on `macro_rules` This rebases and updates `since` version of rust-lang#78166 from ``@petrochenkov`` r? ``@nikomatsakis``
Consider auto derefs before warning about write only fields Changes from rust-lang#81473 extended the dead code lint with an ability to detect fields that are written to but never read from. The implementation skips over fields on the left hand side of an assignment, without marking them as live. A field access might involve an automatic dereference and de-facto read the field. Conservatively mark expressions with deref adjustments as live to avoid generating false positive warnings. Closes rust-lang#81626.
Remove many RefCells from DocContext I left some of them so this change doesn't balloon in size and because removing the RefCell in `DocContext.resolver` would require compiler changes. Thanks to `@jyn514` for making this a lot easier with rust-lang#82020! r? `@jyn514`
Lower condition of `if` expression before it's "then" block Fix rust-lang#82290, fix rust-lang#82250.
…s, r=jyn514 Jsondocck improvements Adds 2 new commands, ```@is``` and ```@set`.`` ```@is``` works like ```@has`,`` except instead of checking if any value matches, it checks that there is exactly one value, and it matches. This allows more precise testing. ```@set``` gets a value, and saves it to be used later. This makes it possible to check that an item appears in the correct module. Once this lands, the rest of the test suite can be upgraded to use these. cc ``@CraftSpider`` ``@rustbot`` modify labels: +T-rustdoc +A-rustdoc-json +A-testsuite
Fix mir-cfg dumps Fixes rust-lang#81918 Fixes rust-lang#82326 (duplicate) Fixes rust-lang#82325 --- r? ``@oli-obk``
disable atomic_max/min tests in Miri Disable some tests that currently [fail in Miri](https://travis-ci.com/github/RalfJung/miri-test-libstd/builds/217788631).
@bors r+ rollup=never p=5 |
📌 Commit 51511c7 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
Feb 23, 2021
☀️ Test successful - checks-actions |
This was referenced Feb 23, 2021
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:
pub
onmacro_rules
#82296 (Supportpub
onmacro_rules
)if
expression before it's "then" block #82308 (Lower condition ofif
expression before it's "then" block)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup