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 23 pull requests #59108

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fb98ca7
fs::copy() linux: set file mode early
haraldh Feb 28, 2019
196e021
Prevent cache issues on version updates
GuillaumeGomez Mar 1, 2019
6da206b
Add back in MSVC version check for LLVM
alexcrichton Mar 1, 2019
02b0085
appveyor: Use VS2017 for all our images
alexcrichton Nov 13, 2018
c82a42c
Change `std::fs::copy` to use `copyfile` on MacOS and iOS
ebarnard Mar 3, 2019
0a991e4
Add test for the behaviour of `fs::copy` when `to` is a symlink
ebarnard Mar 4, 2019
124ab2a
Fix typo
ebarnard Mar 4, 2019
1243859
core: ensure VaList passes improper_ctypes lint
dlrobertson Mar 5, 2019
72958ac
std: Spin for a global malloc lock on wasm32
alexcrichton Mar 1, 2019
710988a
MIPS: add r6 support
wzssyqa Mar 5, 2019
876258b
Default to integrated `rust-lld` linker for UEFI targets
phil-opp Mar 6, 2019
3477939
[CI] Update binutils for powerpc64 and powerpc64le
cuviper Mar 7, 2019
c843fe7
Wrap a long configure line
cuviper Mar 7, 2019
63f60b0
Fix documentation of from_ne_bytes and from_le_bytes
xTibor Mar 7, 2019
0a505a7
Parse lifetimes that start with a number and give specific error
estebank Mar 2, 2019
94a6936
Track embedded-book in the toolstate
kennytm Mar 9, 2019
a03e20d
Fix fallout from #57667
ishitatsuyuki Jan 31, 2019
bd2e126
Revert "Revert "Add clamp functions""
EdorianDark Mar 9, 2019
f690821
review comments
estebank Mar 8, 2019
6041ec3
add feature clamp
EdorianDark Mar 9, 2019
a4ea084
Avoid some common false positives in intra doc link checking
Manishearth Mar 9, 2019
3a83cb2
Fix ICE in MIR pretty printing
dlrobertson Mar 9, 2019
df4ea90
Use lifetime contravariance to elide more lifetimes in core+alloc+std
scottmcm Mar 10, 2019
135b686
Update src/tools/publish_toolstate.py
jamesmunns Mar 10, 2019
d6f5100
Fix tidy
kennytm Mar 10, 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
ddd9898
add suggestions to invalid macro item error
euclio Mar 11, 2019
d1034c1
Fix incorrect links in librustc_codegen_llvm documentation
nbaksalyar Mar 11, 2019
8629fd3
Improvements to comments in libstd, libcore, liballoc.
alexreg Feb 9, 2019
01e2e1f
Remove precompute_in_scope_traits_hashes
Zoxc Mar 10, 2019
749e9d4
added a function for reducing repetition of bit operation
kenta7777 Mar 11, 2019
4c9f7a0
reduced some code repetitions of bit operation
kenta7777 Mar 11, 2019
d4b2071
Resolved nits raised in review.
alexreg Mar 11, 2019
0ede9e6
replaced some bit operations with truncate
kenta7777 Mar 11, 2019
18b40c6
removed the definition of mask
kenta7777 Mar 11, 2019
6fcb375
Rollup merge of #58021 - ishitatsuyuki:57667-fix, r=RalfJung
kennytm Mar 11, 2019
6a45cc3
Rollup merge of #58710 - EdorianDark:master, r=sfackler
kennytm Mar 11, 2019
58a0e14
Rollup merge of #58803 - haraldh:fs_copy_fix, r=alexcrichton
kennytm Mar 11, 2019
b6cc929
Rollup merge of #58848 - GuillaumeGomez:fix-cache-issues, r=Mark-Simu…
kennytm Mar 11, 2019
3daad84
Rollup merge of #58854 - alexcrichton:update-windows, r=Mark-Simulacrum
kennytm Mar 11, 2019
df68386
Rollup merge of #58855 - alexcrichton:wasm-multithreaded-alloc, r=fit…
kennytm Mar 11, 2019
00a9ce1
Rollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkov
kennytm Mar 11, 2019
eb95dc4
Rollup merge of #58901 - ebarnard:just-copying, r=sfackler
kennytm Mar 11, 2019
d254739
Rollup merge of #58938 - dlrobertson:fix_58280, r=joshtriplett
kennytm Mar 11, 2019
2e6a240
Rollup merge of #58941 - wzssyqa:master, r=alexcrichton
kennytm Mar 11, 2019
918f26d
Rollup merge of #58976 - phil-opp:patch-2, r=alexcrichton
kennytm Mar 11, 2019
8c9fb6b
Rollup merge of #58998 - xTibor:doc_from_bytes, r=scottmcm
kennytm Mar 11, 2019
23fe082
Rollup merge of #59036 - dlrobertson:fix_59021, r=estebank
kennytm Mar 11, 2019
0614b1c
Rollup merge of #59037 - Manishearth:intra-doc-false, r=QuietMisdreavus
kennytm Mar 11, 2019
6b74ee1
Rollup merge of #59038 - kennytm:track-embedded-book, r=oli-obk
kennytm Mar 11, 2019
6c6ed57
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
kennytm Mar 11, 2019
948cdd7
Rollup merge of #59072 - RalfJung:miri-alloc-tests, r=kennytm
kennytm Mar 11, 2019
b21f14e
Rollup merge of #59079 - euclio:macro-semi, r=estebank
kennytm Mar 11, 2019
41939ca
Rollup merge of #59080 - nbaksalyar:fix-llvm-codegen-doc, r=frewsxcv
kennytm Mar 11, 2019
ac8f33b
Rollup merge of #59082 - alexreg:cosmetic-2-doc-comments, r=Centril
kennytm Mar 11, 2019
3ea31a9
Rollup merge of #59093 - Zoxc:no-prealloc, r=michaelwoerister
kennytm Mar 11, 2019
05a4c74
Rollup merge of #59101 - kenta7777:reduce-code-repetition, r=oli-obk
kennytm Mar 11, 2019
98ba2fb
Rollup merge of #58986 - cuviper:ppc64-binutils, r=alexcrichton
kennytm Mar 11, 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
4 changes: 3 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
environment:
# This is required for at least an AArch64 compiler in one image, and is also
# going to soon be required for compiling LLVM.
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Preview

# By default schannel checks revocation of certificates unlike some other SSL
# backends, but we've historically had problems on CI where a revocation
Expand Down Expand Up @@ -81,7 +84,6 @@ environment:
DIST_REQUIRE_ALL_TOOLS: 1
DEPLOY: 1
CI_JOB_NAME: dist-x86_64-msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Preview
- RUST_CONFIGURE_ARGS: >
--build=i686-pc-windows-msvc
--target=i586-pc-windows-msvc
Expand Down
15 changes: 7 additions & 8 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,10 @@ fn invoke_rustdoc(
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
.arg("--markdown-no-toc")
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path)
.arg("--markdown-css")
.arg("../rust.css");
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
.arg("-o").arg(&out).arg(&path)
.arg("--markdown-css").arg("../rust.css");

builder.run(&mut cmd);
}
Expand Down Expand Up @@ -430,9 +428,9 @@ impl Step for Standalone {
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
.arg("--markdown-no-toc")
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"))
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path);

Expand Down Expand Up @@ -523,6 +521,7 @@ impl Step for Std {
.arg("--markdown-css").arg("rust.css")
.arg("--markdown-no-toc")
.arg("--generate-redirect-pages")
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"));

builder.run(&mut cargo);
Expand Down
20 changes: 20 additions & 0 deletions src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,29 @@ set -ex

source shared.sh

BINUTILS=2.32
TARGET=powerpc64-unknown-linux-gnu
PREFIX=/x-tools/$TARGET
SYSROOT=$PREFIX/$TARGET/sysroot

mkdir build
cd build
cp ../powerpc64-linux-gnu.config .config
hide_output ct-ng build
cd ..
rm -rf build

chmod -R u+w $PREFIX

# Next, download and build newer binutils.
mkdir binutils-$TARGET
pushd binutils-$TARGET
curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf -
mkdir binutils-build
cd binutils-build
hide_output ../binutils-$BINUTILS/configure --target=$TARGET \
--prefix=$PREFIX --with-sysroot=$SYSROOT
hide_output make -j10
hide_output make install
popd
rm -rf binutils-$TARGET
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

source shared.sh

BINUTILS=2.25.1
BINUTILS=2.32
GCC=5.3.0
TARGET=powerpc64le-linux-gnu
SYSROOT=/usr/local/$TARGET/sysroot
Expand Down
1 change: 1 addition & 0 deletions src/ci/docker/x86_64-gnu-tools/checktools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ status_check() {
check_dispatch $1 beta clippy-driver src/tools/clippy
# these tools are not required for beta to successfully branch
check_dispatch $1 nightly miri src/tools/miri
check_dispatch $1 nightly embedded-book src/doc/embedded-book
}

# If this PR is intended to update one of these tools, do not let the build pass
Expand Down
8 changes: 4 additions & 4 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ impl<T: ?Sized> From<Box<T>> for Pin<Box<T>> {
}

#[stable(feature = "box_from_slice", since = "1.17.0")]
impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
impl<T: Copy> From<&[T]> for Box<[T]> {
/// Converts a `&[T]` into a `Box<[T]>`
///
/// This conversion allocates on the heap
Expand All @@ -503,15 +503,15 @@ impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
///
/// println!("{:?}", boxed_slice);
/// ```
fn from(slice: &'a [T]) -> Box<[T]> {
fn from(slice: &[T]) -> Box<[T]> {
let mut boxed = unsafe { RawVec::with_capacity(slice.len()).into_box() };
boxed.copy_from_slice(slice);
boxed
}
}

#[stable(feature = "box_from_slice", since = "1.17.0")]
impl<'a> From<&'a str> for Box<str> {
impl From<&str> for Box<str> {
/// Converts a `&str` into a `Box<str>`
///
/// This conversion allocates on the heap
Expand All @@ -523,7 +523,7 @@ impl<'a> From<&'a str> for Box<str> {
/// println!("{}", boxed);
/// ```
#[inline]
fn from(s: &'a str) -> Box<str> {
fn from(s: &str) -> Box<str> {
unsafe { from_boxed_utf8_unchecked(Box::from(s.as_bytes())) }
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,15 +1145,15 @@ impl<T> From<T> for Rc<T> {
}

#[stable(feature = "shared_from_slice", since = "1.21.0")]
impl<'a, T: Clone> From<&'a [T]> for Rc<[T]> {
impl<T: Clone> From<&[T]> for Rc<[T]> {
#[inline]
fn from(v: &[T]) -> Rc<[T]> {
<Self as RcFromSlice<T>>::from_slice(v)
}
}

#[stable(feature = "shared_from_slice", since = "1.21.0")]
impl<'a> From<&'a str> for Rc<str> {
impl From<&str> for Rc<str> {
#[inline]
fn from(v: &str) -> Rc<str> {
let rc = Rc::<[u8]>::from(v.as_bytes());
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,9 +2172,9 @@ impl AsRef<[u8]> for String {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> From<&'a str> for String {
impl From<&str> for String {
#[inline]
fn from(s: &'a str) -> String {
fn from(s: &str) -> String {
s.to_owned()
}
}
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