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 11 pull requests #42257

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f8b66a0
trace_macro: Show both the macro call and its expansion. #42072.
jorendorff May 19, 2017
dec23d4
Update Rc and Arc documentation.
nical May 21, 2017
57f260d
Override size_hint and propagate ExactSizeIterator for iter::StepBy
scottmcm May 23, 2017
4be488c
Add iterator_step_by to the unstable book's summary
scottmcm May 21, 2017
fcb3a71
Update description of iter::StepBy
scottmcm May 21, 2017
21dd71f
incr.comp.: Track expanded spans instead of FileMaps.
michaelwoerister May 23, 2017
fb9ca16
Remove all instances of fragment_infos and fragment sets
Nashenas88 May 24, 2017
6453f68
rust-src: include everything needed to compile libstd with jemalloc
RalfJung May 25, 2017
5ce2eb1
use shared scripts for init and sccache in cross image
venkatagiri May 25, 2017
87950b7
Stabilize non capturing closure to fn coercion
est31 May 23, 2017
a563f35
Remove irrelevant tests and unused testing attribute
Nashenas88 May 25, 2017
c87f6d8
regression test for #39974
venkatagiri May 25, 2017
1a9c7b2
Updated locked version of libgit2
alexcrichton May 26, 2017
7acc999
ci: move musl install into their own scripts
venkatagiri May 25, 2017
9d01840
extend `struct_tail` to operate over closures
nikomatsakis May 26, 2017
f476dbf
Rollup merge of #42103 - jorendorff:master, r=estebank
Mark-Simulacrum May 27, 2017
cedd2eb
Rollup merge of #42137 - nical:doc-clone, r=BurntSushi
Mark-Simulacrum May 27, 2017
05d94c8
Rollup merge of #42162 - est31:closure-to-fn-coercion, r=aturon
Mark-Simulacrum May 27, 2017
1395070
Rollup merge of #42167 - scottmcm:iter-stepby-sizehint, r=alexcrichton
Mark-Simulacrum May 27, 2017
9e46d14
Rollup merge of #42175 - michaelwoerister:filemap-hashing-fix-1, r=ni…
Mark-Simulacrum May 27, 2017
b4f524b
Rollup merge of #42207 - Nashenas88:remove_fragment_info, r=eddyb
Mark-Simulacrum May 27, 2017
84bdd27
Rollup merge of #42214 - RalfJung:rust-src, r=alexcrichton
Mark-Simulacrum May 27, 2017
3567d56
Rollup merge of #42217 - venkatagiri:issue_39974, r=Mark-Simulacrum
Mark-Simulacrum May 27, 2017
0b4e7b4
Rollup merge of #42218 - venkatagiri:update_cross, r=alexchrichton
Mark-Simulacrum May 27, 2017
0c5830c
Rollup merge of #42246 - alexcrichton:update-cargo, r=nikomatsakis
Mark-Simulacrum May 27, 2017
818c0e2
Rollup merge of #42251 - nikomatsakis:issue-42210-regr-unsized-tail, …
Mark-Simulacrum May 27, 2017
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
8 changes: 4 additions & 4 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ pub fn rust_src(build: &Build) {
"src/liballoc",
"src/liballoc_jemalloc",
"src/liballoc_system",
"src/libbacktrace",
"src/libcollections",
"src/libcompiler_builtins",
"src/libcore",
Expand All @@ -634,12 +635,25 @@ pub fn rust_src(build: &Build) {
"src/libstd_unicode",
"src/libunwind",
"src/rustc/libc_shim",
"src/libtest",
"src/libterm",
"src/libgetopts",
"src/compiler-rt",
"src/jemalloc",
];
let std_src_dirs_exclude = [
"src/compiler-rt/test",
"src/jemalloc/test/unit",
];

for item in &std_src_dirs {
let dst = &dst_src.join(item);
t!(fs::create_dir_all(dst));
cp_r(&plain_dst_src.join(item), dst);
cp_filtered(&plain_dst_src.join(item), dst,
&|path| {
let item_path = Path::new(item).join(path);
!std_src_dirs_exclude.iter().any(|excl| item_path == Path::new(excl))
} );
}

// Create source tarball in rust-installer format
Expand Down
38 changes: 14 additions & 24 deletions src/ci/docker/cross/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config

RUN curl -o /usr/local/bin/sccache \
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl && \
chmod +x /usr/local/bin/sccache

RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i dumb-init_*.deb && \
rm dumb-init_*.deb
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# dumb-init
COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

WORKDIR /tmp

Expand All @@ -38,23 +33,11 @@ RUN ./build-rumprun.sh
COPY cross/build-arm-musl.sh /tmp/
RUN ./build-arm-musl.sh

# originally from
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
RUN mkdir /usr/local/mips-linux-musl
RUN curl -L https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2 | \
tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
RUN for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do \
ln -s $file /usr/local/bin/`basename $file`; \
done
COPY cross/install-mips-musl.sh /tmp/
RUN ./install-mips-musl.sh

# Note that this originally came from:
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
RUN mkdir /usr/local/mipsel-linux-musl
RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
RUN for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do \
ln -s $file /usr/local/bin/`basename $file`; \
done
COPY cross/install-mipsel-musl.sh /tmp/
RUN ./install-mipsel-musl.sh

ENV TARGETS=asmjs-unknown-emscripten
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
Expand All @@ -80,3 +63,10 @@ ENV RUST_CONFIGURE_ARGS \
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
--musl-root-armv7=/usr/local/armv7-linux-musleabihf
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

# sccache
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

# init
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
24 changes: 24 additions & 0 deletions src/ci/docker/cross/install-mips-musl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -ex

mkdir /usr/local/mips-linux-musl

# originally from
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/
# OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
URL="https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror"
FILE="OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2"
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mips-linux-musl --strip-components=2

for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do
ln -s $file /usr/local/bin/`basename $file`
done
24 changes: 24 additions & 0 deletions src/ci/docker/cross/install-mipsel-musl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -ex

mkdir /usr/local/mipsel-linux-musl

# Note that this originally came from:
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/
# OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
URL="https://s3.amazonaws.com/rust-lang-ci/libc"
FILE="OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2"
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2

for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do
ln -s $file /usr/local/bin/`basename $file`
done
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
- [cfg_target_has_atomic](language-features/cfg-target-has-atomic.md)
- [cfg_target_thread_local](language-features/cfg-target-thread-local.md)
- [cfg_target_vendor](language-features/cfg-target-vendor.md)
- [closure_to_fn_coercion](language-features/closure-to-fn-coercion.md)
- [compiler_builtins](language-features/compiler-builtins.md)
- [concat_idents](language-features/concat-idents.md)
- [conservative_impl_trait](language-features/conservative-impl-trait.md)
Expand Down Expand Up @@ -154,6 +153,7 @@
- [io](library-features/io.md)
- [ip](library-features/ip.md)
- [iter_rfind](library-features/iter-rfind.md)
- [iterator_step_by](library-features/iterator-step-by.md)
- [libstd_io_internals](library-features/libstd-io-internals.md)
- [libstd_sys_internals](library-features/libstd-sys-internals.md)
- [libstd_thread_internals](library-features/libstd-thread-internals.md)
Expand Down

This file was deleted.

44 changes: 31 additions & 13 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// strong `Arc` pointers from parent nodes to children, and [`Weak`][weak]
/// pointers from children back to their parents.
///
/// # Cloning references
///
/// Creating a new reference from an existing reference counted pointer is done using the
/// `Clone` trait implemented for [`Arc<T>`][`arc`] and [`Weak<T>`][`weak`].
///
/// ```
/// use std::sync::Arc;
/// let foo = Arc::new(vec![1.0, 2.0, 3.0]);
/// // The two syntaxes below are equivalent.
/// let a = foo.clone();
/// let b = Arc::clone(&foo);
/// // a and b both point to the same memory location as foo.
/// ```
///
/// The `Arc::clone(&from)` syntax is the most idiomatic because it conveys more explicitly
/// the meaning of the code. In the example above, this syntax makes it easier to see that
/// this code is creating a new reference rather than copying the whole content of foo.
///
/// ## `Deref` behavior
///
/// `Arc<T>` automatically dereferences to `T` (via the [`Deref`][deref] trait),
Expand Down Expand Up @@ -138,7 +156,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// let five = Arc::new(5);
///
/// for _ in 0..10 {
/// let five = five.clone();
/// let five = Arc::clone(&five);
///
/// thread::spawn(move || {
/// println!("{:?}", five);
Expand All @@ -158,7 +176,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// let val = Arc::new(AtomicUsize::new(5));
///
/// for _ in 0..10 {
/// let val = val.clone();
/// let val = Arc::clone(&val);
///
/// thread::spawn(move || {
/// let v = val.fetch_add(1, Ordering::SeqCst);
Expand Down Expand Up @@ -282,7 +300,7 @@ impl<T> Arc<T> {
/// assert_eq!(Arc::try_unwrap(x), Ok(3));
///
/// let x = Arc::new(4);
/// let _y = x.clone();
/// let _y = Arc::clone(&x);
/// assert_eq!(*Arc::try_unwrap(x).unwrap_err(), 4);
/// ```
#[inline]
Expand Down Expand Up @@ -451,7 +469,7 @@ impl<T: ?Sized> Arc<T> {
/// use std::sync::Arc;
///
/// let five = Arc::new(5);
/// let _also_five = five.clone();
/// let _also_five = Arc::clone(&five);
///
/// // This assertion is deterministic because we haven't shared
/// // the `Arc` between threads.
Expand Down Expand Up @@ -499,7 +517,7 @@ impl<T: ?Sized> Arc<T> {
/// use std::sync::Arc;
///
/// let five = Arc::new(5);
/// let same_five = five.clone();
/// let same_five = Arc::clone(&five);
/// let other_five = Arc::new(5);
///
/// assert!(Arc::ptr_eq(&five, &same_five));
Expand All @@ -524,7 +542,7 @@ impl<T: ?Sized> Clone for Arc<T> {
///
/// let five = Arc::new(5);
///
/// five.clone();
/// Arc::clone(&five);
/// ```
#[inline]
fn clone(&self) -> Arc<T> {
Expand Down Expand Up @@ -591,7 +609,7 @@ impl<T: Clone> Arc<T> {
/// let mut data = Arc::new(5);
///
/// *Arc::make_mut(&mut data) += 1; // Won't clone anything
/// let mut other_data = data.clone(); // Won't clone inner data
/// let mut other_data = Arc::clone(&data); // Won't clone inner data
/// *Arc::make_mut(&mut data) += 1; // Clones inner data
/// *Arc::make_mut(&mut data) += 1; // Won't clone anything
/// *Arc::make_mut(&mut other_data) *= 2; // Won't clone anything
Expand Down Expand Up @@ -679,7 +697,7 @@ impl<T: ?Sized> Arc<T> {
/// *Arc::get_mut(&mut x).unwrap() = 4;
/// assert_eq!(*x, 4);
///
/// let _y = x.clone();
/// let _y = Arc::clone(&x);
/// assert!(Arc::get_mut(&mut x).is_none());
/// ```
#[inline]
Expand Down Expand Up @@ -751,7 +769,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
/// }
///
/// let foo = Arc::new(Foo);
/// let foo2 = foo.clone();
/// let foo2 = Arc::clone(&foo);
///
/// drop(foo); // Doesn't print anything
/// drop(foo2); // Prints "dropped!"
Expand Down Expand Up @@ -903,11 +921,11 @@ impl<T: ?Sized> Clone for Weak<T> {
/// # Examples
///
/// ```
/// use std::sync::Arc;
/// use std::sync::{Arc, Weak};
///
/// let weak_five = Arc::downgrade(&Arc::new(5));
///
/// weak_five.clone();
/// Weak::clone(&weak_five);
/// ```
#[inline]
fn clone(&self) -> Weak<T> {
Expand Down Expand Up @@ -956,7 +974,7 @@ impl<T: ?Sized> Drop for Weak<T> {
/// # Examples
///
/// ```
/// use std::sync::Arc;
/// use std::sync::{Arc, Weak};
///
/// struct Foo;
///
Expand All @@ -968,7 +986,7 @@ impl<T: ?Sized> Drop for Weak<T> {
///
/// let foo = Arc::new(Foo);
/// let weak_foo = Arc::downgrade(&foo);
/// let other_weak_foo = weak_foo.clone();
/// let other_weak_foo = Weak::clone(&weak_foo);
///
/// drop(weak_foo); // Doesn't print anything
/// drop(foo); // Prints "dropped!"
Expand Down
Loading