Skip to content

Commit 641586c

Browse files
committed
Auto merge of #63771 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports Cherry-picked: * RELEASES.md: ? is one of three Kleene operators #63529 * Do not ICE when synthesizing spans falling inside unicode chars #63508 * ci: move mirrors to their standalone bucket #63485 r? @ghost
2 parents e450539 + 3288766 commit 641586c

17 files changed

+49
-30
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Language
2222
- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
2323
`const _: u32 = 5;`.
2424
- [You can now use `#[repr(align(X)]` on enums.][61229]
25-
- [The `?`/_"Kleene"_ macro operator is now available in the
25+
- [The `?` Kleene macro operator is now available in the
2626
2015 edition.][60932]
2727

2828
Compiler

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/libsyntax/source_map.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ impl SourceMap {
519519
/// extract function takes three arguments: a string slice containing the source, an index in
520520
/// the slice for the beginning of the span and an index in the slice for the end of the span.
521521
fn span_to_source<F>(&self, sp: Span, extract_source: F) -> Result<String, SpanSnippetError>
522-
where F: Fn(&str, usize, usize) -> String
522+
where F: Fn(&str, usize, usize) -> Result<String, SpanSnippetError>
523523
{
524524
if sp.lo() > sp.hi() {
525525
return Err(SpanSnippetError::IllFormedSpan(sp));
@@ -554,9 +554,9 @@ impl SourceMap {
554554
}
555555

556556
if let Some(ref src) = local_begin.sf.src {
557-
return Ok(extract_source(src, start_index, end_index));
557+
return extract_source(src, start_index, end_index);
558558
} else if let Some(src) = local_begin.sf.external_src.borrow().get_source() {
559-
return Ok(extract_source(src, start_index, end_index));
559+
return extract_source(src, start_index, end_index);
560560
} else {
561561
return Err(SpanSnippetError::SourceNotAvailable {
562562
filename: local_begin.sf.name.clone()
@@ -567,8 +567,9 @@ impl SourceMap {
567567

568568
/// Returns the source snippet as `String` corresponding to the given `Span`
569569
pub fn span_to_snippet(&self, sp: Span) -> Result<String, SpanSnippetError> {
570-
self.span_to_source(sp, |src, start_index, end_index| src[start_index..end_index]
571-
.to_string())
570+
self.span_to_source(sp, |src, start_index, end_index| src.get(start_index..end_index)
571+
.map(|s| s.to_string())
572+
.ok_or_else(|| SpanSnippetError::IllFormedSpan(sp)))
572573
}
573574

574575
pub fn span_to_margin(&self, sp: Span) -> Option<usize> {
@@ -582,7 +583,9 @@ impl SourceMap {
582583

583584
/// Returns the source snippet as `String` before the given `Span`
584585
pub fn span_to_prev_source(&self, sp: Span) -> Result<String, SpanSnippetError> {
585-
self.span_to_source(sp, |src, start_index, _| src[..start_index].to_string())
586+
self.span_to_source(sp, |src, start_index, _| src.get(..start_index)
587+
.map(|s| s.to_string())
588+
.ok_or_else(|| SpanSnippetError::IllFormedSpan(sp)))
586589
}
587590

588591
/// Extend the given `Span` to just after the previous occurrence of `c`. Return the same span
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
struct X {}
2+
fn main() {
3+
vec![X]; //…
4+
//~^ ERROR expected value, found struct `X`
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0423]: expected value, found struct `X`
2+
--> $DIR/issue-61226.rs:3:10
3+
|
4+
LL | vec![X]; //…
5+
| ^ did you mean `X { /* fields */ }`?
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0423`.

0 commit comments

Comments
 (0)