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 #73387

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
591584e
Add tests for 'impl Default for [T; N]'
MikailBag May 26, 2020
3313bf6
Skip leak test on targets without panic=unwind
MikailBag May 28, 2020
bbb3321
Ensure std benchmarks get tested.
ehuss Jun 8, 2020
4ff1678
lint: normalize projections using opaque types
davidtwco Jun 12, 2020
4004bf1
Don't run generator transform when there's a TyErr
jonas-schievink Jun 14, 2020
d3ca6fd
Enable static-pie for the x86_64-unknown-linux-musl target
haraldh Jun 15, 2020
64a6de2
Join mutiple lines if it is more readable
tesuji Jun 15, 2020
9e51008
Complete the std::time documentation to warn about the inconsistencie…
poliorcetics Jun 15, 2020
b67bdb5
Re-order correctly the sections in the sidebar
GuillaumeGomez Jun 15, 2020
fe7456c
Use track caller for bug! macro
tesuji Jun 15, 2020
71c54db
Fix typo in docs of std::mem
ratijas Jun 15, 2020
118bf06
Rollup merge of #70740 - haraldh:static-pie, r=petrochenkov
Dylan-DPC Jun 15, 2020
63f52f2
Rollup merge of #72628 - MikailBag:array-default-tests, r=shepmaster
Dylan-DPC Jun 15, 2020
d5c8654
Rollup merge of #72836 - poliorcetics:std-time-os-specificities, r=sh…
Dylan-DPC Jun 15, 2020
00315da
Rollup merge of #73142 - ehuss:std-benches, r=dtolnay
Dylan-DPC Jun 15, 2020
9618aae
Rollup merge of #73287 - davidtwco:issue-73251-opaque-types-in-projec…
Dylan-DPC Jun 15, 2020
39345c2
Rollup merge of #73339 - jonas-schievink:unbug, r=estebank
Dylan-DPC Jun 15, 2020
ec1844d
Rollup merge of #73372 - GuillaumeGomez:re-order-sidebar-sections, r=…
Dylan-DPC Jun 15, 2020
d365be7
Rollup merge of #73373 - lzutao:bug-trackcaller, r=Amanieu
Dylan-DPC Jun 15, 2020
ac97474
Rollup merge of #73381 - ratijas:fix-typo-std-mem, r=jonas-schievink
Dylan-DPC Jun 15, 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
Skip leak test on targets without panic=unwind
  • Loading branch information
MikailBag committed May 28, 2020
commit 3313bf62ac45fab2c39e49c788423153754087a9
8 changes: 8 additions & 0 deletions src/libcore/tests/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,14 @@ fn iterator_drops() {
assert_eq!(i.get(), 5);
}

// This test does not work on targets without panic=unwind support.
// To work around this problem, test is marked is should_panic, so it will
// be automagically skipped on unsuitable targets, such as
// wasm32-unknown-unkown.
//
// It means that we use panic for indicating success.
#[test]
#[should_panic(expected = "test succeeded")]
fn array_default_impl_avoids_leaks_on_panic() {
use core::sync::atomic::{AtomicUsize, Ordering::Relaxed};
static COUNTER: AtomicUsize = AtomicUsize::new(0);
Expand Down Expand Up @@ -274,6 +281,7 @@ fn array_default_impl_avoids_leaks_on_panic() {
assert_eq!(*panic_msg, "bomb limit exceeded");
// check that all bombs are successfully dropped
assert_eq!(COUNTER.load(Relaxed), 0);
panic!("test succeeded")
}

#[test]
Expand Down