Skip to content

Commit ab8b961

Browse files
committed
Auto merge of #49379 - TimNN:rollup, r=TimNN
Rollup of 7 pull requests - Successful merges: #48693, #48932, #49103, #49170, #49187, #49346, #49353 - Failed merges:
2 parents 13a86f4 + 1233aa2 commit ab8b961

File tree

31 files changed

+181
-37
lines changed

31 files changed

+181
-37
lines changed

Diff for: src/bootstrap/compile.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl Step for Std {
9898
copy_musl_third_party_objects(build, target, &libdir);
9999
}
100100

101-
let out_dir = build.stage_out(compiler, Mode::Libstd);
101+
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
102102
build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
103103
let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build");
104104
std_cargo(builder, &compiler, target, &mut cargo);
@@ -360,7 +360,7 @@ impl Step for Test {
360360
return;
361361
}
362362

363-
let out_dir = build.stage_out(compiler, Mode::Libtest);
363+
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
364364
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
365365
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "build");
366366
test_cargo(build, &compiler, target, &mut cargo);
@@ -482,10 +482,9 @@ impl Step for Rustc {
482482
compiler: builder.compiler(self.compiler.stage, build.build),
483483
target: build.build,
484484
});
485-
486-
let stage_out = builder.stage_out(compiler, Mode::Librustc);
487-
build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target));
488-
build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target));
485+
let cargo_out = builder.cargo_out(compiler, Mode::Librustc, target);
486+
build.clear_if_dirty(&cargo_out, &libstd_stamp(build, compiler, target));
487+
build.clear_if_dirty(&cargo_out, &libtest_stamp(build, compiler, target));
489488

490489
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build");
491490
rustc_cargo(build, &mut cargo);

Diff for: src/bootstrap/tool.rs

+4
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ impl Step for Rustdoc {
338338
};
339339

340340
builder.ensure(compile::Rustc { compiler: build_compiler, target });
341+
builder.ensure(compile::Rustc {
342+
compiler: build_compiler,
343+
target: builder.build.build,
344+
});
341345

342346
let mut cargo = prepare_tool_cargo(builder,
343347
build_compiler,

Diff for: src/ci/docker/dist-aarch64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
3232

3333
ENV HOSTS=aarch64-unknown-linux-gnu
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-android/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ ENV RUST_CONFIGURE_ARGS \
2626
--armv7-linux-androideabi-ndk=/android/ndk/arm-14 \
2727
--i686-linux-android-ndk=/android/ndk/x86-14 \
2828
--aarch64-linux-android-ndk=/android/ndk/arm64-21 \
29-
--x86_64-linux-android-ndk=/android/ndk/x86_64-21
29+
--x86_64-linux-android-ndk=/android/ndk/x86_64-21 \
30+
--disable-docs
3031

3132
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
3233

Diff for: src/ci/docker/dist-arm-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
3232

3333
ENV HOSTS=arm-unknown-linux-gnueabi
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-armhf-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
3232

3333
ENV HOSTS=arm-unknown-linux-gnueabihf
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-armv7-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \
3232

3333
ENV HOSTS=armv7-unknown-linux-gnueabihf
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ RUN sh /scripts/sccache.sh
3232
ENV RUST_CONFIGURE_ARGS \
3333
--musl-root-i586=/musl-i586 \
3434
--musl-root-i686=/musl-i686 \
35-
--enable-extended
35+
--enable-extended \
36+
--disable-docs
3637

3738
# Newer binutils broke things on some vms/distros (i.e., linking against
3839
# unknown relocs disabled by the following flag), so we need to go out of our

Diff for: src/ci/docker/dist-i686-freebsd/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ ENV \
2929

3030
ENV HOSTS=i686-unknown-freebsd
3131

32-
ENV RUST_CONFIGURE_ARGS --enable-extended
32+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3333
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-mips-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ RUN sh /scripts/sccache.sh
2222

2323
ENV HOSTS=mips-unknown-linux-gnu
2424

25-
ENV RUST_CONFIGURE_ARGS --enable-extended
25+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2626
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-mips64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN sh /scripts/sccache.sh
2121

2222
ENV HOSTS=mips64-unknown-linux-gnuabi64
2323

24-
ENV RUST_CONFIGURE_ARGS --enable-extended
24+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2525
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-mips64el-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ RUN sh /scripts/sccache.sh
2222

2323
ENV HOSTS=mips64el-unknown-linux-gnuabi64
2424

25-
ENV RUST_CONFIGURE_ARGS --enable-extended
25+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2626
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-mipsel-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN sh /scripts/sccache.sh
2121

2222
ENV HOSTS=mipsel-unknown-linux-gnu
2323

24-
ENV RUST_CONFIGURE_ARGS --enable-extended
24+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2525
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-powerpc-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ENV \
3434

3535
ENV HOSTS=powerpc-unknown-linux-gnu
3636

37-
ENV RUST_CONFIGURE_ARGS --enable-extended
37+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3838
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
3939

4040
# FIXME(#36150) this will fail the bootstrap. Probably means something bad is

Diff for: src/ci/docker/dist-powerpc64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ ENV \
3535

3636
ENV HOSTS=powerpc64-unknown-linux-gnu
3737

38-
ENV RUST_CONFIGURE_ARGS --enable-extended
38+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3939
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-powerpc64le-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV \
3232

3333
ENV HOSTS=powerpc64le-unknown-linux-gnu
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-s390x-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ ENV \
3434

3535
ENV HOSTS=s390x-unknown-linux-gnu
3636

37-
ENV RUST_CONFIGURE_ARGS --enable-extended
37+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3838
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-various-1/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ ENV RUST_CONFIGURE_ARGS \
9595
--musl-root-aarch64=/musl-aarch64 \
9696
--musl-root-mips=/musl-mips \
9797
--musl-root-mipsel=/musl-mipsel \
98-
--enable-emscripten
98+
--enable-emscripten \
99+
--disable-docs
99100

100101
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
101102

Diff for: src/ci/docker/dist-various-2/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ ENV TARGETS=$TARGETS,x86_64-sun-solaris
5555
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
5656
ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
5757

58-
ENV RUST_CONFIGURE_ARGS --enable-extended
58+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
5959
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

Diff for: src/ci/docker/dist-x86_64-freebsd/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ ENV \
2929

3030
ENV HOSTS=x86_64-unknown-freebsd
3131

32-
ENV RUST_CONFIGURE_ARGS --enable-extended
32+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3333
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-x86_64-musl/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ RUN sh /scripts/sccache.sh
3131

3232
ENV RUST_CONFIGURE_ARGS \
3333
--musl-root-x86_64=/musl-x86_64 \
34-
--enable-extended
34+
--enable-extended \
35+
--disable-docs
3536

3637
# Newer binutils broke things on some vms/distros (i.e., linking against
3738
# unknown relocs disabled by the following flag), so we need to go out of our

Diff for: src/ci/docker/dist-x86_64-netbsd/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ ENV \
3333

3434
ENV HOSTS=x86_64-unknown-netbsd
3535

36-
ENV RUST_CONFIGURE_ARGS --enable-extended
36+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3737
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/liballoc/btree/map.rs

+27
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,33 @@ impl<K: Ord, V> BTreeMap<K, V> {
576576
}
577577
}
578578

579+
/// Returns the key-value pair corresponding to the supplied key.
580+
///
581+
/// The supplied key may be any borrowed form of the map's key type, but the ordering
582+
/// on the borrowed form *must* match the ordering on the key type.
583+
///
584+
/// # Examples
585+
///
586+
/// ```
587+
/// #![feature(map_get_key_value)]
588+
/// use std::collections::BTreeMap;
589+
///
590+
/// let mut map = BTreeMap::new();
591+
/// map.insert(1, "a");
592+
/// assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
593+
/// assert_eq!(map.get_key_value(&2), None);
594+
/// ```
595+
#[unstable(feature = "map_get_key_value", issue = "49347")]
596+
pub fn get_key_value<Q: ?Sized>(&self, k: &Q) -> Option<(&K, &V)>
597+
where K: Borrow<Q>,
598+
Q: Ord
599+
{
600+
match search::search_tree(self.root.as_ref(), k) {
601+
Found(handle) => Some(handle.into_kv()),
602+
GoDown(_) => None,
603+
}
604+
}
605+
579606
/// Returns `true` if the map contains a value for the specified key.
580607
///
581608
/// The key may be any borrowed form of the map's key type, but the ordering

Diff for: src/libcore/fmt/num.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ trait GenericRadix {
6363
// characters for a base 2 number.
6464
let zero = T::zero();
6565
let is_nonnegative = x >= zero;
66-
let mut buf = [0; 128];
66+
let mut buf: [u8; 128] = unsafe { mem::uninitialized() };
6767
let mut curr = buf.len();
6868
let base = T::from_u8(Self::BASE);
6969
if is_nonnegative {

Diff for: src/libcore/iter/iterator.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -974,13 +974,13 @@ pub trait Iterator {
974974
/// // each iteration, we'll multiply the state by the element
975975
/// *state = *state * x;
976976
///
977-
/// // the value passed on to the next iteration
978-
/// Some(*state)
977+
/// // then, we'll yield the negation of the state
978+
/// Some(-*state)
979979
/// });
980980
///
981-
/// assert_eq!(iter.next(), Some(1));
982-
/// assert_eq!(iter.next(), Some(2));
983-
/// assert_eq!(iter.next(), Some(6));
981+
/// assert_eq!(iter.next(), Some(-1));
982+
/// assert_eq!(iter.next(), Some(-2));
983+
/// assert_eq!(iter.next(), Some(-6));
984984
/// assert_eq!(iter.next(), None);
985985
/// ```
986986
#[inline]

Diff for: src/libcore/sync/atomic.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@ pub enum Ordering {
205205
/// [`Release`]: http://llvm.org/docs/Atomics.html#release
206206
#[stable(feature = "rust1", since = "1.0.0")]
207207
Acquire,
208-
/// When coupled with a load, uses [`Acquire`] ordering, and with a store
209-
/// [`Release`] ordering.
208+
/// Has the effects of both [`Acquire`] and [`Release`] together.
209+
///
210+
/// This ordering is only applicable for operations that combine both loads and stores.
211+
///
212+
/// For loads it uses [`Acquire`] ordering. For stores it uses the [`Release`] ordering.
210213
///
211214
/// [`Acquire`]: http://llvm.org/docs/Atomics.html#acquire
212215
/// [`Release`]: http://llvm.org/docs/Atomics.html#release

0 commit comments

Comments
 (0)