rust/src/libcore
Mazdak Farrokhzad 83aad6b9a8
Rollup merge of #69528 - HeroicKatora:finalize-ref-cell, r=dtolnay
Add undo_leak to reset RefCell borrow state

This method is complementary for the feature cell_leak added in an
earlier PR. It allows *safely* reverting the effects of leaking a borrow guard by
statically proving that such a guard could not longer exist. This was
not added to the existing `get_mut` out of concern of impacting the
complexity of the otherwise pure pointer cast and because the name
`get_mut` poorly communicates the intent of resetting remaining borrows.

This is a follow-up to #68712 and uses the same tracking issue, #69099,
as these methods deal with the same mechanism and the idea came up
[in a review comment](https://github.com/rust-lang/rust/pull/68712#discussion_r384670041).

@dtolnay who reviewed the prior PR.
cc @RalfJung
2020-03-15 15:40:03 +01:00
..
array Format the world 2019-12-22 17:42:47 -05:00
benches Format the world 2019-12-22 17:42:47 -05:00
char Improve char::is_ascii_* code 2020-02-11 10:22:47 +01:00
convert Correct version that relaxed orphan rules 2020-03-07 08:21:27 +00:00
fmt Rollup merge of #69011 - foeb:document-unsafe-core-fmt, r=Mark-Simulacrum 2020-03-12 16:32:11 +01:00
future Remove spotlight usage 2020-02-27 14:51:22 +01:00
hash Rollup merge of #69471 - nnethercote:rm-sip-Hasher-short_write, r=dtolnay 2020-03-15 02:44:15 +01:00
iter Rollup merge of #69625 - Stebalien:feat/iter-copy-specialize, r=KodrAus 2020-03-11 10:36:22 +01:00
macros also make panic_fmt track_caller 2020-03-10 10:31:03 +01:00
mem rename panic_if_ intrinsics to assert_ 2020-03-12 19:38:09 +01:00
num update stable-since version for const_int_conversion 2020-03-13 14:25:35 +01:00
ops Make Point Copy in arithmetic documentation 2020-03-10 18:11:36 +01:00
prelude Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
ptr fix various typos 2020-03-06 15:19:31 +01:00
slice Use subslice patterns in slice methods 2020-03-04 10:34:24 -08:00
str Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently) 2020-03-07 21:46:47 +01:00
sync Document stable versions of f32 and f64 intrinsics 2020-02-11 22:08:20 +01:00
task Use matches macro in libcore and libstd 2020-01-08 07:10:28 +03:00
tests Rollup merge of #69645 - DutchGhost:const-forget-tests, r=Dylan-DPC 2020-03-11 10:36:24 +01:00
unicode Replace old tables with new unicode data 2020-01-14 19:11:28 -05:00
alloc.rs Allow ZSTs in AllocRef 2020-03-08 11:01:12 +01:00
any.rs Minor: note why we can rely on Any trait for safety 2020-01-28 20:53:45 -05:00
ascii.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
bool.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
borrow.rs Format the world 2019-12-22 17:42:47 -05:00
Cargo.toml Move the matches! macro to the prelude 2019-10-23 15:35:36 +02:00
cell.rs Rollup merge of #69528 - HeroicKatora:finalize-ref-cell, r=dtolnay 2020-03-15 15:40:03 +01:00
clone.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
cmp.rs Mark several functions and methods in core::cmp as #[must_use] 2020-02-08 10:42:23 -08:00
default.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
ffi.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
hint.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
internal_macros.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
intrinsics.rs adjust Miri interaction with panic runtime 2020-03-14 11:24:11 +01:00
lib.rs Rollup merge of #69825 - lcnr:discriminant, r=oli-obk 2020-03-11 10:36:28 +01:00
marker.rs Add trait Self filtering to rustc_on_unimplemented 2020-02-12 17:26:49 -08:00
option.rs Rollup merge of #68918 - brson:unwrapdoc, r=Dylan-DPC 2020-02-09 00:53:55 +01:00
panic.rs Format the world 2019-12-22 17:42:47 -05:00
panicking.rs also make panic_fmt track_caller 2020-03-10 10:31:03 +01:00
pin.rs fix various typos 2020-03-06 15:19:31 +01:00
primitive.rs Bump core::primitive to 1.43 2020-02-23 23:59:39 -08:00
raw.rs Fix more tests after revert of rustdoc cfg(test) feature 2019-06-09 18:15:53 +01:00
result.rs Rollup merge of #68918 - brson:unwrapdoc, r=Dylan-DPC 2020-02-09 00:53:55 +01:00
time.rs no longer promote non-pattern const functions 2019-12-22 18:37:22 +01:00
tuple.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
unit.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00