Skip to content

Commit f6be93f

Browse files
committed
Auto merge of rust-lang#3133 - rust-lang:rustup-2023-10-22, r=RalfJung
Automatic Rustup
2 parents 49e8acb + 8cbac82 commit f6be93f

File tree

240 files changed

+4090
-2273
lines changed

Some content is hidden

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

240 files changed

+4090
-2273
lines changed

.github/workflows/ci.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ jobs:
9393
- name: show the current environment
9494
run: src/ci/scripts/dump-environment.sh
9595
if: success() && !env.SKIP_JOB
96+
- name: install awscli
97+
run: src/ci/scripts/install-awscli.sh
98+
if: success() && !env.SKIP_JOB
9699
- name: install sccache
97100
run: src/ci/scripts/install-sccache.sh
98101
if: success() && !env.SKIP_JOB
@@ -345,8 +348,8 @@ jobs:
345348
os: macos-13
346349
- name: dist-aarch64-apple
347350
env:
348-
SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
349-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --disable-docs --set rust.jemalloc --set llvm.ninja=false"
351+
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
352+
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin"
350353
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
351354
SELECT_XCODE: /Applications/Xcode_13.4.1.app
352355
USE_XCODE_CLANG: 1
@@ -356,8 +359,7 @@ jobs:
356359
NO_DEBUG_ASSERTIONS: 1
357360
NO_OVERFLOW_CHECKS: 1
358361
DIST_REQUIRE_ALL_TOOLS: 1
359-
JEMALLOC_SYS_WITH_LG_PAGE: 14
360-
os: macos-13
362+
os: macos-13-xlarge
361363
- name: x86_64-msvc
362364
env:
363365
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
@@ -458,6 +460,9 @@ jobs:
458460
- name: show the current environment
459461
run: src/ci/scripts/dump-environment.sh
460462
if: success() && !env.SKIP_JOB
463+
- name: install awscli
464+
run: src/ci/scripts/install-awscli.sh
465+
if: success() && !env.SKIP_JOB
461466
- name: install sccache
462467
run: src/ci/scripts/install-sccache.sh
463468
if: success() && !env.SKIP_JOB
@@ -578,6 +583,9 @@ jobs:
578583
- name: show the current environment
579584
run: src/ci/scripts/dump-environment.sh
580585
if: success() && !env.SKIP_JOB
586+
- name: install awscli
587+
run: src/ci/scripts/install-awscli.sh
588+
if: success() && !env.SKIP_JOB
581589
- name: install sccache
582590
run: src/ci/scripts/install-sccache.sh
583591
if: success() && !env.SKIP_JOB

Cargo.lock

+3-31
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ dependencies = [
564564
"tester",
565565
"tokio",
566566
"toml 0.7.5",
567-
"ui_test 0.20.0",
567+
"ui_test",
568568
"walkdir",
569569
]
570570

@@ -614,6 +614,7 @@ dependencies = [
614614
"if_chain",
615615
"itertools",
616616
"rustc-semver",
617+
"serde",
617618
]
618619

619620
[[package]]
@@ -2511,7 +2512,7 @@ dependencies = [
25112512
"rustc_version",
25122513
"serde",
25132514
"smallvec",
2514-
"ui_test 0.21.2",
2515+
"ui_test",
25152516
]
25162517

25172518
[[package]]
@@ -3696,7 +3697,6 @@ version = "0.0.0"
36963697
dependencies = [
36973698
"arrayvec",
36983699
"bitflags 1.3.2",
3699-
"cfg-if",
37003700
"elsa",
37013701
"ena",
37023702
"indexmap 2.0.0",
@@ -4528,7 +4528,6 @@ dependencies = [
45284528
name = "rustc_span"
45294529
version = "0.0.0"
45304530
dependencies = [
4531-
"cfg-if",
45324531
"indexmap 2.0.0",
45334532
"md-5",
45344533
"rustc_arena",
@@ -5740,33 +5739,6 @@ version = "0.1.5"
57405739
source = "registry+https://github.com/rust-lang/crates.io-index"
57415740
checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
57425741

5743-
[[package]]
5744-
name = "ui_test"
5745-
version = "0.20.0"
5746-
source = "registry+https://github.com/rust-lang/crates.io-index"
5747-
checksum = "bfd8fb9b15c8332cf51bfc2dc4830063b2446a9c9d732421b56f2478024a3971"
5748-
dependencies = [
5749-
"annotate-snippets",
5750-
"anyhow",
5751-
"bstr",
5752-
"cargo-platform",
5753-
"cargo_metadata 0.15.4",
5754-
"color-eyre",
5755-
"colored",
5756-
"comma",
5757-
"crossbeam-channel",
5758-
"indicatif",
5759-
"lazy_static",
5760-
"levenshtein",
5761-
"prettydiff",
5762-
"regex",
5763-
"rustc_version",
5764-
"rustfix",
5765-
"serde",
5766-
"serde_json",
5767-
"tempfile",
5768-
]
5769-
57705742
[[package]]
57715743
name = "ui_test"
57725744
version = "0.21.2"

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ standard library, and documentation.
1111
If you wish to _contribute_ to the compiler, you should read
1212
[CONTRIBUTING.md](CONTRIBUTING.md) instead.
1313

14+
<details>
15+
<summary>Table of content</summary>
16+
17+
- [Quick Start](#quick-start)
18+
- [Installing from Source](#installing-from-source)
19+
- [Building Documentation](#building-documentation)
20+
- [Notes](#notes)
21+
- [Getting Help](#getting-help)
22+
- [Contributing](#contributing)
23+
- [License](#license)
24+
- [Trademark](#trademark)
25+
26+
</details>
27+
1428
## Quick Start
1529

1630
Read ["Installation"] from [The Book].

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+22
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
22632263
current: usize,
22642264
found: usize,
22652265
prop_expr: Option<&'tcx hir::Expr<'tcx>>,
2266+
call: Option<&'tcx hir::Expr<'tcx>>,
22662267
}
22672268

22682269
impl<'tcx> Visitor<'tcx> for NestedStatementVisitor<'tcx> {
@@ -2272,6 +2273,11 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
22722273
self.current -= 1;
22732274
}
22742275
fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) {
2276+
if let hir::ExprKind::MethodCall(_, rcvr, _, _) = expr.kind {
2277+
if self.span == rcvr.span.source_callsite() {
2278+
self.call = Some(expr);
2279+
}
2280+
}
22752281
if self.span == expr.span.source_callsite() {
22762282
self.found = self.current;
22772283
if self.prop_expr.is_none() {
@@ -2295,6 +2301,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
22952301
current: 0,
22962302
found: 0,
22972303
prop_expr: None,
2304+
call: None,
22982305
};
22992306
visitor.visit_stmt(stmt);
23002307

@@ -2316,6 +2323,21 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
23162323
&& let Some(p) = sm.span_to_margin(stmt.span)
23172324
&& let Ok(s) = sm.span_to_snippet(proper_span)
23182325
{
2326+
if let Some(call) = visitor.call
2327+
&& let hir::ExprKind::MethodCall(path, _, [], _) = call.kind
2328+
&& path.ident.name == sym::iter
2329+
&& let Some(ty) = expr_ty
2330+
{
2331+
err.span_suggestion_verbose(
2332+
path.ident.span,
2333+
format!(
2334+
"consider consuming the `{ty}` when turning it into an \
2335+
`Iterator`",
2336+
),
2337+
"into_iter".to_string(),
2338+
Applicability::MaybeIncorrect,
2339+
);
2340+
}
23192341
if !is_format_arguments_item {
23202342
let addition = format!("let binding = {};\n{}", s, " ".repeat(p));
23212343
err.multipart_suggestion_verbose(

compiler/rustc_codegen_cranelift/.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ task:
33
freebsd_instance:
44
image: freebsd-13-2-release-amd64
55
setup_rust_script:
6-
- pkg install -y git bash
6+
- pkg install -y git bash binutils
77
- curl https://sh.rustup.rs -sSf --output rustup.sh
88
- sh rustup.sh --default-toolchain none -y --profile=minimal
99
target_cache:

compiler/rustc_codegen_cranelift/.github/workflows/main.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ jobs:
5050
- os: ubuntu-latest
5151
env:
5252
TARGET_TRIPLE: aarch64-unknown-linux-gnu
53-
# s390x requires QEMU 6.1 or greater, we could build it from source, but ubuntu 22.04 comes with 6.2 by default
5453
- os: ubuntu-latest
5554
env:
5655
TARGET_TRIPLE: s390x-unknown-linux-gnu
56+
- os: ubuntu-latest
57+
env:
58+
TARGET_TRIPLE: riscv64gc-unknown-linux-gnu
5759
- os: windows-latest
5860
env:
5961
TARGET_TRIPLE: x86_64-pc-windows-msvc
@@ -92,6 +94,12 @@ jobs:
9294
sudo apt-get update
9395
sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
9496
97+
- name: Install riscv64gc toolchain and qemu
98+
if: matrix.env.TARGET_TRIPLE == 'riscv64gc-unknown-linux-gnu'
99+
run: |
100+
sudo apt-get update
101+
sudo apt-get install -y gcc-riscv64-linux-gnu qemu-user
102+
95103
- name: Prepare dependencies
96104
run: ./y.sh prepare
97105

compiler/rustc_codegen_cranelift/Cargo.lock

+26-26
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
4545

4646
[[package]]
4747
name = "cranelift-bforest"
48-
version = "0.100.0"
48+
version = "0.101.0"
4949
source = "registry+https://github.com/rust-lang/crates.io-index"
50-
checksum = "03b9d1a9e776c27ad55d7792a380785d1fe8c2d7b099eed8dbd8f4af2b598192"
50+
checksum = "8e5e1df0da8488dd03b34afc134ba84b754d61862cc465932a9e5d07952f661e"
5151
dependencies = [
5252
"cranelift-entity",
5353
]
5454

5555
[[package]]
5656
name = "cranelift-codegen"
57-
version = "0.100.0"
57+
version = "0.101.0"
5858
source = "registry+https://github.com/rust-lang/crates.io-index"
59-
checksum = "5528483314c2dd5da438576cd8a9d0b3cedad66fb8a4727f90cd319a81950038"
59+
checksum = "77a17ca4e699a0aaf49a0c88f6311a864f321048aa63f6b787cab20eb5f93f10"
6060
dependencies = [
6161
"bumpalo",
6262
"cranelift-bforest",
@@ -75,39 +75,39 @@ dependencies = [
7575

7676
[[package]]
7777
name = "cranelift-codegen-meta"
78-
version = "0.100.0"
78+
version = "0.101.0"
7979
source = "registry+https://github.com/rust-lang/crates.io-index"
80-
checksum = "0f46a8318163f7682e35b8730ba93c1b586a2da8ce12a0ed545efc1218550f70"
80+
checksum = "022f2793cdade1d37a1f755ac42938a3f832f533eac6cafc8b26b209544c3c06"
8181
dependencies = [
8282
"cranelift-codegen-shared",
8383
]
8484

8585
[[package]]
8686
name = "cranelift-codegen-shared"
87-
version = "0.100.0"
87+
version = "0.101.0"
8888
source = "registry+https://github.com/rust-lang/crates.io-index"
89-
checksum = "37d1239cfd50eecfaed468d46943f8650e32969591868ad50111613704da6c70"
89+
checksum = "a4d72dbb83c2ad788dec4ad0843070973cb48c35a3ca19b1e7437ac40834fd9c"
9090

9191
[[package]]
9292
name = "cranelift-control"
93-
version = "0.100.0"
93+
version = "0.101.0"
9494
source = "registry+https://github.com/rust-lang/crates.io-index"
95-
checksum = "bcc530560c8f16cc1d4dd7ea000c56f519c60d1a914977abe849ce555c35a61d"
95+
checksum = "ae07cf26dcc90d546826d747ac63b6c40c916f34b03e92a6ae0422c28d771b8a"
9696
dependencies = [
9797
"arbitrary",
9898
]
9999

100100
[[package]]
101101
name = "cranelift-entity"
102-
version = "0.100.0"
102+
version = "0.101.0"
103103
source = "registry+https://github.com/rust-lang/crates.io-index"
104-
checksum = "f333fa641a9ad2bff0b107767dcb972c18c2bfab7969805a1d7e42449ccb0408"
104+
checksum = "c2fe6b7e49820893691aea497f36257e9d6f52061d8c4758d61d802d5f101a3d"
105105

106106
[[package]]
107107
name = "cranelift-frontend"
108-
version = "0.100.0"
108+
version = "0.101.0"
109109
source = "registry+https://github.com/rust-lang/crates.io-index"
110-
checksum = "06abf6563015a80f03f8bc4df307d0a81363f4eb73108df3a34f6e66fb6d5307"
110+
checksum = "44f497576ca3674581581601b6a55ccc1b43447217648c880e5bce70db3cf659"
111111
dependencies = [
112112
"cranelift-codegen",
113113
"log",
@@ -117,15 +117,15 @@ dependencies = [
117117

118118
[[package]]
119119
name = "cranelift-isle"
120-
version = "0.100.0"
120+
version = "0.101.0"
121121
source = "registry+https://github.com/rust-lang/crates.io-index"
122-
checksum = "0eb29d0edc8a5c029ed0f7ca77501f272738e3c410020b4a00f42ffe8ad2a8aa"
122+
checksum = "b96aa02eac00fffee13b0cd37d17874ccdb3d5458983041accd825ef78ce6454"
123123

124124
[[package]]
125125
name = "cranelift-jit"
126-
version = "0.100.0"
126+
version = "0.101.0"
127127
source = "registry+https://github.com/rust-lang/crates.io-index"
128-
checksum = "d16e8c5e212b1e63658aada17553497e7a259acab61f044d1f185527efa609fb"
128+
checksum = "b1d6e0e308c873eefc185745a6b21daec2a10f7554c9fb67e334c2d7d756d979"
129129
dependencies = [
130130
"anyhow",
131131
"cranelift-codegen",
@@ -143,9 +143,9 @@ dependencies = [
143143

144144
[[package]]
145145
name = "cranelift-module"
146-
version = "0.100.0"
146+
version = "0.101.0"
147147
source = "registry+https://github.com/rust-lang/crates.io-index"
148-
checksum = "d3b5fd273e1a959e920c7a9d790b1646d31acc8782bb549bad5ab85dd2fc9aa7"
148+
checksum = "c1aa8ebb06eced4e478c3f94f1d65d4e7c93493f4640057912b27a3e34b84841"
149149
dependencies = [
150150
"anyhow",
151151
"cranelift-codegen",
@@ -154,9 +154,9 @@ dependencies = [
154154

155155
[[package]]
156156
name = "cranelift-native"
157-
version = "0.100.0"
157+
version = "0.101.0"
158158
source = "registry+https://github.com/rust-lang/crates.io-index"
159-
checksum = "006056a7fa920870bad06bf8e1b3033d70cbb7ee625b035efa9d90882a931868"
159+
checksum = "2870170ca44054b202c737626607b87be6e35655084bd94a6ff807a5812ba7df"
160160
dependencies = [
161161
"cranelift-codegen",
162162
"libc",
@@ -165,9 +165,9 @@ dependencies = [
165165

166166
[[package]]
167167
name = "cranelift-object"
168-
version = "0.100.0"
168+
version = "0.101.0"
169169
source = "registry+https://github.com/rust-lang/crates.io-index"
170-
checksum = "9c8be1b0e7720f30fec31be0c0b0b23caef2a73fa751190c6a251c1362e8f8c9"
170+
checksum = "20647761742d17dabac8205da958910ede78599550e06418a16711a3ee2fc897"
171171
dependencies = [
172172
"anyhow",
173173
"cranelift-codegen",
@@ -374,9 +374,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
374374

375375
[[package]]
376376
name = "wasmtime-jit-icache-coherence"
377-
version = "13.0.0"
377+
version = "14.0.0"
378378
source = "registry+https://github.com/rust-lang/crates.io-index"
379-
checksum = "c6ff5f3707a5e3797deeeeac6ac26b2e1dd32dbc06693c0ab52e8ac4d18ec706"
379+
checksum = "a3a5dda53ad6993f9b0a2d65fb49e0348a7232a27a8794064122870d6ee19eb2"
380380
dependencies = [
381381
"cfg-if",
382382
"libc",

compiler/rustc_codegen_cranelift/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.100", features = ["unwind", "all-arch"] }
12-
cranelift-frontend = { version = "0.100" }
13-
cranelift-module = { version = "0.100" }
14-
cranelift-native = { version = "0.100" }
15-
cranelift-jit = { version = "0.100", optional = true }
16-
cranelift-object = { version = "0.100" }
11+
cranelift-codegen = { version = "0.101", features = ["unwind", "all-arch"] }
12+
cranelift-frontend = { version = "0.101" }
13+
cranelift-module = { version = "0.101" }
14+
cranelift-native = { version = "0.101" }
15+
cranelift-jit = { version = "0.101", optional = true }
16+
cranelift-object = { version = "0.101" }
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.28", default-features = false, features = ["write"]}
1919
object = { version = "0.32", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

0 commit comments

Comments
 (0)