Skip to content

Commit 2c8bbf5

Browse files
committed
Auto merge of #59226 - kennytm:rollup, r=kennytm
Rollup of 37 pull requests Successful merges: - #58854 (appveyor: Use VS2017 for all our images) - #58855 (std: Spin for a global malloc lock on wasm32) - #58873 (Fix "Auto-hide item methods documentation" setting) - #58901 (Change `std::fs::copy` to use `copyfile` on MacOS and iOS) - #58933 (Move alloc::prelude::* to alloc::prelude::v1, make alloc a subset of std) - #58938 (core: ensure VaList passes improper_ctypes lint) - #58941 (MIPS: add r6 support) - #58949 (SGX target: Expose thread id function in os module) - #58959 (Add release notes for PR #56243) - #58976 (Default to integrated `rust-lld` linker for UEFI targets) - #59009 (Fix SGX implementations of read/write_vectored.) - #59025 (Fix generic argument lookup for Self) - #59036 (Fix ICE in MIR pretty printing) - #59037 (Avoid some common false positives in intra doc link checking) - #59072 (we can now skip should_panic tests with the libtest harness) - #59079 (add suggestions to invalid macro item error) - #59082 (A few improvements to comments in user-facing crates) - #59102 (Consistent naming for duration_float methods and additional f32 methods) - #59118 (rustc: fix ICE when trait alias has bare Self) - #59139 (Unregress using scalar unions in constants.) - #59146 (Suggest return lifetime when there's only one named lifetime) - #59147 (Make std time tests more robust for platform differences) - #59152 (Stabilize Range*::contains.) - #59156 ([wg-async-await] Add regression test for #55809.) - #59158 (Revert "Don't generate minification variable if minification disabled") - #59169 (Add `-Z allow_features=...` flag) - #59173 (bootstrap: Default to a sensible llvm-suffix.) - #59175 (Don't run test launching `echo` since that doesn't exist on Windows) - #59180 (Use try blocks in rustc_codegen_ssa) - #59185 (No old chestnuts in iter::repeat docs) - #59201 (Remove restriction on isize/usize in repr(simd)) - #59204 (Output diagnostic information for rustdoc) - #59206 (Improved test output) - #59208 (Reduce a Code Repetition Related to Bit Operation) - #59212 (Add x86_64 musl host to the manifest) - #59221 (Option and Result: Add references to documentation of as_ref and as_mut) - #59231 (Stabilize Option::copied)
2 parents 52e8856 + 7c009a4 commit 2c8bbf5

File tree

109 files changed

+1184
-492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1184
-492
lines changed

RELEASES.md

+3
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ Compatibility Notes
110110
methods instead.
111111
- The `Error::cause` method has been deprecated in favor of `Error::source` which supports
112112
downcasting.
113+
- [Libtest no longer creates a new thread for each test when
114+
`--test-threads=1`. It also runs the tests in deterministic order][56243]
113115

114116
[55982]: https://github.com/rust-lang/rust/pull/55982/
117+
[56243]: https://github.com/rust-lang/rust/pull/56243
115118
[56303]: https://github.com/rust-lang/rust/pull/56303/
116119
[56351]: https://github.com/rust-lang/rust/pull/56351/
117120
[56362]: https://github.com/rust-lang/rust/pull/56362

appveyor.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
environment:
2+
# This is required for at least an AArch64 compiler in one image, and is also
3+
# going to soon be required for compiling LLVM.
4+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Preview
25

36
# By default schannel checks revocation of certificates unlike some other SSL
47
# backends, but we've historically had problems on CI where a revocation
@@ -81,7 +84,6 @@ environment:
8184
DIST_REQUIRE_ALL_TOOLS: 1
8285
DEPLOY: 1
8386
CI_JOB_NAME: dist-x86_64-msvc
84-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Preview
8587
- RUST_CONFIGURE_ARGS: >
8688
--build=i686-pc-windows-msvc
8789
--target=i586-pc-windows-msvc

src/bootstrap/bin/rustdoc.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn main() {
3535
.arg("--cfg")
3636
.arg("dox")
3737
.arg("--sysroot")
38-
.arg(sysroot)
38+
.arg(&sysroot)
3939
.env(bootstrap::util::dylib_path_var(),
4040
env::join_paths(&dylib_path).unwrap());
4141

@@ -72,7 +72,13 @@ fn main() {
7272
}
7373

7474
if verbose > 1 {
75-
eprintln!("rustdoc command: {:?}", cmd);
75+
eprintln!(
76+
"rustdoc command: {:?}={:?} {:?}",
77+
bootstrap::util::dylib_path_var(),
78+
env::join_paths(&dylib_path).unwrap(),
79+
cmd,
80+
);
81+
eprintln!("sysroot: {:?}", sysroot);
7682
eprintln!("libdir: {:?}", libdir);
7783
}
7884

src/bootstrap/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,11 @@ impl<'a> Builder<'a> {
408408
test::RustdocJSStd,
409409
test::RustdocJSNotStd,
410410
test::RustdocTheme,
411+
test::RustdocUi,
411412
// Run bootstrap close to the end as it's unlikely to fail
412413
test::Bootstrap,
413414
// Run run-make last, since these won't pass without make on Windows
414415
test::RunMake,
415-
test::RustdocUi
416416
),
417417
Kind::Bench => describe!(test::Crate, test::CrateLibrustc),
418418
Kind::Doc => describe!(

src/bootstrap/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ pub struct Build {
241241
clippy_info: channel::GitInfo,
242242
miri_info: channel::GitInfo,
243243
rustfmt_info: channel::GitInfo,
244+
in_tree_llvm_info: channel::GitInfo,
245+
emscripten_llvm_info: channel::GitInfo,
244246
local_rebuild: bool,
245247
fail_fast: bool,
246248
doc_tests: DocTests,
@@ -363,6 +365,8 @@ impl Build {
363365
let clippy_info = channel::GitInfo::new(&config, &src.join("src/tools/clippy"));
364366
let miri_info = channel::GitInfo::new(&config, &src.join("src/tools/miri"));
365367
let rustfmt_info = channel::GitInfo::new(&config, &src.join("src/tools/rustfmt"));
368+
let in_tree_llvm_info = channel::GitInfo::new(&config, &src.join("src/llvm-project"));
369+
let emscripten_llvm_info = channel::GitInfo::new(&config, &src.join("src/llvm-emscripten"));
366370

367371
let mut build = Build {
368372
initial_rustc: config.initial_rustc.clone(),
@@ -386,6 +390,8 @@ impl Build {
386390
clippy_info,
387391
miri_info,
388392
rustfmt_info,
393+
in_tree_llvm_info,
394+
emscripten_llvm_info,
389395
cc: HashMap::new(),
390396
cxx: HashMap::new(),
391397
ar: HashMap::new(),

src/bootstrap/native.rs

+21-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use build_helper::output;
1818
use cmake;
1919
use cc;
2020

21+
use crate::channel;
2122
use crate::util::{self, exe};
2223
use build_helper::up_to_date;
2324
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
@@ -231,7 +232,26 @@ impl Step for Llvm {
231232
}
232233

233234
if let Some(ref suffix) = builder.config.llvm_version_suffix {
234-
cfg.define("LLVM_VERSION_SUFFIX", suffix);
235+
// Allow version-suffix="" to not define a version suffix at all.
236+
if !suffix.is_empty() {
237+
cfg.define("LLVM_VERSION_SUFFIX", suffix);
238+
}
239+
} else {
240+
let mut default_suffix = format!(
241+
"-rust-{}-{}",
242+
channel::CFG_RELEASE_NUM,
243+
builder.config.channel,
244+
);
245+
let llvm_info = if self.emscripten {
246+
&builder.emscripten_llvm_info
247+
} else {
248+
&builder.in_tree_llvm_info
249+
};
250+
if let Some(sha) = llvm_info.sha_short() {
251+
default_suffix.push_str("-");
252+
default_suffix.push_str(sha);
253+
}
254+
cfg.define("LLVM_VERSION_SUFFIX", default_suffix);
235255
}
236256

237257
if let Some(ref linker) = builder.config.llvm_use_linker {

src/liballoc/prelude.rs

-19
This file was deleted.

src/liballoc/prelude/mod.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//! The alloc Prelude
2+
//!
3+
//! The purpose of this module is to alleviate imports of commonly-used
4+
//! items of the `alloc` crate by adding a glob import to the top of modules:
5+
//!
6+
//! ```
7+
//! # #![allow(unused_imports)]
8+
//! # #![feature(alloc)]
9+
//! #![feature(alloc_prelude)]
10+
//! extern crate alloc;
11+
//! use alloc::prelude::v1::*;
12+
//! ```
13+
14+
#![unstable(feature = "alloc_prelude", issue = "58935")]
15+
16+
pub mod v1;

src/liballoc/prelude/v1.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//! The first version of the prelude of `alloc` crate.
2+
//!
3+
//! See the [module-level documentation](../index.html) for more.
4+
5+
#![unstable(feature = "alloc_prelude", issue = "58935")]
6+
7+
#[unstable(feature = "alloc_prelude", issue = "58935")] pub use crate::borrow::ToOwned;
8+
#[unstable(feature = "alloc_prelude", issue = "58935")] pub use crate::boxed::Box;
9+
#[unstable(feature = "alloc_prelude", issue = "58935")] pub use crate::slice::SliceConcatExt;
10+
#[unstable(feature = "alloc_prelude", issue = "58935")] pub use crate::string::{String, ToString};
11+
#[unstable(feature = "alloc_prelude", issue = "58935")] pub use crate::vec::Vec;

src/liballoc/tests/binary_heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn assert_covariance() {
282282
//
283283
// Destructors must be called exactly once per element.
284284
#[test]
285-
#[cfg(not(miri))] // Miri does not support panics
285+
#[cfg(not(miri))] // Miri does not support panics nor entropy
286286
fn panic_safe() {
287287
static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);
288288

src/liballoc/tests/btree/map.rs

-5
Original file line numberDiff line numberDiff line change
@@ -226,39 +226,34 @@ fn test_range_equal_empty_cases() {
226226

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

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

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

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

259255
#[test]
260256
#[should_panic]
261-
#[cfg(not(miri))] // Miri does not support panics
262257
fn test_range_backwards_4() {
263258
let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
264259
map.range((Excluded(3), Excluded(2)));

src/liballoc/tests/slice.rs

+2-18
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ fn test_swap_remove() {
258258

259259
#[test]
260260
#[should_panic]
261-
#[cfg(not(miri))] // Miri does not support panics
262261
fn test_swap_remove_fail() {
263262
let mut v = vec![1];
264263
let _ = v.swap_remove(0);
@@ -632,7 +631,6 @@ fn test_insert() {
632631

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

658656
#[test]
659657
#[should_panic]
660-
#[cfg(not(miri))] // Miri does not support panics
661658
fn test_remove_fail() {
662659
let mut a = vec![1];
663660
let _ = a.remove(0);
@@ -939,7 +936,6 @@ fn test_windowsator() {
939936

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

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

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

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

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

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

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

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

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

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

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

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

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

16061590
#[test]
16071591
#[cfg_attr(target_os = "emscripten", ignore)] // no threads
1608-
#[cfg(not(miri))] // Miri does not support panics
1592+
#[cfg(not(miri))] // Miri does not support threads nor entropy
16091593
fn panic_safe() {
16101594
let prev = panic::take_hook();
16111595
panic::set_hook(Box::new(move |info| {

0 commit comments

Comments
 (0)