Skip to content

Rollup of 8 pull requests #83848

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 19 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e7f340e
BTree: move blocks around in node.rs
ssomers Feb 16, 2021
7f5964a
Add `download-rustc = "if-unchanged"`
jyn514 Mar 22, 2021
4f73d21
Fix compiletest on FreeBSD
asomers Mar 26, 2021
617e135
rustdoc: highlight macros more efficiently
notriddle Mar 15, 2021
f64038f
rustdoc: update macro highlight tests
notriddle Apr 3, 2021
8a05892
List trait impls before methods from deref in the sidebar of Rustdoc'…
slightlyoutofphase Apr 3, 2021
72502e8
Remove trailing whitespace
slightlyoutofphase Apr 3, 2021
13e482b
Remove unneeded INITIAL_IDS const
GuillaumeGomez Apr 3, 2021
3bd241f
cleanup leak after test to make miri happy
the8472 Apr 2, 2021
572873f
suggestion from review
the8472 Apr 3, 2021
a41d41c
Fix error codes check run and ensure it will not go unnoticed again
GuillaumeGomez Mar 24, 2021
92593a0
Rollup merge of #82726 - ssomers:btree_node_rearange, r=Mark-Simulacrum
GuillaumeGomez Apr 4, 2021
a604464
Rollup merge of #83368 - jyn514:download-if-unchanged, r=Mark-Simulacrum
GuillaumeGomez Apr 4, 2021
54b5f02
Rollup merge of #83451 - GuillaumeGomez:fix-error-code-tidy-check, r=…
GuillaumeGomez Apr 4, 2021
9a84a0c
Rollup merge of #83532 - asomers:gdb-fbsd, r=Mark-Simulacrum
GuillaumeGomez Apr 4, 2021
96659a9
Rollup merge of #83793 - notriddle:single-span-macro-highlight, r=Gui…
GuillaumeGomez Apr 4, 2021
4757d94
Rollup merge of #83809 - GuillaumeGomez:remove-initial-ids, r=camelid
GuillaumeGomez Apr 4, 2021
8e37df4
Rollup merge of #83826 - slightlyoutofphase:rustdoc-sidebar-order-shu…
GuillaumeGomez Apr 4, 2021
e00fb1c
Rollup merge of #83827 - the8472:fix-inplace-panic-on-drop, r=RalfJung
GuillaumeGomez Apr 4, 2021
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
cleanup leak after test to make miri happy
  • Loading branch information
the8472 committed Apr 3, 2021
commit 3bd241f95b6992d73f159c00551069e2c3424747
11 changes: 10 additions & 1 deletion library/alloc/tests/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,12 +1078,21 @@ fn test_from_iter_specialization_panic_during_drop_leaks() {
}
}

let mut to_free: *mut Droppable = core::ptr::null_mut();
let mut cap = 0;

let _ = std::panic::catch_unwind(AssertUnwindSafe(|| {
let v = vec![Droppable::DroppedTwice(Box::new(123)), Droppable::PanicOnDrop];
let mut v = vec![Droppable::DroppedTwice(Box::new(123)), Droppable::PanicOnDrop];
to_free = v.as_mut_ptr();
cap = v.capacity();
let _ = v.into_iter().take(0).collect::<Vec<_>>();
}));

assert_eq!(unsafe { DROP_COUNTER }, 1);
// clean up the leak to keep miri happy
unsafe {
Vec::from_raw_parts(to_free, 0, cap);
}
}

#[test]
Expand Down