8000 Rollup of 25 pull requests by pietroalbini · Pull Request #56051 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 25 pull requests #56051

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

Merged
merged 67 commits into from
Nov 19, 2018
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
f3e9b1a
in which the E0618 "expected function" diagnostic gets a makeover
zackmdavis Nov 11, 2018
b7c319c
do not panic just because cargo failed
RalfJung Nov 11, 2018
0671bdb
reword #[test] attribute error on fn items
zeegomo Nov 11, 2018
0c08529
A few tweaks to iterations/collecting
ljedrz Nov 5, 2018
562be7e
Forward the ABI of the non-zero sized fields of an union if they have…
ogoffart Nov 8, 2018
cfbae3e
core/tests/num: Simplify `test_int_from_str_overflow()` test code
Turbo87 Nov 13, 2018
57a7c85
miri: backtraces with instances
RalfJung Nov 14, 2018
2ec6f34
Update CI-clang to 7.0.0 for Linux dists.
michaelwoerister Nov 14, 2018
f6b8eb7
Update CI-clang to 7.0.0 for macOS dists.
michaelwoerister Nov 14, 2018
fb5135a
prettier miri backtrace printing
RalfJung Nov 14, 2018
1ca505a
capture_disjoint_fields(rust-lang#53488)
blitzerr Nov 14, 2018
c040a48
Remove extern and some return value as an attempt to make the test pa…
ogoffart Nov 14, 2018
b396505
put file and line into miri backtrace
RalfJung Nov 14, 2018
aa3d7a4
properly calculate spans for intra-doc link resolution errors
QuietMisdreavus Nov 15, 2018
a1f83e7
Stress test for MPSC
stepancheg Nov 15, 2018
7f4bc22
Clean up some non-mod-rs stuff.
ehuss Oct 16, 2018
6779bb4
capture_disjoint_fields(rust-lang#53488)
blitzerr Nov 15, 2018
c5bc83b
expose MutValueVisitor
RalfJung Nov 13, 2018
e4d03f8
miri value visitor: provide place when visiting a primitive
RalfJung Nov 13, 2018
62cf9ab
rename FrameInfo span field to call_site
RalfJung Nov 15, 2018
e6e5635
ty: return impl Iterator from Predicate::walk_tys
ljedrz Nov 14, 2018
ffb6ba0
validation: better error when the enum discriminant is Undef
RalfJung Nov 12, 2018
a3770c2
do not accept out-of-bounds pointers in enum discriminants, they migh…
RalfJung Nov 12, 2018
b8915f2
fix other affected tests
RalfJung Nov 12, 2018
81303d7
Add powerpc-unknown-linux-musl target
smaeul Sep 10, 2018
346e976
Fix powerpc64 ELFv2 big-endian struct-passing ABI
smaeul Sep 16, 2018
2bb5029
Use the ELFv2 ABI on powerpc64 musl
smaeul Aug 9, 2018
4f9c860
Add powerpc64-unknown-linux-musl target
smaeul Aug 8, 2018
8c8ff6a
test/linkage-visibility: Ignore on musl targets
smaeul Sep 16, 2018
03aaa4b
remove unused dependency
andjo403 Nov 10, 2018
303dbcc
CTFE: dynamically make sure we do not call non-const-fn
RalfJung Nov 16, 2018
c1221e2
Replace data.clone() by Arc::clone(&data) in mutex doc.
CBenoit Nov 16, 2018
0c0478d
adjust remaining tests
RalfJung Nov 16, 2018
41434e0
avoid shared ref in UnsafeCell::get
RalfJung Nov 16, 2018
a7b312f
erase the tag on casts involving (raw) pointers
RalfJung Nov 17, 2018
25d46f3
add comment explaining why what we do is legal
RalfJung Nov 17, 2018
2b7c3fb
add test for #[test] attribute only allowed on non associated functions
zeegomo Nov 17, 2018
8e13e43
tidy check fix
zeegomo Nov 17, 2018
5fc63ce
docs: Add missing backtick in object_safety.rs docs
Xanewok Nov 17, 2018
cdb1a79
Add VecDeque::resize_with
scottmcm Nov 17, 2018
a5b4cb2
remove "approx env bounds" if we already know from trait
nikomatsakis Nov 18, 2018
36e1d9f
Rollup merge of #55562 - smaeul:powerpc-linux-musl, r=alexcrichton
pietroalbini Nov 18, 2018
21ff709
Rollup merge of #55564 - smaeul:test-fixes-2, r=alexcrichton
pietroalbini Nov 18, 2018
9c3e8d3
Rollup merge of #55827 - ljedrz:various_stashed, r=alexcrichton
pietroalbini Nov 18, 2018
4a52c56
Rollup merge of #55834 - ogoffart:union-abi, r=eddyb
pietroalbini Nov 18, 2018
7130947
Rollup merge of #55857 - andjo403:rmdep, r=Mark-Simulacrum
pietroalbini Nov 18, 2018
9577734
Rollup merge of #55862 - zackmdavis:but_will_they_come_when_you_call_…
pietroalbini Nov 18, 2018
3aeac24
Rollup merge of #55867 - RalfJung:dont-panic, r=Mark-Simulacrum
pietroalbini Nov 18, 2018
131a755
Rollup merge of #55894 - RalfJung:validation-enums, r=oli-obk
pietroalbini Nov 18, 2018
c87c31b
Rollup merge of #55916 - RalfJung:mut-visitor, r=oli-obk
pietroalbini Nov 18, 2018
5e2ff63
Rollup merge of #55919 - Turbo87:num-tests, r=dtolnay
pietroalbini Nov 18, 2018
715d83f
Rollup merge of #55923 - Zeegomo:master, r=estebank
pietroalbini Nov 18, 2018
8607325
Increase `Duration` approximate equal threshold to 1us
alexcrichton Nov 19, 2018
fc30ab4
Rollup merge of #55949 - ljedrz:return_impl_Iterator_from_Predicate_w…
pietroalbini Nov 18, 2018
32e4eb9
Rollup merge of #55952 - michaelwoerister:newer-clang, r=alexcrichton
pietroalbini Nov 18, 2018
989d06a
Rollup merge of #55953 - blitzerr:master, r=nikomatsakis
pietroalbini Nov 18, 2018
f13d166
Rollup merge of #55962 - QuietMisdreavus:tricky-spans, r=GuillaumeGomez
pietroalbini Nov 18, 2018
318a38e
Rollup merge of #55963 - stepancheg:mpsc-take-2, r=alexcrichton
pietroalbini Nov 18, 2018
6ecbb05
Rollup merge of #55968 - ehuss:non-mod-rs-tests, r=petrochenkov
pietroalbini Nov 18, 2018
cc6473d
Rollup merge of #55970 - RalfJung:miri-backtrace, r=@oli-obk
pietroalbini Nov 18, 2018
c0d48ce
Rollup merge of #56007 - RalfJung:non-const-call, r=oli-obk
pietroalbini Nov 18, 2018
05ae505
Rollup merge of #56011 - CBenoit:master, r=QuietMisdreavus
pietroalbini Nov 18, 2018
2a68c00
Rollup merge of #56012 - RalfJung:unsafe-cell, r=nikomatsakis
pietroalbini Nov 18, 2018
f5dc12e
Rollup merge of #56016 - scottmcm:vecdeque-resize-with, r=joshtriplett
pietroalbini Nov 18, 2018
27519c1
Rollup merge of #56027 - Xanewok:docs-backtick, r=QuietMisdreavus
pietroalbini Nov 18, 2018
10565c4
Rollup merge of #56043 - nikomatsakis:issue-55756-via-outlives, r=eddyb
pietroalbini Nov 18, 2018
8cea658
Rollup merge of #56059 - alexcrichton:fix-tests, r=sfackler
kennytm Nov 19, 2018
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
core/tests/num: Simplify test_int_from_str_overflow() test code
This commit changes the test code to compare against easier-to-read, static values instead of relying on the result of `wrapping_add()` which may or may not result in the value that we expect.
  • Loading branch information
Turbo87 committed Nov 14, 2018
commit cfbae3e1940f75fa1f5f99bf60f68ed9756a202b
24 changes: 8 additions & 16 deletions src/libcore/tests/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,36 +82,28 @@ fn from_str_issue7588() {

#[test]
fn test_int_from_str_overflow() {
let mut i8_val: i8 = 127;
assert_eq!("127".parse::<i8>().ok(), Some(i8_val));
assert_eq!("127".parse::<i8>().ok(), Some(127i8));
assert_eq!("128".parse::<i8>().ok(), None);

i8_val = i8_val.wrapping_add(1);
assert_eq!("-128".parse::<i8>().ok(), Some(i8_val));
assert_eq!("-128".parse::<i8>().ok(), Some(-128i8));
assert_eq!("-129".parse::<i8>().ok(), None);

let mut i16_val: i16 = 32_767;
assert_eq!("32767".parse::<i16>().ok(), Some(i16_val));
assert_eq!("32767".parse::<i16>().ok(), Some(32_767i16));
assert_eq!("32768".parse::<i16>().ok(), None);

i16_val = i16_val.wrapping_add(1);
assert_eq!("-32768".parse::<i16>().ok(), Some(i16_val));
assert_eq!("-32768".parse::<i16>().ok(), Some(-32_768i16));
assert_eq!("-32769".parse::<i16>().ok(), None);

let mut i32_val: i32 = 2_147_483_647;
assert_eq!("2147483647".parse::<i32>().ok(), Some(i32_val));
assert_eq!("2147483647".parse::<i32>().ok(), Some(2_147_483_647i32));
assert_eq!("2147483648".parse::<i32>().ok(), None);

i32_val = i32_val.wrapping_add(1);
assert_eq!("-2147483648".parse::<i32>().ok(), Some(i32_val));
assert_eq!("-2147483648".parse::<i32>().ok(), Some(-2_147_483_648i32));
assert_eq!("-2147483649".parse::<i32>().ok(), None);

let mut i64_val: i64 = 9_223_372_036_854_775_807;
assert_eq!("9223372036854775807".parse::<i64>().ok(), Some(i64_val));
assert_eq!("9223372036854775807".parse::<i64>().ok(), Some(9_223_372_036_854_775_807i64));
assert_eq!("9223372036854775808".parse::<i64>().ok(), None);

i64_val = i64_val.wrapping_add(1);
assert_eq!("-9223372036854775808".parse::<i64>().ok(), Some(i64_val));
assert_eq!("-9223372036854775808".parse::<i64>().ok(), Some(-9_223_372_036_854_775_808i64));
assert_eq!("-9223372036854775809".parse::<i64>().ok(), None);
}

Expand Down
0