Skip to content
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 9 pull requests #77102

Merged
merged 37 commits into from
Sep 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d4039c5
wip emit errors during AbstractConst building
lcnr Sep 19, 2020
30cbc97
words
lcnr Sep 19, 2020
16047d4
fix typo in docs and comments
yuk1ty Sep 21, 2020
db74e1f
Add cfg(target_has_atomic_equal_alignment).
m-ou-se Sep 20, 2020
9e3f94d
Don't unwrap but report a fatal error for TargetDataLayout::parse.
m-ou-se Sep 20, 2020
af56ad7
Add feature gate ui test for cfg(target_has_atomic_load_store).
m-ou-se Sep 20, 2020
54fdf54
Add feature gate ui test for cfg(target_has_atomic_equal_alignment).
m-ou-se Sep 20, 2020
668225d
Revert "Revert adding Atomic::from_mut."
m-ou-se Sep 21, 2020
7a04ff6
Gate Atomic::from_mut on cfg(target_has_atomic_equal_alignment).
m-ou-se Sep 20, 2020
5d6f1a1
Move `use align_of` in atomic.rs into the places where it is used.
m-ou-se Sep 21, 2020
e734733
Record `tcx.def_span` instead of `item.span` in crate metadata
Aaron1011 Sep 19, 2020
bcc1d56
Test that AtomicU64::from_mut is not available on x86 linux.
m-ou-se Sep 21, 2020
7a02ebd
bless tests
lcnr Sep 21, 2020
9a493ce
add test for closures in abstract consts
lcnr Sep 21, 2020
2f893e4
review
lcnr Sep 21, 2020
d9d02fa
Changing the alloc() to accept &self instead of &mut self
blitzerr Sep 21, 2020
7e443a1
Added feature flag to use cell_update
blitzerr Sep 21, 2020
219003b
replaced cell::update with cell::[g|s]et
blitzerr Sep 21, 2020
2a40b63
Update addr.rs
imbolc Sep 22, 2020
731113b
Miri: more informative deallocation error messages
RalfJung Sep 22, 2020
143557e
Add missing examples on Vec iter types
GuillaumeGomez Sep 21, 2020
3ffd403
removing &mut self for other methods of AllocRef
blitzerr Sep 22, 2020
05c3a2b
Add #[track_caller] to more panicking Cell functions
est31 Sep 22, 2020
14736ca
fixing the custom.rs
blitzerr Sep 22, 2020
5ab714f
Update library/std/src/net/addr.rs
imbolc Sep 22, 2020
4622ceb
Update library/std/src/net/addr.rs
imbolc Sep 22, 2020
985dff9
fixing the test failure
blitzerr Sep 23, 2020
2b19b14
a few more &mut self -> self changes
blitzerr Sep 23, 2020
a22eb31
Rollup merge of #76898 - Aaron1011:fix/item-def-span, r=oli-obk
Dylan-DPC Sep 23, 2020
98e5ee7
Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obk
Dylan-DPC Sep 23, 2020
eaaf5d7
Rollup merge of #76965 - fusion-engineering-forks:fix-atomic-from-mut…
Dylan-DPC Sep 23, 2020
a40d79c
Rollup merge of #76993 - blitzerr:alloc-ref, r=Amanieu
Dylan-DPC Sep 23, 2020
bcdbe79
Rollup merge of #76994 - yuk1ty:fix-small-typo, r=estebank
Dylan-DPC Sep 23, 2020
b763436
Rollup merge of #77017 - GuillaumeGomez:vec-missing-examples-iter, r=…
Dylan-DPC Sep 23, 2020
049ba0c
Rollup merge of #77042 - imbolc:patch-2, r=kennytm
Dylan-DPC Sep 23, 2020
f8dec3d
Rollup merge of #77047 - RalfJung:miri-dealloc, r=oli-obk
Dylan-DPC Sep 23, 2020
c3c03f2
Rollup merge of #77055 - est31:more_track_caller, r=Mark-Simulacrum
Dylan-DPC Sep 23, 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
Add #[track_caller] to more panicking Cell functions
Continuation of #74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info is only available on non-Windows platforms.
  • Loading branch information
est31 committed Sep 22, 2020
commit 05c3a2b07dc66fabc874181ce1eebea192cb4b56
3 changes: 3 additions & 0 deletions library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ impl<T> RefCell<T> {
/// ```
#[inline]
#[stable(feature = "refcell_replace", since = "1.24.0")]
#[track_caller]
pub fn replace(&self, t: T) -> T {
mem::replace(&mut *self.borrow_mut(), t)
}
Expand All @@ -722,6 +723,7 @@ impl<T> RefCell<T> {
/// ```
#[inline]
#[stable(feature = "refcell_replace_swap", since = "1.35.0")]
#[track_caller]
pub fn replace_with<F: FnOnce(&mut T) -> T>(&self, f: F) -> T {
let mut_borrow = &mut *self.borrow_mut();
let replacement = f(mut_borrow);
Expand Down Expand Up @@ -1056,6 +1058,7 @@ impl<T: Clone> Clone for RefCell<T> {
///
/// Panics if the value is currently mutably borrowed.
#[inline]
#[track_caller]
fn clone(&self) -> RefCell<T> {
RefCell::new(self.borrow().clone())
}
Expand Down