Skip to content

Commit 8564d67

Browse files
authored
Merge pull request #2647 from rust-lang/rustc-pull
Rustc pull update
2 parents 2bf2f44 + 6367ba4 commit 8564d67

File tree

1,206 files changed

+18929
-11225
lines changed

Some content is hidden

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

1,206 files changed

+18929
-11225
lines changed

.github/workflows/post-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Post merge analysis
66
on:
77
push:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
analysis:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ no_llvm_build
4848
/llvm/
4949
/mingw-build/
5050
/build
51-
/build-rust-analyzer/
51+
/build-rust-analyzer
5252
/dist/
5353
/unicode-downloads
5454
/target

Cargo.lock

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ dependencies = [
8080

8181
[[package]]
8282
name = "annotate-snippets"
83-
version = "0.12.8"
83+
version = "0.12.9"
8484
source = "registry+https://github.com/rust-lang/crates.io-index"
85-
checksum = "025c7edcdffa4ccc5c0905f472a0ae3759378cfbef88ef518a3575e19ae3aebd"
85+
checksum = "a44baf24dd94e781f74dfe67ffee75a09a57971ddf0f615a178b4f6d404b48ff"
8686
dependencies = [
8787
"anstyle",
8888
"unicode-width 0.2.2",
@@ -1288,7 +1288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
12881288
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
12891289
dependencies = [
12901290
"libc",
1291-
"windows-sys 0.52.0",
1291+
"windows-sys 0.60.2",
12921292
]
12931293

12941294
[[package]]
@@ -2154,7 +2154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
21542154
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
21552155
dependencies = [
21562156
"cfg-if",
2157-
"windows-targets 0.52.6",
2157+
"windows-targets 0.53.3",
21582158
]
21592159

21602160
[[package]]
@@ -3766,7 +3766,7 @@ dependencies = [
37663766
name = "rustc_errors"
37673767
version = "0.0.0"
37683768
dependencies = [
3769-
"annotate-snippets 0.12.8",
3769+
"annotate-snippets 0.12.9",
37703770
"anstream",
37713771
"anstyle",
37723772
"derive_setters",
@@ -4905,7 +4905,7 @@ dependencies = [
49054905
"errno",
49064906
"libc",
49074907
"linux-raw-sys",
4908-
"windows-sys 0.52.0",
4908+
"windows-sys 0.61.2",
49094909
]
49104910

49114911
[[package]]
@@ -5273,9 +5273,9 @@ dependencies = [
52735273

52745274
[[package]]
52755275
name = "stringdex"
5276-
version = "0.0.2"
5276+
version = "0.0.3"
52775277
source = "registry+https://github.com/rust-lang/crates.io-index"
5278-
checksum = "18b3bd4f10d15ef859c40291769f0d85209de6b0f1c30713ff9cdf45ac43ea36"
5278+
checksum = "556a6126952cb2f5150057c98a77cc6c771027dea2825bf7fa03d3d638b0a4f8"
52795279
dependencies = [
52805280
"stacker",
52815281
]
@@ -6070,9 +6070,9 @@ dependencies = [
60706070

60716071
[[package]]
60726072
name = "wasi-preview1-component-adapter-provider"
6073-
version = "37.0.2"
6073+
version = "38.0.4"
60746074
source = "registry+https://github.com/rust-lang/crates.io-index"
6075-
checksum = "8d0fcd636ad2b29a7c0490799a23ad61d1c8dedfafdb970447fddd0549502b60"
6075+
checksum = "7ec3ef3783e18f2457796ed91b1e6c2adc46f2905f740d1527ab3053fe8e5682"
60766076

60776077
[[package]]
60786078
name = "wasm-bindgen"
@@ -6134,17 +6134,17 @@ dependencies = [
61346134

61356135
[[package]]
61366136
name = "wasm-component-ld"
6137-
version = "0.5.18"
6137+
version = "0.5.19"
61386138
source = "registry+https://github.com/rust-lang/crates.io-index"
6139-
checksum = "11f565dfcfd9aabb10d865b608a92ce1f93051aeb56f4c89550ed9cd97d8ce0e"
6139+
checksum = "4bfc50dd0b883d841bc1dba5ff7020ca52fa7b2c3bb1266d8bf6a09dd032e115"
61406140
dependencies = [
61416141
"anyhow",
61426142
"clap",
61436143
"lexopt",
61446144
"libc",
61456145
"tempfile",
61466146
"wasi-preview1-component-adapter-provider",
6147-
"wasmparser 0.240.0",
6147+
"wasmparser 0.241.2",
61486148
"wat",
61496149
"windows-sys 0.61.2",
61506150
"winsplit",
@@ -6171,24 +6171,24 @@ dependencies = [
61716171

61726172
[[package]]
61736173
name = "wasm-encoder"
6174-
version = "0.240.0"
6174+
version = "0.241.2"
61756175
source = "registry+https://github.com/rust-lang/crates.io-index"
6176-
checksum = "06d642d8c5ecc083aafe9ceb32809276a304547a3a6eeecceb5d8152598bc71f"
6176+
checksum = "e01164c9dda68301e34fdae536c23ed6fe90ce6d97213ccc171eebbd3d02d6b8"
61776177
dependencies = [
61786178
"leb128fmt",
6179-
"wasmparser 0.240.0",
6179+
"wasmparser 0.241.2",
61806180
]
61816181

61826182
[[package]]
61836183
name = "wasm-metadata"
6184-
version = "0.240.0"
6184+
version = "0.241.2"
61856185
source = "registry+https://github.com/rust-lang/crates.io-index"
6186-
checksum = "ee093e1e1ccffa005b9b778f7a10ccfd58e25a20eccad294a1a93168d076befb"
6186+
checksum = "876fe286f2fa416386deedebe8407e6f19e0b5aeaef3d03161e77a15fa80f167"
61876187
dependencies = [
61886188
"anyhow",
61896189
"indexmap",
6190-
"wasm-encoder 0.240.0",
6191-
"wasmparser 0.240.0",
6190+
"wasm-encoder 0.241.2",
6191+
"wasmparser 0.241.2",
61926192
]
61936193

61946194
[[package]]
@@ -6213,9 +6213,9 @@ dependencies = [
62136213

62146214
[[package]]
62156215
name = "wasmparser"
6216-
version = "0.240.0"
6216+
version = "0.241.2"
62176217
source = "registry+https://github.com/rust-lang/crates.io-index"
6218-
checksum = "b722dcf61e0ea47440b53ff83ccb5df8efec57a69d150e4f24882e4eba7e24a4"
6218+
checksum = "46d90019b1afd4b808c263e428de644f3003691f243387d30d673211ee0cb8e8"
62196219
dependencies = [
62206220
"bitflags",
62216221
"hashbrown",
@@ -6226,22 +6226,22 @@ dependencies = [
62266226

62276227
[[package]]
62286228
name = "wast"
6229-
version = "240.0.0"
6229+
version = "241.0.2"
62306230
source = "registry+https://github.com/rust-lang/crates.io-index"
6231-
checksum = "b0efe1c93db4ac562b9733e3dca19ed7fc878dba29aef22245acf84f13da4a19"
6231+
checksum = "63f66e07e2ddf531fef6344dbf94d112df7c2f23ed6ffb10962e711500b8d816"
62326232
dependencies = [
62336233
"bumpalo",
62346234
"leb128fmt",
62356235
"memchr",
62366236
"unicode-width 0.2.2",
6237-
"wasm-encoder 0.240.0",
6237+
"wasm-encoder 0.241.2",
62386238
]
62396239

62406240
[[package]]
62416241
name = "wat"
6242-
version = "1.240.0"
6242+
version = "1.241.2"
62436243
source = "registry+https://github.com/rust-lang/crates.io-index"
6244-
checksum = "4ec9b6eab7ecd4d639d78515e9ea491c9bacf494aa5eda10823bd35992cf8c1e"
6244+
checksum = "45f923705c40830af909c5dec2352ec2821202e4a66008194585e1917458a26d"
62456245
dependencies = [
62466246
"wast",
62476247
]
@@ -6679,9 +6679,9 @@ dependencies = [
66796679

66806680
[[package]]
66816681
name = "wit-component"
6682-
version = "0.240.0"
6682+
version = "0.241.2"
66836683
source = "registry+https://github.com/rust-lang/crates.io-index"
6684-
checksum = "7dc5474b078addc5fe8a72736de8da3acfb3ff324c2491133f8b59594afa1a20"
6684+
checksum = "1fd0c57df25e7ee612d946d3b7646c1ddb2310f8280aa2c17e543b66e0812241"
66856685
dependencies = [
66866686
"anyhow",
66876687
"bitflags",
@@ -6690,17 +6690,17 @@ dependencies = [
66906690
"serde",
66916691
"serde_derive",
66926692
"serde_json",
6693-
"wasm-encoder 0.240.0",
6693+
"wasm-encoder 0.241.2",
66946694
"wasm-metadata",
6695-
"wasmparser 0.240.0",
6695+
"wasmparser 0.241.2",
66966696
"wit-parser",
66976697
]
66986698

66996699
[[package]]
67006700
name = "wit-parser"
6701-
version = "0.240.0"
6701+
version = "0.241.2"
67026702
source = "registry+https://github.com/rust-lang/crates.io-index"
6703-
checksum = "9875ea3fa272f57cc1fc50f225a7b94021a7878c484b33792bccad0d93223439"
6703+
checksum = "09ef1c6ad67f35c831abd4039c02894de97034100899614d1c44e2268ad01c91"
67046704
dependencies = [
67056705
"anyhow",
67066706
"id-arena",
@@ -6711,7 +6711,7 @@ dependencies = [
67116711
"serde_derive",
67126712
"serde_json",
67136713
"unicode-xid",
6714-
"wasmparser 0.240.0",
6714+
"wasmparser 0.241.2",
67156715
]
67166716

67176717
[[package]]

bootstrap.example.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@
5959
# toolchain or changing LLVM locally, you probably want to leave this enabled.
6060
#
6161
# Set this to `true` to download if CI llvm available otherwise it builds
62-
# from `src/llvm-project`.
62+
# from `src/llvm-project`. If you set it to `true`, it's safe and time-saving to run
63+
# `git submodule deinit src/llvm-project` to avoid git updating the llvm-project submodule
64+
# when building compiler locally.
65+
#
6366
#
6467
# Set this to `"if-unchanged"` to download only if the llvm-project has not
6568
# been modified. You can also use this if you are unsure whether you're on a
@@ -320,7 +323,7 @@
320323
#build.npm = "npm"
321324

322325
# Python interpreter to use for various tasks throughout the build, notably
323-
# rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
326+
# rustdoc tests, and some dist bits and pieces.
324327
#
325328
# Defaults to the Python interpreter used to execute x.py.
326329
#build.python = "python"

compiler/rustc_abi/src/extern_abi.rs

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,56 @@ impl ExternAbi {
269269
| Self::Aapcs { .. }
270270
| Self::Win64 { .. }
271271
| Self::SysV64 { .. }
272-
| Self::EfiApi => CVariadicStatus::Stable,
273-
Self::System { .. } => {
274-
CVariadicStatus::Unstable { feature: rustc_span::sym::extern_system_varargs }
275-
}
272+
| Self::EfiApi
273+
| Self::System { .. } => CVariadicStatus::Stable,
276274
_ => CVariadicStatus::NotSupported,
277275
}
278276
}
277+
278+
/// Returns whether the ABI supports guaranteed tail calls.
279+
#[cfg(feature = "nightly")]
280+
pub fn supports_guaranteed_tail_call(self) -> bool {
281+
match self {
282+
Self::CmseNonSecureCall | Self::CmseNonSecureEntry => {
283+
// See https://godbolt.org/z/9jhdeqErv. The CMSE calling conventions clear registers
284+
// before returning, and hence cannot guarantee a tail call.
285+
false
286+
}
287+
Self::AvrInterrupt
288+
| Self::AvrNonBlockingInterrupt
289+
| Self::Msp430Interrupt
290+
| Self::RiscvInterruptM
291+
| Self::RiscvInterruptS
292+
| Self::X86Interrupt => {
293+
// See https://godbolt.org/z/Edfjnxxcq. Interrupts cannot be called directly.
294+
false
295+
}
296+
Self::GpuKernel | Self::PtxKernel => {
297+
// See https://godbolt.org/z/jq5TE5jK1.
298+
false
299+
}
300+
Self::Custom => {
301+
// This ABI does not support calls at all (except via assembly).
302+
false
303+
}
304+
Self::C { .. }
305+
| Self::System { .. }
306+
| Self::Rust
307+
| Self::RustCall
308+
| Self::RustCold
309+
| Self::RustInvalid
310+
| Self::Unadjusted
311+
| Self::EfiApi
312+
| Self::Aapcs { .. }
313+
| Self::Cdecl { .. }
314+
| Self::Stdcall { .. }
315+
| Self::Fastcall { .. }
316+
| Self::Thiscall { .. }
317+
| Self::Vectorcall { .. }
318+
| Self::SysV64 { .. }
319+
| Self::Win64 { .. } => true,
320+
}
321+
}
279322
}
280323

281324
pub fn all_names() -> Vec<&'static str> {

compiler/rustc_ast/src/ast.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,10 @@ impl Pat {
648648
PatKind::Path(qself, path) => TyKind::Path(qself.clone(), path.clone()),
649649
PatKind::MacCall(mac) => TyKind::MacCall(mac.clone()),
650650
// `&mut? P` can be reinterpreted as `&mut? T` where `T` is `P` reparsed as a type.
651-
PatKind::Ref(pat, mutbl) => {
652-
pat.to_ty().map(|ty| TyKind::Ref(None, MutTy { ty, mutbl: *mutbl }))?
653-
}
651+
PatKind::Ref(pat, pinned, mutbl) => pat.to_ty().map(|ty| match pinned {
652+
Pinnedness::Not => TyKind::Ref(None, MutTy { ty, mutbl: *mutbl }),
653+
Pinnedness::Pinned => TyKind::PinnedRef(None, MutTy { ty, mutbl: *mutbl }),
654+
})?,
654655
// A slice/array pattern `[P]` can be reparsed as `[T]`, an unsized array,
655656
// when `P` can be reparsed as a type `T`.
656657
PatKind::Slice(pats) if let [pat] = pats.as_slice() => {
@@ -696,7 +697,7 @@ impl Pat {
696697
// Trivial wrappers over inner patterns.
697698
PatKind::Box(s)
698699
| PatKind::Deref(s)
699-
| PatKind::Ref(s, _)
700+
| PatKind::Ref(s, _, _)
700701
| PatKind::Paren(s)
701702
| PatKind::Guard(s, _) => s.walk(it),
702703

@@ -717,7 +718,7 @@ impl Pat {
717718
/// Strip off all reference patterns (`&`, `&mut`) and return the inner pattern.
718719
pub fn peel_refs(&self) -> &Pat {
719720
let mut current = self;
720-
while let PatKind::Ref(inner, _) = &current.kind {
721+
while let PatKind::Ref(inner, _, _) = &current.kind {
721722
current = inner;
722723
}
723724
current
@@ -765,7 +766,9 @@ impl Pat {
765766
PatKind::Missing => unreachable!(),
766767
PatKind::Wild => Some("_".to_string()),
767768
PatKind::Ident(BindingMode::NONE, ident, None) => Some(format!("{ident}")),
768-
PatKind::Ref(pat, mutbl) => pat.descr().map(|d| format!("&{}{d}", mutbl.prefix_str())),
769+
PatKind::Ref(pat, pinned, mutbl) => {
770+
pat.descr().map(|d| format!("&{}{d}", pinned.prefix_str(*mutbl)))
771+
}
769772
_ => None,
770773
}
771774
}
@@ -913,7 +916,7 @@ pub enum PatKind {
913916
Deref(Box<Pat>),
914917

915918
/// A reference pattern (e.g., `&mut (a, b)`).
916-
Ref(Box<Pat>, Mutability),
919+
Ref(Box<Pat>, Pinnedness, Mutability),
917920

918921
/// A literal, const block or path.
919922
Expr(Box<Expr>),

0 commit comments

Comments
 (0)