-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 6 pull requests #69720
Rollup of 6 pull requests #69720
Conversation
PR rust-lang#69562, which fixed a bug that was causing clippy to ICE, passed the place for the *result* of `Rvalue::Discriminant` instead of the *operand* to `apply_discriminant_switch_effect`. As a result, no effect was applied at all, and we lost the perf benefits from marking inactive enum variants as uninitialized.
The Result can be expect-unwrapped directly. (clippy::ok_expect)
…x| Some(y)) (clippy::option_and_then_some)
…nd anything. For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
… type. These were introduced since I last fixed most of these occurences. (clippy::clone_on_copy, clippy::single_char_pattern)
Update books ## nomicon 8 commits in 3e6e1001dc6e095dbd5c88005e80969f60e384e1..9f797e65e6bcc79419975b17aff8e21c9adc039f 2019-12-14 22:08:52 +0000 to 2020-03-04 03:45:13 +0100 - Rustup to latest rustc (rust-lang/nomicon#203) - (minor) Add backticks around type names (rust-lang/nomicon#197) - Add book.toml (rust-lang/nomicon#185) - Rename `Alloc` to `AllocRef` (rust-lang/nomicon#188) - Lifetimes: explain how to fix destructor example (rust-lang/nomicon#195) - mention soundness (rust-lang/nomicon#194) - Fix example in FFI section Calling Rust from C (rust-lang/nomicon#193) - Removed repeated word (rust-lang/nomicon#191) ## reference 8 commits in 64239df..559e09c 2020-02-10 19:05:13 +0100 to 2020-03-02 01:17:14 +0100 - Syntax error fix (rust-lang/reference#769) - Fix incorrect pseudocode for #[repr(C)] struct alignment (rust-lang/reference#766) - Replace "Field-Less" with "Fieldless" (rust-lang/reference#768) - Removed repeated word (rust-lang/reference#767) - Update for change in const lint name. (rust-lang/reference#764) - semantic type -> resolved type (rust-lang/reference#761) - add behavior change of relative paths without `self` in 2018 edition (rust-lang/reference#757) - assignment operator expressions -> compound assignment expressions (rust-lang/reference#759) ## rust-by-example 3 commits in 32facd5522ddbbf37baf01e4e4b6562bc55c071a..db57f899ea2a56a544c8d280cbf033438666273d 2020-02-11 09:25:06 -0300 to 2020-02-18 17:46:46 -0300 - Minor typo fix in src/mod/visibility (rust-lang/rust-by-example#1309) - Don't suggest Into implements a reverse conversion (rust-lang/rust-by-example#1307) - Improve grammar in example of 'in let' section (rust-lang/rust-by-example#1308) ## embedded-book 2 commits in b2e1092bf67bd4d7686c4553f186edbb7f5f92db..b81ffb7a6f4c5aaed92786e770e99db116aa4ebd 2020-01-30 08:45:46 +0000 to 2020-02-27 08:06:04 +0000 - Setting output to `high` needs a `true` argument (rust-embedded/book#227) - Add licence notes to index.md (rust-embedded/book#226)
…t, r=oli-obk Pass correct place to `discriminant_switch_effect` PR rust-lang#69562, which fixed a bug that was causing clippy to ICE, mistakenly passed the place holding the *result* of `Rvalue::Discriminant` instead of the place holding its *operand* to `apply_discriminant_switch_effect` as the enum place. As a result, no effect was applied at all, and we lost the perf benefits from marking inactive enum variants as uninitialized. This PR corrects that mistake and adds a regression test to `mir-opt`. I fear that the regression test may prove too brittle; the test schema makes hard to test for the *absence* of certain kinds of MIR without exhaustively matching each basic block. r? @oli-obk
…=Dylan-DPC Add explanation for E0380 r? @Dylan-DPC
Use associated constants of integer types Take advantage of rust-lang#68952 in the interpreter and some nearby modules :)
Update macros.rs: fix documentation typo.
more clippy cleanups * Don't use .ok() before unwrapping via .expect() on a Result. * Use .map() to modify data inside Options instead of using .and_then(|x| Some(y)) * Use .as_deref() instead of .as_ref().map(Deref::deref) * Don't use "if let" bindings to only check a value and not actually bind anything. * Use single-char patter on {ends,starts}_with and remove clone on copy type.
@bors r+ rollup=never p=6 |
📌 Commit 251ac68 has been approved by |
@bors r+ |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 251ac68 has been approved by |
@bors r+ |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 251ac68 has been approved by |
⌛ Testing commit 251ac68 with merge 6eb76db0490e6d61deca6ee56ef4b577f525d358... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
Left a comment to the PR, closing. |
Successful merges:
discriminant_switch_effect
#69676 (Pass correct place todiscriminant_switch_effect
)Failed merges:
r? @ghost