-
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 11 pull requests #81553
Rollup of 11 pull requests #81553
Commits on Jan 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 77a9e3e - Browse repository at this point
Copy the full SHA 77a9e3eView commit details
Commits on Jan 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a398994 - Browse repository at this point
Copy the full SHA a398994View commit details
Commits on Jan 28, 2021
-
Also switches on formatting of the mir build module
Configuration menu - View commit details
-
Copy full SHA for 063b427 - Browse repository at this point
Copy the full SHA 063b427View commit details -
Configuration menu - View commit details
-
Copy full SHA for ada714d - Browse repository at this point
Copy the full SHA ada714dView commit details
Commits on Jan 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d1727ed - Browse repository at this point
Copy the full SHA d1727edView commit details -
Process mentioned upvars for analysis first pass after ExprUseVisitor
- This allows us add fake information after handling migrations if needed. - Capture analysis also priortizes what we see earlier, which means fake information should go in last.
Configuration menu - View commit details
-
Copy full SHA for 2c651eb - Browse repository at this point
Copy the full SHA 2c651ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36352d2 - Browse repository at this point
Copy the full SHA 36352d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d30a5bf - Browse repository at this point
Copy the full SHA d30a5bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ac023d - Browse repository at this point
Copy the full SHA 9ac023dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f106e18 - Browse repository at this point
Copy the full SHA f106e18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11abaa1 - Browse repository at this point
Copy the full SHA 11abaa1View commit details -
Restrict precision of captures with
capture_disjoint_fields
set- No Derefs in move closure, this will result in value behind a reference getting moved. - No projections are applied to raw pointers, since these require unsafe blocks. We capture them completely. Motivations for these are recorded here: https://hackmd.io/71qq-IOpTNqzMkPpAI1dVg?view
Configuration menu - View commit details
-
Copy full SHA for b421cd5 - Browse repository at this point
Copy the full SHA b421cd5View commit details -
Compute mutability of closure captures
When `capture_disjoint_fields` is not enabled, checking if the root variable binding is mutable would suffice. However with the feature enabled, the captured place might be mutable because it dereferences a mutable reference. This PR computes the mutability of each capture after capture analysis in rustc_typeck. We store this in `ty::CapturedPlace` and then use `ty::CapturedPlace::mutability` in mir_build and borrow_check.
Configuration menu - View commit details
-
Copy full SHA for 3488082 - Browse repository at this point
Copy the full SHA 3488082View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1373f98 - Browse repository at this point
Copy the full SHA 1373f98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0897db5 - Browse repository at this point
Copy the full SHA 0897db5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 604cbdc - Browse repository at this point
Copy the full SHA 604cbdcView commit details -
Configuration menu - View commit details
-
Copy full SHA for c748f32 - Browse repository at this point
Copy the full SHA c748f32View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffd5327 - Browse repository at this point
Copy the full SHA ffd5327View commit details -
Configuration menu - View commit details
-
Copy full SHA for fadf03e - Browse repository at this point
Copy the full SHA fadf03eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f4bab2 - Browse repository at this point
Copy the full SHA 0f4bab2View commit details
Commits on Jan 30, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 56c2736 - Browse repository at this point
Copy the full SHA 56c2736View commit details -
Rollup merge of rust-lang#80092 - sexxi-goose:restrict_precision, r=n…
…ikomatsakis 2229: Fix issues with move closures and mutability This PR fixes two issues when feature `capture_disjoint_fields` is used. 1. Can't mutate using a mutable reference 2. Move closures try to move value out through a reference. To do so, we 1. Compute the mutability of the capture and store it as part of the `CapturedPlace` that is written in TypeckResults 2. Restrict capture precision. Note this is temporary for now, to allow the feature to be used with move closures and ByValue captures and might change depending on discussions with the lang team. - No Derefs are captured for ByValue captures, since that will result in value behind a reference getting moved. - No projections are applied to raw pointers since these require unsafe blocks. We capture them completely. r? `@nikomatsakis`
Configuration menu - View commit details
-
Copy full SHA for 755be93 - Browse repository at this point
Copy the full SHA 755be93View commit details -
Rollup merge of rust-lang#80629 - sexxi-goose:migrations_1, r=nikomat…
…sakis Add lint for 2229 migrations Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled. r? `@nikomatsakis`
Configuration menu - View commit details
-
Copy full SHA for 16a4bb2 - Browse repository at this point
Copy the full SHA 16a4bb2View commit details -
Rollup merge of rust-lang#80843 - Mark-Simulacrum:fmt-bump, r=petroch…
…enkov Bump rustfmt version
Configuration menu - View commit details
-
Copy full SHA for 813739a - Browse repository at this point
Copy the full SHA 813739aView commit details -
Rollup merge of rust-lang#81351 - lcnr:big-money-big-prices, r=oli-obk
combine: stop eagerly evaluating consts `super_relate_consts` eagerly evaluates constants which doesn't seem too great. I now also finally understand why all of the unused substs test passed. The reason being that we just evaluated the constants in `super_relate_consts` 😆 While this change isn't strictly necessary as evaluating consts here doesn't hurt, it still feels a lot cleaner to do it this way r? `@oli-obk` `@nikomatsakis`
Configuration menu - View commit details
-
Copy full SHA for 1d117ab - Browse repository at this point
Copy the full SHA 1d117abView commit details -
Rollup merge of rust-lang#81422 - estebank:dotdot_sugg, r=davidtwco
Account for existing `_` field pattern when suggesting `..` Follow up to rust-lang#80017.
Configuration menu - View commit details
-
Copy full SHA for ec066b3 - Browse repository at this point
Copy the full SHA ec066b3View commit details -
Rollup merge of rust-lang#81484 - Kogia-sima:perf/optimize-udiv_1e19,…
… r=nagisa Optimize decimal formatting of 128-bit integers ## Description This PR optimizes the `udivmod_1e19` function, which is used for formatting 128-bit integers, based on the algorithm provided in \[1\]. This optimization improves performance of formatting 128-bit integers, especially on 64-bit architectures. It also slightly reduces the output binary size. ## Assembler comparison https://godbolt.org/z/YrG5zY ## Performance #### previous results ``` test fmt::write_u128_max ... bench: 552 ns/iter (+/- 4) test fmt::write_u128_min ... bench: 125 ns/iter (+/- 2) ``` #### new results ``` test fmt::write_u128_max ... bench: 205 ns/iter (+/- 13) test fmt::write_u128_min ... bench: 129 ns/iter (+/- 5) ``` ## Reference \[1\] T. Granlund and P. Montgomery, “Division by Invariant Integers Using Multiplication” in Proc. of the SIGPLAN94 Conference on Programming Language Design and Implementation, 1994, pp. 61–72
Configuration menu - View commit details
-
Copy full SHA for e3d9523 - Browse repository at this point
Copy the full SHA e3d9523View commit details -
Rollup merge of rust-lang#81550 - xfix:replace-mention-of-predecessor…
…, r=jonas-schievink Replace predecessor with range in collections documentation Fixes rust-lang#81548.
Configuration menu - View commit details
-
Copy full SHA for 0330456 - Browse repository at this point
Copy the full SHA 0330456View commit details