-
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 8 pull requests #69463
Rollup of 8 pull requests #69463
Commits on Jan 31, 2020
-
Add methods to leak RefCell borrows to references
Usually, references to the interior are only created by the `Deref` and `DerefMut` impl of the guards `Ref` and `RefMut`. Note that `RefCell` already has to cope with leaks of such guards which, when it occurs, effectively makes it impossible to ever acquire a mutable guard or any guard for `Ref` and `RefMut` respectively. It is already safe to use this to create a reference to the inner of the ref cell that lives as long as the reference to the `RefCell` itself, e.g. ```rust fn leak(r: &RefCell<usize>) -> Option<&usize> { let guard = r.try_borrow().ok()?; let leaked = Box::leak(Box::new(guard)); Some(&*leaked) } ``` The newly added methods allow the same reference conversion without an indirection over a leaked allocation and composing with both borrow and try_borrow without additional method combinations.
Configuration menu - View commit details
-
Copy full SHA for 14999dd - Browse repository at this point
Copy the full SHA 14999ddView commit details
Commits on Feb 6, 2020
-
Add primitive module to libcore/std
This re-exports the primitive types from libcore at `core::primitive` to allow macro authors to have a reliable location to use them from.
Configuration menu - View commit details
-
Copy full SHA for 178de46 - Browse repository at this point
Copy the full SHA 178de46View commit details
Commits on Feb 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 99b4357 - Browse repository at this point
Copy the full SHA 99b4357View commit details
Commits on Feb 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for bec5d37 - Browse repository at this point
Copy the full SHA bec5d37View commit details
Commits on Feb 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 7a6b451 - Browse repository at this point
Copy the full SHA 7a6b451View commit details
Commits on Feb 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e355a33 - Browse repository at this point
Copy the full SHA e355a33View commit details
Commits on Feb 24, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9c3ee1b - Browse repository at this point
Copy the full SHA 9c3ee1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 329022d - Browse repository at this point
Copy the full SHA 329022dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ae4500 - Browse repository at this point
Copy the full SHA 5ae4500View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4a005b - Browse repository at this point
Copy the full SHA d4a005bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1892ff7 - Browse repository at this point
Copy the full SHA 1892ff7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d134385 - Browse repository at this point
Copy the full SHA d134385View commit details -
Configuration menu - View commit details
-
Copy full SHA for 245e15b - Browse repository at this point
Copy the full SHA 245e15bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32295ae - Browse repository at this point
Copy the full SHA 32295aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1eb0844 - Browse repository at this point
Copy the full SHA 1eb0844View commit details
Commits on Feb 25, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 7876711 - Browse repository at this point
Copy the full SHA 7876711View commit details -
Configuration menu - View commit details
-
Copy full SHA for f56042f - Browse repository at this point
Copy the full SHA f56042fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d6f83c5 - Browse repository at this point
Copy the full SHA d6f83c5View commit details -
Rollup merge of rust-lang#67637 - Mark-Simulacrum:primitive-mod, r=dt…
…olnay Add primitive module to libcore This re-exports the primitive types from libcore at `core::primitive` to allow macro authors to have a reliable location to use them from. Fixes rust-lang#44865
Configuration menu - View commit details
-
Copy full SHA for 724e410 - Browse repository at this point
Copy the full SHA 724e410View commit details -
Rollup merge of rust-lang#68712 - HeroicKatora:finalize-ref-cell, r=d…
…tolnay Add methods to 'leak' RefCell borrows as references with the lifetime of the original reference Usually, references to the interior are only created by the `Deref` and `DerefMut` impl of the guards `Ref` and `RefMut`. Note that `RefCell` already has to cope with leaks of such guards which, when it occurs, effectively makes it impossible to ever acquire a mutable guard or any guard for `Ref` and `RefMut` respectively. It is already safe to use this to create a reference to the inner of the ref cell that lives as long as the reference to the `RefCell` itself, e.g. ```rust fn leak(r: &RefCell<usize>) -> Option<&usize> { let guard = r.try_borrow().ok()?; let leaked = Box::leak(Box::new(guard)); Some(&*leaked) } ``` The newly added methods allow the same reference conversion without an indirection over a leaked allocation. It's placed on the `Ref`/`RefMut` to compose with both borrow and try_borrow directly.
Configuration menu - View commit details
-
Copy full SHA for ef7c928 - Browse repository at this point
Copy the full SHA ef7c928View commit details -
Rollup merge of rust-lang#69208 - RalfJung:debug-assert, r=Mark-Simul…
…acrum debug_assert a few more raw pointer methods Fixes rust-lang#53871
Configuration menu - View commit details
-
Copy full SHA for 8677ad3 - Browse repository at this point
Copy the full SHA 8677ad3View commit details -
Rollup merge of rust-lang#69387 - petrochenkov:idprint, r=Mark-Simula…
…crum Deduplicate identifier printing a bit rust-lang#67010 introduced a couple more subtly different ways to print an identifier. This PR attempts to restore the order. The most basic identifier printing interface is `Formatter`-based now, so `String`s are not allocated unless required. r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 9e487c8 - Browse repository at this point
Copy the full SHA 9e487c8View commit details -
Rollup merge of rust-lang#69423 - petrochenkov:nont, r=Centril
syntax: Remove `Nt(Impl,Trait,Foreign)Item` Follow-up to rust-lang#69366. r? @Centril
Configuration menu - View commit details
-
Copy full SHA for 55deb79 - Browse repository at this point
Copy the full SHA 55deb79View commit details -
Rollup merge of rust-lang#69429 - matthiaskrgr:clippy_, r=estebank
remove redundant clones and import
Configuration menu - View commit details
-
Copy full SHA for 50241a7 - Browse repository at this point
Copy the full SHA 50241a7View commit details -
Rollup merge of rust-lang#69447 - Centril:minor-stmt-refactor, r=este…
…bank Minor refactoring of statement parsing Extracted out of rust-lang#69445. r? @estebank
Configuration menu - View commit details
-
Copy full SHA for 2b7d4e8 - Browse repository at this point
Copy the full SHA 2b7d4e8View commit details -
Rollup merge of rust-lang#69457 - GuillaumeGomez:clean-up-e0370-e0371…
…, r=Dylan-DPC Clean up e0370 e0371 r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 6e392e2 - Browse repository at this point
Copy the full SHA 6e392e2View commit details