Skip to content

Rollup of 8 pull requests #69463

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

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
14999dd
Add methods to leak RefCell borrows to references
197g Jan 29, 2020
178de46
Add primitive module to libcore/std
Mark-Simulacrum Dec 26, 2019
99b4357
Add tracking number, adjust documentation wording
197g Feb 12, 2020
bec5d37
debug_assert a few more raw pointer methods
RalfJung Feb 16, 2020
7a6b451
increase slack for stack size test
RalfJung Feb 17, 2020
e355a33
Deduplicate identifier printing a bit
petrochenkov Feb 22, 2020
9c3ee1b
Bump core::primitive to 1.43
dtolnay Feb 24, 2020
329022d
Address method comments
197g Feb 24, 2020
5ae4500
remove redundant clones in librustc_mir_build and librustc_data_struc…
matthiaskrgr Feb 24, 2020
d4a005b
librustc{, codegen_ssa,infer,mir_build}: don't clone types that are copy
matthiaskrgr Feb 24, 2020
1892ff7
librustc_macros: remove redundant single component path import
matthiaskrgr Feb 24, 2020
d134385
syntax: Remove `Nt(Impl,Trait,Foreign)Item`
petrochenkov Feb 24, 2020
245e15b
parse: extract `parse_stmt_item` & `parse_stmt_path_start`.
Centril Feb 23, 2020
32295ae
parse: simplify `parse_stmt_without_recovery`.
Centril Feb 23, 2020
1eb0844
parse: move condition into guard
Centril Feb 24, 2020
7876711
parse: address nitpick
Centril Feb 25, 2020
f56042f
Clean up E0370 explanation
GuillaumeGomez Feb 25, 2020
d6f83c5
Clean up E0371 explanation
GuillaumeGomez Feb 25, 2020
724e410
Rollup merge of #67637 - Mark-Simulacrum:primitive-mod, r=dtolnay
Dylan-DPC Feb 25, 2020
ef7c928
Rollup merge of #68712 - HeroicKatora:finalize-ref-cell, r=dtolnay
Dylan-DPC Feb 25, 2020
8677ad3
Rollup merge of #69208 - RalfJung:debug-assert, r=Mark-Simulacrum
Dylan-DPC Feb 25, 2020
9e487c8
Rollup merge of #69387 - petrochenkov:idprint, r=Mark-Simulacrum
Dylan-DPC Feb 25, 2020
55deb79
Rollup merge of #69423 - petrochenkov:nont, r=Centril
Dylan-DPC Feb 25, 2020
50241a7
Rollup merge of #69429 - matthiaskrgr:clippy_, r=estebank
Dylan-DPC Feb 25, 2020
2b7d4e8
Rollup merge of #69447 - Centril:minor-stmt-refactor, r=estebank
Dylan-DPC Feb 25, 2020
6e392e2
Rollup merge of #69457 - GuillaumeGomez:clean-up-e0370-e0371, r=Dylan…
Dylan-DPC Feb 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address method comments
  • Loading branch information
197g committed Feb 24, 2020
commit 329022dfad7199053cbe225e8d7d13ebbd5eb230
5 changes: 2 additions & 3 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,9 +1272,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
/// ```
#[unstable(feature = "cell_leak", issue = "69099")]
pub fn leak(orig: Ref<'b, T>) -> &'b T {
// By forgetting this BorrowRefMut we ensure that the borrow counter in the RefCell never
// goes back to UNUSED again. No further references can be created from the original cell,
// making the current borrow the only reference for the remaining lifetime.
// By forgetting this Ref we ensure that the borrow counter in the RefCell never goes back
// to UNUSED again. No further mutable references can be created from the original cell.
mem::forget(orig.borrow);
orig.value
}
Expand Down