-
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 10 pull requests #93069
Rollup of 10 pull requests #93069
Commits on Oct 7, 2021
-
doc: guarantee call order for sort_by_cached_key
`slice::sort_by_cached_key` takes a caching function `f: impl FnMut(&T) -> K`, which means that the order that calls to the caching function are made is user-visible. This adds a clause to the documentation to promise the current behavior, which is that `f` is called on all elements of the slice from left to right, unless the slice has len < 2 in which case `f` is not called.
Configuration menu - View commit details
-
Copy full SHA for 3eb87db - Browse repository at this point
Copy the full SHA 3eb87dbView commit details
Commits on Nov 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 61ff847 - Browse repository at this point
Copy the full SHA 61ff847View commit details
Commits on Dec 27, 2021
-
Little improves in CString
new
when creating from sliceOld code already contain optimization for cases with `&str` and `&[u8]` args. This commit adds a specialization for `&mut[u8]` too. Also, I added usage of old slice in search for zero bytes instead of new buffer because it produce better code for Windows on LTO builds. For other platforms, this wouldn't cause any difference because it calls `libc` anyway. Inlined `_new` method into spec trait to reduce amount of code generated to `CString::new` callers.
Configuration menu - View commit details
-
Copy full SHA for 4b62a77 - Browse repository at this point
Copy the full SHA 4b62a77View commit details
Commits on Jan 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b9f008b - Browse repository at this point
Copy the full SHA b9f008bView commit details
Commits on Jan 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 06b17a2 - Browse repository at this point
Copy the full SHA 06b17a2View commit details
Commits on Jan 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bd1f09d - Browse repository at this point
Copy the full SHA bd1f09dView commit details
Commits on Jan 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8b459dd - Browse repository at this point
Copy the full SHA 8b459ddView commit details
Commits on Jan 18, 2022
-
Remove some unused
Ord
derivations based onDefId
Removes `Ord` and `PartialOrd` from middle::mir::mirsource, inlineasmoperand, terminatorkind, operand, constant, constantkind, and place
Configuration menu - View commit details
-
Copy full SHA for 0882bbb - Browse repository at this point
Copy the full SHA 0882bbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for b160564 - Browse repository at this point
Copy the full SHA b160564View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07a0325 - Browse repository at this point
Copy the full SHA 07a0325View commit details -
Configuration menu - View commit details
-
Copy full SHA for 282224e - Browse repository at this point
Copy the full SHA 282224eView commit details -
Configuration menu - View commit details
-
Copy full SHA for aaebae9 - Browse repository at this point
Copy the full SHA aaebae9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 148234f - Browse repository at this point
Copy the full SHA 148234fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45dee47 - Browse repository at this point
Copy the full SHA 45dee47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f74ef4 - Browse repository at this point
Copy the full SHA 5f74ef4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fee3e7 - Browse repository at this point
Copy the full SHA 5fee3e7View commit details
Commits on Jan 19, 2022
-
Remove horizontal lines at top of page
They are not needed to separate the search bar and the title, which are visually distinct on their own.
Configuration menu - View commit details
-
Copy full SHA for fa9a843 - Browse repository at this point
Copy the full SHA fa9a843View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84e0d9d - Browse repository at this point
Copy the full SHA 84e0d9dView commit details -
Rollup merge of rust-lang#88642 - c410-f3r:let_chains_2, r=matthewjasper
Formally implement let chains ## Let chains My longest and hardest contribution since rust-lang#64010. Thanks to `@Centril` for creating the RFC and special thanks to `@matthewjasper` for helping me since the beginning of this journey. In fact, `@matthewjasper` did much of the complicated MIR stuff so it's true to say that this feature wouldn't be possible without him. Thanks again `@matthewjasper!` With the changes proposed in this PR, it will be possible to chain let expressions along side local variable declarations or ordinary conditional expressions. In other words, do much of what the `if_chain` crate already does. ## Other considerations * `if let guard` and `let ... else` features need special care and should be handled in a following PR. * Irrefutable patterns are allowed within a let chain context * ~~Three Clippy lints were already converted to start dogfooding and help detect possible corner cases~~ cc rust-lang#53667
Configuration menu - View commit details
-
Copy full SHA for 5d2928f - Browse repository at this point
Copy the full SHA 5d2928fView commit details -
Rollup merge of rust-lang#89621 - digama0:patch-2, r=yaahc
doc: guarantee call order for sort_by_cached_key `slice::sort_by_cached_key` takes a caching function `f: impl FnMut(&T) -> K`, which means that the order that calls to the caching function are made is user-visible. This adds a clause to the documentation to promise the current behavior, which is that `f` is called on all elements of the slice from left to right, unless the slice has len < 2 in which case `f` is not called. For example, this can be used to ensure that the following code is a correct way to involve the index of the element in the sort key: ```rust let mut index = 0; slice.sort_by_cached_key(|x| (my_key(index, x), index += 1).0); ```
Configuration menu - View commit details
-
Copy full SHA for 2a4381d - Browse repository at this point
Copy the full SHA 2a4381dView commit details -
Rollup merge of rust-lang#91278 - SparrowLii:place, r=spastorino
Use iterator instead of recursion in `codegen_place` This PR fixes the FIXME in `codegen_place` about using iterator instead of recursion when processing the `projection` field in `mir::PlaceRef`. At the same time, it also reduces the right drift.
Configuration menu - View commit details
-
Copy full SHA for 3a1db90 - Browse repository at this point
Copy the full SHA 3a1db90View commit details -
Rollup merge of rust-lang#92124 - AngelicosPhosphoros:remove_extra_al…
…loc_in_cstring_new_35838, r=Mark-Simulacrum Little improves in CString `new` when creating from slice Old code already contain optimization for cases with `&str` and `&[u8]` args. This commit adds a specialization for `&mut[u8]` too. Also, I added usage of old slice in search for zero bytes instead of new buffer because it produce better code for constant inputs on Windows LTO builds. For other platforms, this wouldn't cause any difference because it calls `libc` anyway. Inlined `_new` method into spec trait to reduce amount of code generated to `CString::new` callers.
Configuration menu - View commit details
-
Copy full SHA for 3148a32 - Browse repository at this point
Copy the full SHA 3148a32View commit details -
Rollup merge of rust-lang#92783 - FabianWolff:issue-92726, r=nikomats…
…akis Annotate dead code lint with notes about ignored derived impls Fixes rust-lang#92726. CC `@pmetzger,` is this what you had in mind? r? `@nikomatsakis`
Configuration menu - View commit details
-
Copy full SHA for 9a82f74 - Browse repository at this point
Copy the full SHA 9a82f74View commit details -
Rollup merge of rust-lang#92797 - jsha:fewer-lines, r=GuillaumeGomez
Remove horizontal lines at top of page They are not needed to separate the search bar and the title, which are visually distinct on their own. Part of rust-lang#59840 Demo: https://rustdoc.crud.net/jsha/fewer-lines/std/string/struct.String.html r? `@GuillaumeGomez`
Configuration menu - View commit details
-
Copy full SHA for 7f2dbcb - Browse repository at this point
Copy the full SHA 7f2dbcbView commit details -
Rollup merge of rust-lang#92920 - dtolnay:printtidy, r=cjgillot
Move expr- and item-related pretty printing functions to modules Currently *compiler/rustc_ast_pretty/src/pprust/state.rs* is 2976 lines on master. The `tidy` limit is 3000, which is blocking rust-lang#92243. This PR adds a `mod expr;` and `mod item;` to move logic related to those AST nodes out of the single huge file.
Configuration menu - View commit details
-
Copy full SHA for 420ada6 - Browse repository at this point
Copy the full SHA 420ada6View commit details -
Rollup merge of rust-lang#93041 - pierwill:rm-unused-defid-ords, r=cj…
…gillot Remove some unused ordering derivations based on `DefId` Like rust-lang#93018, this removes some unused/unneeded ordering derivations as part of ongoing work on rust-lang#90317. Here, these changes are aimed at making rust-lang#90749 easier to review, test, and merge. r? `@cjgillot`
Configuration menu - View commit details
-
Copy full SHA for 0b9056c - Browse repository at this point
Copy the full SHA 0b9056cView commit details -
Rollup merge of rust-lang#93051 - m-ou-se:is-some-with, r=yaahc
Add Option::is_some_with and Result::is_{ok,err}_with See rust-lang#62358 (comment)
Configuration menu - View commit details
-
Copy full SHA for d5bc168 - Browse repository at this point
Copy the full SHA d5bc168View commit details -
Rollup merge of rust-lang#93062 - ehuss:update-books, r=ehuss
Update books ## nomicon 1 commits in c05c452b36358821bf4122f9c418674edd1d713d..66d097d3d80e8f88c288c6879c7c2b909ecf8ad4 2021-12-13 15:23:48 +0900 to 2022-01-05 05:45:21 +0900 - Fix typo / type error in FFI code example (rust-lang/nomicon#327) ## reference 8 commits in f8ba2f12df60ee19b96de24ae5b73af3de8a446b..4dee6eb63d728ffb9e7a2ed443e9ada9275c69d2 2022-01-03 11:02:08 -0800 to 2022-01-18 09:26:33 -0800 - (minor) Remove Expression Path sub-types splits in Pattern specs (rust-lang/reference#1138) - Document destructuring assignment (rust-lang/reference#1116) - Document the 2021 edition changes to macros-by-example `pat` metavariables (rust-lang/reference#1135) - Improve the documentation of macros-by-example metavariable names (rust-lang/reference#1130) - trait-bounds.md: add pronoun 'that' (rust-lang/reference#1131) - Say that macros-by-example `ident` metavariables can match raw identifiers (rust-lang/reference#1133) - State in the UAX31 profile description that a lone `_` is not an identifier (rust-lang/reference#1129) - Document syntax reserved in Rust 2021 (rust-lang/reference#1128) ## book 17 commits in d3740fb7aad0ea4a80ae20f64dee3a8cfc0c5c3c..f17df27fc14696912c48b8b7a7a8fa49e648088d 2022-01-03 21:46:04 -0500 to 2022-01-18 17:46:28 -0500 - Add a notice to the top of all nostarch snapshots - Fix quotes - Grammar (minor): 'or' → 'and' for enum variants - Propagate edits of chapter 8 to src - Replies to nostarch edits - more edits - ch8 from nostarch - Fix grammar and line wrapping - Merge remote-tracking branch 'origin/pr/2880' - Remove wikipedia link - Merge remote-tracking branch 'origin/pr/2927' - Snapshot of ch14 for nostarch - Backport fixes to chapter 14 noticed while doing nostarch snapshot - Fix usage of find piped into xargs - Adjust some more line numbers of Cargo.toml includes - Merge branch '2909' - Merge remote-tracking branch 'parkerziegler/fix/ch14-add-one-naming' ## rustc-dev-guide 7 commits in 875464457c4104686faf667f47848aa7b0f0a744..78dd6a4684cf8d6b72275fab6d0429ea40b66338 2021-12-28 22:17:49 -0600 to 2022-01-18 14:44:26 -0300 - Reorganize and expand the testing chapters. (rust-lang/rustc-dev-guide#1281) - Add inline assembly internals (rust-lang/rustc-dev-guide#1266) - Spelling: Rename `rust` to `Rust` (rust-lang/rustc-dev-guide#1288) - Clean up section about FCPs (rust-lang/rustc-dev-guide#1287) - Address more review comments in rust-lang/rustc-dev-guide#1286. - Address review comments in rust-lang/rustc-dev-guide#1286. - Streamline "Getting Started" some more.
Configuration menu - View commit details
-
Copy full SHA for ea1275a - Browse repository at this point
Copy the full SHA ea1275aView commit details