Skip to content

Commit 2711f21

Browse files
committed
Auto merge of #45981 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests - Successful merges: #45815, #45941, #45950, #45951, #45961, #45967, #45970 - Failed merges:
2 parents 24840da + 0e19c4f commit 2711f21

Some content is hidden

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

54 files changed

+241
-375
lines changed

src/ci/docker/cross/build-arm-musl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/cross/build-rumprun.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/cross/install-x86_64-redox.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/cross2/build-fuchsia-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/cross2/build-solaris-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/disabled/wasm32-exp/node.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-aarch64-linux/build-toolchains.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-arm-linux/build-toolchains.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-armhf-linux/build-toolchains.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-armv7-linux/build-toolchains.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-freebsd/build-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-binutils.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-cmake.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-curl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-gcc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-git.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-headers.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-openssl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-i686-linux/build-python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-binutils.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-cmake.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-curl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-gcc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-git.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-headers.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-openssl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-linux/build-python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.
@@ -64,12 +64,12 @@ cd ../..
6464
rm -rf usr
6565

6666
cat > /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-gcc-sysroot <<'EOF'
67-
#!/bin/bash
67+
#!/usr/bin/env bash
6868
exec /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-gcc --sysroot=/x-tools/x86_64-unknown-netbsd/sysroot "$@"
6969
EOF
7070

7171
cat > /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-g++-sysroot <<'EOF'
72-
#!/bin/bash
72+
#!/usr/bin/env bash
7373
exec /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-g++ --sysroot=/x-tools/x86_64-unknown-netbsd/sysroot "$@"
7474
EOF
7575

src/ci/docker/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/init_repo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/ci/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.

src/libcore/str/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ pub trait FromStr: Sized {
7676

7777
/// Parses a string `s` to return a value of this type.
7878
///
79-
/// If parsing succeeds, return the value inside `Ok`, otherwise
79+
/// If parsing succeeds, return the value inside [`Ok`], otherwise
8080
/// when the string is ill-formatted return an error specific to the
81-
/// inside `Err`. The error type is specific to implementation of the trait.
81+
/// inside [`Err`]. The error type is specific to implementation of the trait.
82+
///
83+
/// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok
84+
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
8285
///
8386
/// # Examples
8487
///

src/librustc_mir/borrow_check.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(infcx: &InferCtxt<'a, 'gcx, 'tcx>,
9393
tcx.cannot_move_out_of(span, "borrowed_content", origin),
9494
IllegalMoveOriginKind::InteriorOfTypeWithDestructor { container_ty: ty } =>
9595
tcx.cannot_move_out_of_interior_of_drop(span, ty, origin),
96-
IllegalMoveOriginKind::InteriorOfSlice { elem_ty: ty, is_index } =>
97-
tcx.cannot_move_out_of_interior_noncopy(span, ty, is_index, origin),
98-
IllegalMoveOriginKind::InteriorOfArray { elem_ty: ty, is_index } =>
96+
IllegalMoveOriginKind::InteriorOfSliceOrArray { ty, is_index } =>
9997
tcx.cannot_move_out_of_interior_noncopy(span, ty, is_index, origin),
10098
};
10199
err.emit();

src/librustc_mir/dataflow/move_paths/builder.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,21 @@ impl<'b, 'a, 'gcx, 'tcx> Gatherer<'b, 'a, 'gcx, 'tcx> {
137137
// move out of union - always move the entire union
138138
ty::TyAdt(adt, _) if adt.is_union() =>
139139
return Err(MoveError::UnionMove { path: base }),
140-
ty::TySlice(elem_ty) =>
140+
ty::TySlice(_) =>
141141
return Err(MoveError::cannot_move_out_of(
142142
mir.source_info(self.loc).span,
143-
InteriorOfSlice {
144-
elem_ty, is_index: match proj.elem {
143+
InteriorOfSliceOrArray {
144+
ty: lv_ty, is_index: match proj.elem {
145145
ProjectionElem::Index(..) => true,
146146
_ => false
147147
},
148148
})),
149-
ty::TyArray(elem_ty, _num_elems) => match proj.elem {
149+
ty::TyArray(..) => match proj.elem {
150150
ProjectionElem::Index(..) =>
151151
return Err(MoveError::cannot_move_out_of(
152152
mir.source_info(self.loc).span,
153-
InteriorOfArray {
154-
elem_ty, is_index: true
153+
InteriorOfSliceOrArray {
154+
ty: lv_ty, is_index: true
155155
})),
156156
_ => {
157157
// FIXME: still badly broken

src/librustc_mir/dataflow/move_paths/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ pub(crate) enum IllegalMoveOriginKind<'tcx> {
239239
Static,
240240
BorrowedContent,
241241
InteriorOfTypeWithDestructor { container_ty: ty::Ty<'tcx> },
242-
InteriorOfSlice { elem_ty: ty::Ty<'tcx>, is_index: bool, },
243-
InteriorOfArray { elem_ty: ty::Ty<'tcx>, is_index: bool, },
242+
InteriorOfSliceOrArray { ty: ty::Ty<'tcx>, is_index: bool, },
244243
}
245244

246245
#[derive(Debug)]

src/librustdoc/html/highlight.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn render_with_highlighting(src: &str, class: Option<&str>, id: Option<&str>
4242

4343
let mut out = Vec::new();
4444
if let Some((tooltip, class)) = tooltip {
45-
write!(out, "<div class='information'><div class='tooltip {}'><span \
45+
write!(out, "<div class='information'><div class='tooltip {}'><span \
4646
class='tooltiptext'>{}</span></div></div>",
4747
class, tooltip).unwrap();
4848
}

src/librustdoc/html/markdown.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'a, I> {
227227
))
228228
});
229229
let tooltip = if ignore {
230-
Some(("Be careful when using this code, it's not being tested!", "ignore"))
230+
Some(("This example is not tested", "ignore"))
231231
} else if compile_fail {
232-
Some(("This code doesn't compile so be extra careful!", "compile_fail"))
232+
Some(("This example deliberately fails to compile", "compile_fail"))
233233
} else {
234234
None
235235
};
@@ -638,9 +638,9 @@ pub fn render(w: &mut fmt::Formatter,
638638
))
639639
});
640640
let tooltip = if ignore {
641-
Some(("Be careful when using this code, it's not being tested!", "ignore"))
641+
Some(("This example is not tested", "ignore"))
642642
} else if compile_fail {
643-
Some(("This code doesn't compile so be extra careful!", "compile_fail"))
643+
Some(("This example deliberately fails to compile", "compile_fail"))
644644
} else {
645645
None
646646
};

src/test/compile-fail/E0508.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// revisions: ast mir
12+
//[mir]compile-flags: -Zborrowck-mir
13+
1114
struct NonCopy;
1215

1316
fn main() {
1417
let array = [NonCopy; 1];
15-
let _value = array[0]; //~ ERROR E0508
18+
let _value = array[0]; //[ast]~ ERROR E0508
19+
//[mir]~^ ERROR (Ast) [E0508]
20+
//[mir]~| ERROR (Mir) [E0508]
1621
}

0 commit comments

Comments
 (0)