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 18 pull requests #59223

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
967e7f4
resolve: Account for new importable entities
petrochenkov Mar 9, 2019
4888b1f
we can now skip should_panic tests with the libtest harness
RalfJung Mar 10, 2019
52d9fa8
enabled too many tests
RalfJung Mar 10, 2019
b9d12ed
Be more discerning on when to attempt suggesting a comma in a macro i…
estebank Mar 11, 2019
795d307
Suggest return lifetime when there's only one named lifetime
estebank Mar 12, 2019
f923476
review comments
estebank Mar 12, 2019
adbd0a6
Make std time tests more robust for platform differences
Mar 12, 2019
0ea9b58
Suggest adding lifetime to struct field
estebank Mar 13, 2019
266ca31
Stabilize Range*::contains.
smmalis37 Mar 13, 2019
27abd52
Fix operator precedence
estebank Mar 13, 2019
9d938f6
Add test for #55809.
davidtwco Mar 13, 2019
311025e
Fix generic argument lookup for Self
Mar 7, 2019
5abd6d9
add suggestions to invalid macro item error
euclio Mar 11, 2019
4e5692d
test that wildcard type `_` is not duplicated by `type Foo<X> = (X, X…
pnkfelix Jan 18, 2019
ab19e58
Use try blocks in rustc_codegen_ssa
taiki-e Mar 14, 2019
d1fcd86
Update sources.rs
lukaslueg Mar 14, 2019
fa8fd3d
Add support for comma-separated option lists
tmandry Mar 14, 2019
7c59ce9
Add `-Z allow_features=...` flag
tmandry Mar 13, 2019
bcf1a17
Output diagnostic information for rustdoc.
o01eg Mar 15, 2019
9445f2b
Improved test output for liballoc/str
ohsayan Mar 15, 2019
6d73a8f
Improved test output for libcore/cell
ohsayan Mar 15, 2019
8ff2198
Improved test output for libcore/ops
ohsayan Mar 15, 2019
2f52388
Improved test output for libcore/num/int_macros
ohsayan Mar 15, 2019
e9e5a75
Improved test output for estr-slice
ohsayan Mar 15, 2019
12e3e84
reduced a code repetition related to bit operation.
kenta7777 Mar 15, 2019
5303c1b
Remove restriction on isize/usize in repr(simd)
lambda Mar 15, 2019
9c7bf76
Add x86_64 musl host to the manifest
mati865 Mar 15, 2019
50af62d
removed some unnecessary comments.
kenta7777 Mar 15, 2019
a8fa1a1
a simple refactoring and removing comment.
kenta7777 Mar 15, 2019
5a65c5b
Rollup merge of #57729 - pnkfelix:issue-55748-pat-types-are-constrain…
Centril Mar 16, 2019
e45828c
Rollup merge of #59025 - aoikonomopoulos:issue-57924, r=varkor
Centril Mar 16, 2019
6e133e4
Rollup merge of #59047 - petrochenkov:modnodefid, r=Centril
Centril Mar 16, 2019
5429232
Rollup merge of #59072 - RalfJung:miri-alloc-tests, r=kennytm
Centril Mar 16, 2019
d050067
Rollup merge of #59079 - euclio:macro-semi, r=estebank
Centril Mar 16, 2019
e371eef
Rollup merge of #59116 - estebank:comma-sugg, r=petrochenkov
Centril Mar 16, 2019
06c2a0f
Rollup merge of #59146 - estebank:suggest-return-lt, r=varkor
Centril Mar 16, 2019
adf0927
Rollup merge of #59147 - jethrogb:jb/time-tests, r=sfackler
Centril Mar 16, 2019
b96e8fe
Rollup merge of #59152 - smmalis37:range_contains, r=SimonSapin
Centril Mar 16, 2019
2aa2f25
Rollup merge of #59156 - davidtwco:issue-55809, r=nikomatsakis
Centril Mar 16, 2019
ff17858
Rollup merge of #59169 - tmandry:allow-features-flag, r=cramertj
Centril Mar 16, 2019
d7aa140
Rollup merge of #59180 - taiki-e:try_blocks, r=scottmcm
Centril Mar 16, 2019
83d736f
Rollup merge of #59185 - lukaslueg:patch-2, r=cramertj
Centril Mar 16, 2019
e3258bd
Rollup merge of #59201 - lambda:remove-repr-simd-isize-usize-restrict…
Centril Mar 16, 2019
608436b
Rollup merge of #59204 - o01eg:diag-rustdoc, r=alexcrichton
Centril Mar 16, 2019
952808e
Rollup merge of #59206 - sntdevco:master, r=dtolnay
Centril Mar 16, 2019
cc028e2
Rollup merge of #59208 - kenta7777:reduce-code-repetition, r=oli-obk
Centril Mar 16, 2019
b5e0692
Rollup merge of #59212 - mati865:musl_toolchain, r=alexcrichton
Centril Mar 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn main() {
.arg("--cfg")
.arg("dox")
.arg("--sysroot")
.arg(sysroot)
.arg(&sysroot)
.env(bootstrap::util::dylib_path_var(),
env::join_paths(&dylib_path).unwrap());

Expand Down Expand Up @@ -72,7 +72,13 @@ fn main() {
}

if verbose > 1 {
eprintln!("rustdoc command: {:?}", cmd);
eprintln!(
"rustdoc command: {:?}={:?} {:?}",
bootstrap::util::dylib_path_var(),
env::join_paths(&dylib_path).unwrap(),
cmd,
);
eprintln!("sysroot: {:?}", sysroot);
eprintln!("libdir: {:?}", libdir);
}

Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/tests/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ fn assert_covariance() {
//
// Destructors must be called exactly once per element.
#[test]
#[cfg(not(miri))] // Miri does not support panics
#[cfg(not(miri))] // Miri does not support panics nor entropy
fn panic_safe() {
static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);

Expand Down
5 changes: 0 additions & 5 deletions src/liballoc/tests/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,39 +226,34 @@ fn test_range_equal_empty_cases() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_range_equal_excluded() {
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
map.range((Excluded(2), Excluded(2)));
}

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_range_backwards_1() {
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
map.range((Included(3), Included(2)));
}

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_range_backwards_2() {
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
map.range((Included(3), Excluded(2)));
}

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_range_backwards_3() {
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
map.range((Excluded(3), Included(2)));
}

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_range_backwards_4() {
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
map.range((Excluded(3), Excluded(2)));
Expand Down
20 changes: 2 additions & 18 deletions src/liballoc/tests/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ fn test_swap_remove() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_swap_remove_fail() {
let mut v = vec![1];
let _ = v.swap_remove(0);
Expand Down Expand Up @@ -632,7 +631,6 @@ fn test_insert() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_insert_oob() {
let mut a = vec![1, 2, 3];
a.insert(4, 5);
Expand All @@ -657,7 +655,6 @@ fn test_remove() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_remove_fail() {
let mut a = vec![1];
let _ = a.remove(0);
Expand Down Expand Up @@ -939,7 +936,6 @@ fn test_windowsator() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_windowsator_0() {
let v = &[1, 2, 3, 4];
let _it = v.windows(0);
Expand All @@ -964,7 +960,6 @@ fn test_chunksator() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_chunksator_0() {
let v = &[1, 2, 3, 4];
let _it = v.chunks(0);
Expand All @@ -989,7 +984,6 @@ fn test_chunks_exactator() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_chunks_exactator_0() {
let v = &[1, 2, 3, 4];
let _it = v.chunks_exact(0);
Expand All @@ -1014,7 +1008,6 @@ fn test_rchunksator() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_rchunksator_0() {
let v = &[1, 2, 3, 4];
let _it = v.rchunks(0);
Expand All @@ -1039,7 +1032,6 @@ fn test_rchunks_exactator() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_rchunks_exactator_0() {
let v = &[1, 2, 3, 4];
let _it = v.rchunks_exact(0);
Expand Down Expand Up @@ -1092,7 +1084,6 @@ fn test_vec_default() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_overflow_does_not_cause_segfault() {
let mut v = vec![];
v.reserve_exact(!0);
Expand All @@ -1102,7 +1093,6 @@ fn test_overflow_does_not_cause_segfault() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_overflow_does_not_cause_segfault_managed() {
let mut v = vec![Rc::new(1)];
v.reserve_exact(!0);
Expand Down Expand Up @@ -1278,7 +1268,6 @@ fn test_mut_chunks_rev() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_mut_chunks_0() {
let mut v = [1, 2, 3, 4];
let _it = v.chunks_mut(0);
Expand Down Expand Up @@ -1311,7 +1300,6 @@ fn test_mut_chunks_exact_rev() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_mut_chunks_exact_0() {
let mut v = [1, 2, 3, 4];
let _it = v.chunks_exact_mut(0);
Expand Down Expand Up @@ -1344,7 +1332,6 @@ fn test_mut_rchunks_rev() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_mut_rchunks_0() {
let mut v = [1, 2, 3, 4];
let _it = v.rchunks_mut(0);
Expand Down Expand Up @@ -1377,7 +1364,6 @@ fn test_mut_rchunks_exact_rev() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_mut_rchunks_exact_0() {
let mut v = [1, 2, 3, 4];
let _it = v.rchunks_exact_mut(0);
Expand Down Expand Up @@ -1411,7 +1397,7 @@ fn test_box_slice_clone() {
#[test]
#[allow(unused_must_use)] // here, we care about the side effects of `.clone()`
#[cfg_attr(target_os = "emscripten", ignore)]
#[cfg(not(miri))] // Miri does not support panics
#[cfg(not(miri))] // Miri does not support threads nor entropy
fn test_box_slice_clone_panics() {
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down Expand Up @@ -1476,7 +1462,6 @@ fn test_copy_from_slice() {

#[test]
#[should_panic(expected = "destination and source slices have different lengths")]
#[cfg(not(miri))] // Miri does not support panics
fn test_copy_from_slice_dst_longer() {
let src = [0, 1, 2, 3];
let mut dst = [0; 5];
Expand All @@ -1485,7 +1470,6 @@ fn test_copy_from_slice_dst_longer() {

#[test]
#[should_panic(expected = "destination and source slices have different lengths")]
#[cfg(not(miri))] // Miri does not support panics
fn test_copy_from_slice_dst_shorter() {
let src = [0, 1, 2, 3];
let mut dst = [0; 3];
Expand Down Expand Up @@ -1605,7 +1589,7 @@ thread_local!(static SILENCE_PANIC: Cell<bool> = Cell::new(false));

#[test]
#[cfg_attr(target_os = "emscripten", ignore)] // no threads
#[cfg(not(miri))] // Miri does not support panics
#[cfg(not(miri))] // Miri does not support threads nor entropy
fn panic_safe() {
let prev = panic::take_hook();
panic::set_hook(Box::new(move |info| {
Expand Down
13 changes: 1 addition & 12 deletions src/liballoc/tests/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn test_le() {
assert!("" <= "");
assert!("" <= "foo");
assert!("foo" <= "foo");
assert!("foo" != "bar");
assert_ne!("foo", "bar");
}

#[test]
Expand Down Expand Up @@ -351,7 +351,6 @@ mod slice_index {
// to be used in `should_panic`)
#[test]
#[should_panic(expected = "out of bounds")]
#[cfg(not(miri))] // Miri does not support panics
fn assert_range_eq_can_fail_by_panic() {
assert_range_eq!("abc", 0..5, "abc");
}
Expand All @@ -361,7 +360,6 @@ mod slice_index {
// to be used in `should_panic`)
#[test]
#[should_panic(expected = "==")]
#[cfg(not(miri))] // Miri does not support panics
fn assert_range_eq_can_fail_by_inequality() {
assert_range_eq!("abc", 0..2, "abc");
}
Expand Down Expand Up @@ -409,7 +407,6 @@ mod slice_index {

#[test]
#[should_panic(expected = $expect_msg)]
#[cfg(not(miri))] // Miri does not support panics
fn index_fail() {
let v: String = $data.into();
let v: &str = &v;
Expand All @@ -418,7 +415,6 @@ mod slice_index {

#[test]
#[should_panic(expected = $expect_msg)]
#[cfg(not(miri))] // Miri does not support panics
fn index_mut_fail() {
let mut v: String = $data.into();
let v: &mut str = &mut v;
Expand Down Expand Up @@ -514,7 +510,6 @@ mod slice_index {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_slice_fail() {
&"中华Việt Nam"[0..2];
}
Expand Down Expand Up @@ -666,14 +661,12 @@ mod slice_index {
// check the panic includes the prefix of the sliced string
#[test]
#[should_panic(expected="byte index 1024 is out of bounds of `Lorem ipsum dolor sit amet")]
#[cfg(not(miri))] // Miri does not support panics
fn test_slice_fail_truncated_1() {
&LOREM_PARAGRAPH[..1024];
}
// check the truncation in the panic message
#[test]
#[should_panic(expected="luctus, im`[...]")]
#[cfg(not(miri))] // Miri does not support panics
fn test_slice_fail_truncated_2() {
&LOREM_PARAGRAPH[..1024];
}
Expand All @@ -688,7 +681,6 @@ fn test_str_slice_rangetoinclusive_ok() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_str_slice_rangetoinclusive_notok() {
let s = "abcαβγ";
&s[..=3];
Expand All @@ -704,7 +696,6 @@ fn test_str_slicemut_rangetoinclusive_ok() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_str_slicemut_rangetoinclusive_notok() {
let mut s = "abcαβγ".to_owned();
let s: &mut str = &mut s;
Expand Down Expand Up @@ -894,7 +885,6 @@ fn test_as_bytes() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_as_bytes_fail() {
// Don't double free. (I'm not sure if this exercises the
// original problem code path anymore.)
Expand Down Expand Up @@ -984,7 +974,6 @@ fn test_split_at_mut() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_split_at_boundscheck() {
let s = "ศไทย中华Việt Nam";
s.split_at(1);
Expand Down
9 changes: 0 additions & 9 deletions src/liballoc/tests/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ fn test_split_off_empty() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_split_off_past_end() {
let orig = "Hello, world!";
let mut split = String::from(orig);
Expand All @@ -240,7 +239,6 @@ fn test_split_off_past_end() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_split_off_mid_char() {
let mut orig = String::from("山");
orig.split_off(1);
Expand Down Expand Up @@ -289,7 +287,6 @@ fn test_str_truncate_invalid_len() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_str_truncate_split_codepoint() {
let mut s = String::from("\u{FC}"); // ü
s.truncate(1);
Expand Down Expand Up @@ -324,7 +321,6 @@ fn remove() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn remove_bad() {
"ศ".to_string().remove(1);
}
Expand Down Expand Up @@ -360,13 +356,11 @@ fn insert() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn insert_bad1() {
"".to_string().insert(1, 't');
}
#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn insert_bad2() {
"ệ".to_string().insert(1, 't');
}
Expand Down Expand Up @@ -447,7 +441,6 @@ fn test_replace_range() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_replace_range_char_boundary() {
let mut s = "Hello, 世界!".to_owned();
s.replace_range(..8, "");
Expand All @@ -464,15 +457,13 @@ fn test_replace_range_inclusive_range() {

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_replace_range_out_of_bounds() {
let mut s = String::from("12345");
s.replace_range(5..6, "789");
}

#[test]
#[should_panic]
#[cfg(not(miri))] // Miri does not support panics
fn test_replace_range_inclusive_out_of_bounds() {
let mut s = String::from("12345");
s.replace_range(5..=5, "789");
Expand Down