Skip to content

Commit cf11696

Browse files
committed
Auto merge of #63517 - Centril:rollup-8qbalaf, r=Centril
Rollup of 10 pull requests Successful merges: - #62760 (Deduplicate error messages in `librsctc_mir`) - #62849 (typeck: Prohibit RPIT types that inherit lifetimes) - #63383 (`async fn` lifetime elision tests) - #63421 (Implement Clone, Display for ascii::EscapeDefault) - #63459 (syntax: account for CVarArgs being in the argument list.) - #63475 (Bring back suggestion for splitting `<-` into `< -`) - #63485 (ci: move mirrors to their standalone bucket) - #63486 (Document `From` trait for `BinaryHeap`) - #63488 (improve DiagnosticBuilder docs) - #63493 (Remove unneeded comment in src/libcore/hash/mod.rs) Failed merges: r? @ghost
2 parents 60960a2 + f1651d8 commit cf11696

File tree

79 files changed

+3098
-49
lines changed

Some content is hidden

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

79 files changed

+3098
-49
lines changed

src/ci/azure-pipelines/auto.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ jobs:
273273
MSYS_BITS: 32
274274
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
275275
SCRIPT: make ci-subset-1
276-
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
276+
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
277277
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
278278
MINGW_DIR: mingw32
279279
# FIXME(#59637)
@@ -283,14 +283,14 @@ jobs:
283283
MSYS_BITS: 32
284284
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
285285
SCRIPT: make ci-subset-2
286-
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
286+
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
287287
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
288288
MINGW_DIR: mingw32
289289
x86_64-mingw-1:
290290
MSYS_BITS: 64
291291
SCRIPT: make ci-subset-1
292292
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
293-
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
293+
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
294294
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
295295
MINGW_DIR: mingw64
296296
# FIXME(#59637)
@@ -300,7 +300,7 @@ jobs:
300300
MSYS_BITS: 64
301301
SCRIPT: make ci-subset-2
302302
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
303-
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
303+
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
304304
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
305305
MINGW_DIR: mingw64
306306

@@ -327,7 +327,7 @@ jobs:
327327
MSYS_BITS: 32
328328
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler
329329
SCRIPT: python x.py dist
330-
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
330+
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
331331
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
332332
MINGW_DIR: mingw32
333333
DIST_REQUIRE_ALL_TOOLS: 1
@@ -336,7 +336,7 @@ jobs:
336336
MSYS_BITS: 64
337337
SCRIPT: python x.py dist
338338
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler
339-
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
339+
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
340340
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
341341
MINGW_DIR: mingw64
342342
DIST_REQUIRE_ALL_TOOLS: 1

src/ci/azure-pipelines/steps/install-clang.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ steps:
3636
set -e
3737
mkdir -p citools
3838
cd citools
39-
curl -f https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.tar.gz | tar xzf -
39+
curl -f https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/LLVM-7.0.0-win64.tar.gz | tar xzf -
4040
echo "##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$RUST_CONFIGURE_ARGS --set llvm.clang-cl=`pwd`/clang-rust/bin/clang-cl.exe"
4141
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
4242
displayName: Install clang (Windows)

src/ci/azure-pipelines/steps/install-sccache.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ steps:
22

33
- bash: |
44
set -e
5-
curl -fo /usr/local/bin/sccache https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin
5+
curl -fo /usr/local/bin/sccache https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2018-04-02-sccache-x86_64-apple-darwin
66
chmod +x /usr/local/bin/sccache
77
displayName: Install sccache (OSX)
88
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
99

1010
- script: |
1111
md sccache
12-
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
12+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2018-04-26-sccache-x86_64-pc-windows-msvc"
1313
echo ##vso[task.prependpath]%CD%\sccache
1414
displayName: Install sccache (Windows)
1515
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

src/ci/azure-pipelines/steps/install-windows-build-deps.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ steps:
44
# https://github.com/wixtoolset/wix3 originally
55
- bash: |
66
set -e
7-
curl -O https://rust-lang-ci2.s3-us-west-1.amazonaws.com/rust-ci-mirror/wix311-binaries.zip
7+
curl -O https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/wix311-binaries.zip
88
echo "##vso[task.setvariable variable=WIX]`pwd`/wix"
99
mkdir -p wix/bin
1010
cd wix/bin
@@ -18,7 +18,7 @@ steps:
1818
# one is MSI installers and one is EXE, but they're not used so frequently at
1919
# this point anyway so perhaps it's a wash!
2020
- script: |
21-
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf is-install.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-08-22-is.exe"
21+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf is-install.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-08-22-is.exe"
2222
is-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
2323
echo ##vso[task.prependpath]C:\Program Files (x86)\Inno Setup 5
2424
displayName: Install InnoSetup
@@ -109,7 +109,7 @@ steps:
109109
# Note that this is originally from the github releases patch of Ninja
110110
- script: |
111111
md ninja
112-
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-03-15-ninja-win.zip"
112+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip"
113113
7z x -oninja 2017-03-15-ninja-win.zip
114114
del 2017-03-15-ninja-win.zip
115115
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja

src/ci/docker/armhf-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
7272

7373
# TODO: What is this?!
7474
# Source of the file: https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/vexpress-v2p-ca15-tc1.dtb
75-
RUN curl -O https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/vexpress-v2p-ca15-tc1.dtb
75+
RUN curl -O https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/vexpress-v2p-ca15-tc1.dtb
7676

7777
COPY scripts/sccache.sh /scripts/
7878
RUN sh /scripts/sccache.sh

src/ci/docker/dist-various-1/install-mips-musl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mkdir /usr/local/mips-linux-musl
55
# originally from
66
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/
77
# OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
8-
URL="https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror"
8+
URL="https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc"
99
FILE="OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2"
1010
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
1111

src/ci/docker/dist-various-2/build-wasi-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
set -ex
66

77
# Originally from https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
8-
curl https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/clang%2Bllvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \
8+
curl https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/clang%2Bllvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \
99
tar xJf -
1010
export PATH=`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
1111

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ex
44
source shared.sh
55

66
VERSION=1.0.2k
7-
URL=https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/openssl-$VERSION.tar.gz
7+
URL=https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/openssl-$VERSION.tar.gz
88

99
curl $URL | tar xzf -
1010

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cd netbsd
2525

2626
mkdir -p /x-tools/x86_64-unknown-netbsd/sysroot
2727

28-
URL=https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
28+
URL=https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
2929

3030
# Originally from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-$BSD/source/sets/*.tgz
3131
curl $URL/2018-03-01-netbsd-src.tgz | tar xzf -

src/ci/docker/scripts/android-sdk-manager.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
HOST_OS = "linux"
2424

2525
# Mirroring options
26-
MIRROR_BUCKET = "rust-lang-ci2"
27-
MIRROR_BASE_DIR = "rust-ci-mirror/android/"
26+
MIRROR_BUCKET = "rust-lang-ci-mirrors"
27+
MIRROR_BUCKET_REGION = "us-west-1"
28+
MIRROR_BASE_DIR = "rustc/android/"
2829

2930
import argparse
3031
import hashlib
@@ -144,7 +145,8 @@ def cli_install(args):
144145
lockfile = Lockfile(args.lockfile)
145146
for package in lockfile.packages.values():
146147
# Download the file from the mirror into a temp file
147-
url = "https://" + MIRROR_BUCKET + ".s3.amazonaws.com/" + MIRROR_BASE_DIR
148+
url = "https://" + MIRROR_BUCKET + ".s3-" + MIRROR_BUCKET_REGION + \
149+
".amazonaws.com/" + MIRROR_BASE_DIR
148150
downloaded = package.download(url)
149151
# Extract the file in a temporary directory
150152
extract_dir = tempfile.mkdtemp()

src/ci/docker/scripts/freebsd-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ done
5959

6060
# Originally downloaded from:
6161
# https://download.freebsd.org/ftp/releases/${freebsd_arch}/${freebsd_version}-RELEASE/base.txz
62-
URL=https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2019-04-04-freebsd-${freebsd_arch}-${freebsd_version}-RELEASE-base.txz
62+
URL=https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2019-04-04-freebsd-${freebsd_arch}-${freebsd_version}-RELEASE-base.txz
6363
curl "$URL" | tar xJf - -C "$sysroot" --wildcards "${files_to_extract[@]}"
6464

6565
# Fix up absolute symlinks from the system image. This can be removed

src/ci/docker/scripts/sccache.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set -ex
22

33
curl -fo /usr/local/bin/sccache \
4-
https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-02-sccache-x86_64-unknown-linux-musl
4+
https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2018-04-02-sccache-x86_64-unknown-linux-musl
55

66
chmod +x /usr/local/bin/sccache

src/ci/install-awscli.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
set -euo pipefail
1717
IFS=$'\n\t'
1818

19-
MIRROR="https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2019-07-27-awscli.tar"
19+
MIRROR="https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2019-07-27-awscli.tar"
2020
DEPS_DIR="/tmp/awscli-deps"
2121

2222
pip="pip"

src/liballoc/collections/binary_heap.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,9 @@ impl<T> FusedIterator for Drain<'_, T> {}
11631163

11641164
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
11651165
impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
1166+
/// Converts a `Vec<T>` into a `BinaryHeap<T>`.
1167+
///
1168+
/// This conversion happens in-place, and has `O(n)` time complexity.
11661169
fn from(vec: Vec<T>) -> BinaryHeap<T> {
11671170
let mut heap = BinaryHeap { data: vec };
11681171
heap.rebuild();

src/libcore/ascii.rs

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use crate::fmt;
1515
use crate::ops::Range;
1616
use crate::iter::FusedIterator;
17+
use crate::str::from_utf8_unchecked;
1718

1819
/// An iterator over the escaped version of a byte.
1920
///
@@ -22,6 +23,7 @@ use crate::iter::FusedIterator;
2223
///
2324
/// [`escape_default`]: fn.escape_default.html
2425
#[stable(feature = "rust1", since = "1.0.0")]
26+
#[derive(Clone)]
2527
pub struct EscapeDefault {
2628
range: Range<usize>,
2729
data: [u8; 4],
@@ -130,6 +132,13 @@ impl ExactSizeIterator for EscapeDefault {}
130132
#[stable(feature = "fused", since = "1.26.0")]
131133
impl FusedIterator for EscapeDefault {}
132134

135+
#[stable(feature = "ascii_escape_display", since = "1.39.0")]
136+
impl fmt::Display for EscapeDefault {
137+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
138+
f.write_str(unsafe { from_utf8_unchecked(&self.data[self.range.clone()]) })
139+
}
140+
}
141+
133142
#[stable(feature = "std_debug", since = "1.16.0")]
134143
impl fmt::Debug for EscapeDefault {
135144
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

src/libcore/hash/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,6 @@ impl<H> PartialEq for BuildHasherDefault<H> {
553553
#[stable(since = "1.29.0", feature = "build_hasher_eq")]
554554
impl<H> Eq for BuildHasherDefault<H> {}
555555

556-
//////////////////////////////////////////////////////////////////////////////
557-
558556
mod impls {
559557
use crate::mem;
560558
use crate::slice;

src/librustc_errors/diagnostic.rs

+6
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ impl Diagnostic {
120120
}
121121

122122
/// Adds a span/label to be included in the resulting snippet.
123+
/// This label will be shown together with the original span/label used when creating the
124+
/// diagnostic, *not* a span added by one of the `span_*` methods.
125+
///
123126
/// This is pushed onto the `MultiSpan` that was created when the
124127
/// diagnostic was first built. If you don't call this function at
125128
/// all, and you just supplied a `Span` to create the diagnostic,
@@ -196,6 +199,7 @@ impl Diagnostic {
196199
self
197200
}
198201

202+
/// Prints the span with a note above it.
199203
pub fn span_note<S: Into<MultiSpan>>(&mut self,
200204
sp: S,
201205
msg: &str)
@@ -209,6 +213,7 @@ impl Diagnostic {
209213
self
210214
}
211215

216+
/// Prints the span with a warn above it.
212217
pub fn span_warn<S: Into<MultiSpan>>(&mut self,
213218
sp: S,
214219
msg: &str)
@@ -222,6 +227,7 @@ impl Diagnostic {
222227
self
223228
}
224229

230+
/// Prints the span with some help above it.
225231
pub fn span_help<S: Into<MultiSpan>>(&mut self,
226232
sp: S,
227233
msg: &str)

src/librustc_mir/const_eval.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,12 @@ pub fn error_to_const_error<'mir, 'tcx>(
540540
ConstEvalErr { error: error.kind, stacktrace, span: ecx.tcx.span }
541541
}
542542

543+
pub fn note_on_undefined_behavior_error() -> &'static str {
544+
"The rules on what exactly is undefined behavior aren't clear, \
545+
so this check might be overzealous. Please open an issue on the rust compiler \
546+
repository if you believe it should not be considered undefined behavior"
547+
}
548+
543549
fn validate_and_turn_into_const<'tcx>(
544550
tcx: TyCtxt<'tcx>,
545551
constant: RawConst<'tcx>,
@@ -579,10 +585,7 @@ fn validate_and_turn_into_const<'tcx>(
579585
let err = error_to_const_error(&ecx, error);
580586
match err.struct_error(ecx.tcx, "it is undefined behavior to use this value") {
581587
Ok(mut diag) => {
582-
diag.note("The rules on what exactly is undefined behavior aren't clear, \
583-
so this check might be overzealous. Please open an issue on the rust compiler \
584-
repository if you believe it should not be considered undefined behavior",
585-
);
588+
diag.note(note_on_undefined_behavior_error());
586589
diag.emit();
587590
ErrorHandled::Reported
588591
}

src/librustc_mir/interpret/intern.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,7 @@ pub fn intern_const_alloc_recursive(
296296
let err = crate::const_eval::error_to_const_error(&ecx, error);
297297
match err.struct_error(ecx.tcx, "it is undefined behavior to use this value") {
298298
Ok(mut diag) => {
299-
diag.note("The rules on what exactly is undefined behavior aren't clear, \
300-
so this check might be overzealous. Please open an issue on the rust \
301-
compiler repository if you believe it should not be considered \
302-
undefined behavior",
303-
);
299+
diag.note(crate::const_eval::note_on_undefined_behavior_error());
304300
diag.emit();
305301
}
306302
Err(ErrorHandled::TooGeneric) |

0 commit comments

Comments
 (0)