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 13 pull requests #82138

Closed
wants to merge 27 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5fe8490
Add match pattern diagnostics regression test
vandenheuvel Feb 8, 2021
dd9db23
Fix typos in BTreeSet::{first, last} docs
taiki-e Feb 13, 2021
a3e0795
Heat up the ICE-y error reporting
BoxyUwU Feb 13, 2021
ee9709f
Fixed minor typo in catch_unwind docs
Feb 13, 2021
1c3841e
Edit `rustc_arena::DropArena` docs
pierwill Feb 13, 2021
d1a541e
Add tests for Atomic*::fetch_{min,max}
bjorn3 Feb 14, 2021
ba72bc9
fix typo
TaKO8Ki Feb 14, 2021
c583860
Remove unnecessary `Option` in `default_doc`
jyn514 Feb 14, 2021
34f30bc
Move some tests to more reasonable directories
c410-f3r Feb 14, 2021
dee5424
Add missing env!-decl variant
lukaslueg Feb 14, 2021
1aa9651
Fix typo in link to CreateSymbolicLinkW documentation.
m-ou-se Feb 14, 2021
3d7fcff
Update library/core/src/macros/mod.rs
lukaslueg Feb 14, 2021
4613b37
Stabilize Arguments::as_str
sfackler Feb 14, 2021
63806cc
Remove redundant bool_to_option feature gate
est31 Feb 15, 2021
377a3ef
Rollup merge of #81897 - vandenheuvel:match_exhaustive_diagnostics_re…
JohnTitor Feb 15, 2021
c27dad5
Rollup merge of #81941 - c410-f3r:tests-tests-tests, r=petrochenkov
JohnTitor Feb 15, 2021
4d4a680
Rollup merge of #82009 - BoxyUwU:idontknooow, r=varkor
JohnTitor Feb 15, 2021
0a4f934
Rollup merge of #82060 - taiki-e:typo, r=m-ou-se
JohnTitor Feb 15, 2021
923dd8a
Rollup merge of #82063 - NULLx76:fix-minor-typo, r=jonas-schievink
JohnTitor Feb 15, 2021
6da1890
Rollup merge of #82077 - pierwill:edit-droparena, r=lcnr
JohnTitor Feb 15, 2021
21ffc87
Rollup merge of #82093 - bjorn3:more_atomic_tests, r=kennytm
JohnTitor Feb 15, 2021
ec2fc5a
Rollup merge of #82096 - TaKO8Ki:fix-typo, r=GuillaumeGomez
JohnTitor Feb 15, 2021
f0fd778
Rollup merge of #82106 - jyn514:cleanup-bootstrap, r=Mark-Simulacrum
JohnTitor Feb 15, 2021
ebaba22
Rollup merge of #82118 - lukaslueg:env_decl, r=m-ou-se
JohnTitor Feb 15, 2021
8095310
Rollup merge of #82119 - m-ou-se:typo, r=dtolnay
JohnTitor Feb 15, 2021
cb9f6b1
Rollup merge of #82120 - sfackler:arguments-as-str, r=dtolnay
JohnTitor Feb 15, 2021
abdfa39
Rollup merge of #82129 - est31:master, r=jyn514
JohnTitor Feb 15, 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
36 changes: 36 additions & 0 deletions library/core/tests/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ fn uint_xor() {
assert_eq!(x.load(SeqCst), 0xf731 ^ 0x137f);
}

#[test]
fn uint_min() {
let x = AtomicUsize::new(0xf731);
assert_eq!(x.fetch_min(0x137f, SeqCst), 0xf731);
assert_eq!(x.load(SeqCst), 0x137f);
assert_eq!(x.fetch_min(0xf731, SeqCst), 0x137f);
assert_eq!(x.load(SeqCst), 0x137f);
}

#[test]
fn uint_max() {
let x = AtomicUsize::new(0x137f);
assert_eq!(x.fetch_max(0xf731, SeqCst), 0x137f);
assert_eq!(x.load(SeqCst), 0xf731);
assert_eq!(x.fetch_max(0x137f, SeqCst), 0xf731);
assert_eq!(x.load(SeqCst), 0xf731);
}

#[test]
fn int_and() {
let x = AtomicIsize::new(0xf731);
Expand Down Expand Up @@ -87,6 +105,24 @@ fn int_xor() {
assert_eq!(x.load(SeqCst), 0xf731 ^ 0x137f);
}

#[test]
fn int_min() {
let x = AtomicIsize::new(0xf731);
assert_eq!(x.fetch_min(0x137f, SeqCst), 0xf731);
assert_eq!(x.load(SeqCst), 0x137f);
assert_eq!(x.fetch_min(0xf731, SeqCst), 0x137f);
assert_eq!(x.load(SeqCst), 0x137f);
}

#[test]
fn int_max() {
let x = AtomicIsize::new(0x137f);
assert_eq!(x.fetch_max(0xf731, SeqCst), 0x137f);
assert_eq!(x.load(SeqCst), 0xf731);
assert_eq!(x.fetch_max(0x137f, SeqCst), 0xf731);
assert_eq!(x.load(SeqCst), 0xf731);
}

static S_FALSE: AtomicBool = AtomicBool::new(false);
static S_TRUE: AtomicBool = AtomicBool::new(true);
static S_INT: AtomicIsize = AtomicIsize::new(0);
Expand Down