Skip to content

Commit 2528825

Browse files
authored
Merge branch 'master' into stablize_diagnostic_namespace
2 parents 3ff4359 + 039d887 commit 2528825

File tree

1,654 files changed

+31071
-14528
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,654 files changed

+31071
-14528
lines changed

.mailmap

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Clement Miao <[email protected]>
129129
Clément Renault <[email protected]>
130130
Cliff Dyer <[email protected]>
131131
Clinton Ryan <[email protected]>
132-
Corey Richardson <[email protected]> Elaine "See More" Nemo <[email protected]>
132+
133133
Crazycolorz5 <[email protected]>
134134
135135
Cyryl Płotnicki <[email protected]>

Cargo.lock

+85-29
Original file line numberDiff line numberDiff line change
@@ -878,12 +878,12 @@ dependencies = [
878878

879879
[[package]]
880880
name = "ctrlc"
881-
version = "3.4.0"
881+
version = "3.4.2"
882882
source = "registry+https://github.com/rust-lang/crates.io-index"
883-
checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e"
883+
checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b"
884884
dependencies = [
885885
"nix",
886-
"windows-sys 0.48.0",
886+
"windows-sys 0.52.0",
887887
]
888888

889889
[[package]]
@@ -2187,16 +2187,6 @@ dependencies = [
21872187
"cc",
21882188
]
21892189

2190-
[[package]]
2191-
name = "libloading"
2192-
version = "0.7.4"
2193-
source = "registry+https://github.com/rust-lang/crates.io-index"
2194-
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
2195-
dependencies = [
2196-
"cfg-if",
2197-
"winapi",
2198-
]
2199-
22002190
[[package]]
22012191
name = "libloading"
22022192
version = "0.8.1"
@@ -2366,9 +2356,9 @@ dependencies = [
23662356

23672357
[[package]]
23682358
name = "measureme"
2369-
version = "10.1.2"
2359+
version = "11.0.1"
23702360
source = "registry+https://github.com/rust-lang/crates.io-index"
2371-
checksum = "45e381dcdad44c3c435f8052b08c5c4a1449c48ab56f312345eae12d7a693dbe"
2361+
checksum = "dfa4a40f09af7aa6faef38285402a78847d0d72bf8827006cd2a332e1e6e4a8d"
23722362
dependencies = [
23732363
"log",
23742364
"memmap2",
@@ -2479,7 +2469,7 @@ dependencies = [
24792469
"lazy_static",
24802470
"libc",
24812471
"libffi",
2482-
"libloading 0.8.1",
2472+
"libloading",
24832473
"log",
24842474
"measureme",
24852475
"rand",
@@ -2522,14 +2512,13 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
25222512

25232513
[[package]]
25242514
name = "nix"
2525-
version = "0.26.2"
2515+
version = "0.27.1"
25262516
source = "registry+https://github.com/rust-lang/crates.io-index"
2527-
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
2517+
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
25282518
dependencies = [
2529-
"bitflags 1.3.2",
2519+
"bitflags 2.4.1",
25302520
"cfg-if",
25312521
"libc",
2532-
"static_assertions",
25332522
]
25342523

25352524
[[package]]
@@ -2651,11 +2640,11 @@ dependencies = [
26512640

26522641
[[package]]
26532642
name = "openssl"
2654-
version = "0.10.55"
2643+
version = "0.10.63"
26552644
source = "registry+https://github.com/rust-lang/crates.io-index"
2656-
checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d"
2645+
checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8"
26572646
dependencies = [
2658-
"bitflags 1.3.2",
2647+
"bitflags 2.4.1",
26592648
"cfg-if",
26602649
"foreign-types",
26612650
"libc",
@@ -2683,9 +2672,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
26832672

26842673
[[package]]
26852674
name = "openssl-sys"
2686-
version = "0.9.90"
2675+
version = "0.9.99"
26872676
source = "registry+https://github.com/rust-lang/crates.io-index"
2688-
checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6"
2677+
checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae"
26892678
dependencies = [
26902679
"cc",
26912680
"libc",
@@ -4005,7 +3994,7 @@ dependencies = [
40053994
name = "rustc_interface"
40063995
version = "0.0.0"
40073996
dependencies = [
4008-
"libloading 0.7.4",
3997+
"libloading",
40093998
"rustc-rayon",
40103999
"rustc-rayon-core",
40114000
"rustc_ast",
@@ -4135,7 +4124,7 @@ name = "rustc_metadata"
41354124
version = "0.0.0"
41364125
dependencies = [
41374126
"bitflags 2.4.1",
4138-
"libloading 0.7.4",
4127+
"libloading",
41394128
"odht",
41404129
"rustc_ast",
41414130
"rustc_attr",
@@ -4355,6 +4344,7 @@ name = "rustc_pattern_analysis"
43554344
version = "0.0.0"
43564345
dependencies = [
43574346
"derivative",
4347+
"rustc-hash",
43584348
"rustc_apfloat",
43594349
"rustc_arena",
43604350
"rustc_data_structures",
@@ -5353,9 +5343,9 @@ dependencies = [
53535343

53545344
[[package]]
53555345
name = "thin-vec"
5356-
version = "0.2.12"
5346+
version = "0.2.13"
53575347
source = "registry+https://github.com/rust-lang/crates.io-index"
5358-
checksum = "aac81b6fd6beb5884b0cf3321b8117e6e5d47ecb6fc89f414cfdcca8b2fe2dd8"
5348+
checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b"
53595349

53605350
[[package]]
53615351
name = "thiserror"
@@ -6152,6 +6142,15 @@ dependencies = [
61526142
"windows-targets 0.48.1",
61536143
]
61546144

6145+
[[package]]
6146+
name = "windows-sys"
6147+
version = "0.52.0"
6148+
source = "registry+https://github.com/rust-lang/crates.io-index"
6149+
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
6150+
dependencies = [
6151+
"windows-targets 0.52.0",
6152+
]
6153+
61556154
[[package]]
61566155
name = "windows-targets"
61576156
version = "0.42.2"
@@ -6182,6 +6181,21 @@ dependencies = [
61826181
"windows_x86_64_msvc 0.48.0",
61836182
]
61846183

6184+
[[package]]
6185+
name = "windows-targets"
6186+
version = "0.52.0"
6187+
source = "registry+https://github.com/rust-lang/crates.io-index"
6188+
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
6189+
dependencies = [
6190+
"windows_aarch64_gnullvm 0.52.0",
6191+
"windows_aarch64_msvc 0.52.0",
6192+
"windows_i686_gnu 0.52.0",
6193+
"windows_i686_msvc 0.52.0",
6194+
"windows_x86_64_gnu 0.52.0",
6195+
"windows_x86_64_gnullvm 0.52.0",
6196+
"windows_x86_64_msvc 0.52.0",
6197+
]
6198+
61856199
[[package]]
61866200
name = "windows_aarch64_gnullvm"
61876201
version = "0.42.2"
@@ -6194,6 +6208,12 @@ version = "0.48.0"
61946208
source = "registry+https://github.com/rust-lang/crates.io-index"
61956209
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
61966210

6211+
[[package]]
6212+
name = "windows_aarch64_gnullvm"
6213+
version = "0.52.0"
6214+
source = "registry+https://github.com/rust-lang/crates.io-index"
6215+
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
6216+
61976217
[[package]]
61986218
name = "windows_aarch64_msvc"
61996219
version = "0.42.2"
@@ -6206,6 +6226,12 @@ version = "0.48.0"
62066226
source = "registry+https://github.com/rust-lang/crates.io-index"
62076227
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
62086228

6229+
[[package]]
6230+
name = "windows_aarch64_msvc"
6231+
version = "0.52.0"
6232+
source = "registry+https://github.com/rust-lang/crates.io-index"
6233+
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
6234+
62096235
[[package]]
62106236
name = "windows_i686_gnu"
62116237
version = "0.42.2"
@@ -6218,6 +6244,12 @@ version = "0.48.0"
62186244
source = "registry+https://github.com/rust-lang/crates.io-index"
62196245
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
62206246

6247+
[[package]]
6248+
name = "windows_i686_gnu"
6249+
version = "0.52.0"
6250+
source = "registry+https://github.com/rust-lang/crates.io-index"
6251+
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
6252+
62216253
[[package]]
62226254
name = "windows_i686_msvc"
62236255
version = "0.42.2"
@@ -6230,6 +6262,12 @@ version = "0.48.0"
62306262
source = "registry+https://github.com/rust-lang/crates.io-index"
62316263
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
62326264

6265+
[[package]]
6266+
name = "windows_i686_msvc"
6267+
version = "0.52.0"
6268+
source = "registry+https://github.com/rust-lang/crates.io-index"
6269+
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
6270+
62336271
[[package]]
62346272
name = "windows_x86_64_gnu"
62356273
version = "0.42.2"
@@ -6242,6 +6280,12 @@ version = "0.48.0"
62426280
source = "registry+https://github.com/rust-lang/crates.io-index"
62436281
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
62446282

6283+
[[package]]
6284+
name = "windows_x86_64_gnu"
6285+
version = "0.52.0"
6286+
source = "registry+https://github.com/rust-lang/crates.io-index"
6287+
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
6288+
62456289
[[package]]
62466290
name = "windows_x86_64_gnullvm"
62476291
version = "0.42.2"
@@ -6254,6 +6298,12 @@ version = "0.48.0"
62546298
source = "registry+https://github.com/rust-lang/crates.io-index"
62556299
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
62566300

6301+
[[package]]
6302+
name = "windows_x86_64_gnullvm"
6303+
version = "0.52.0"
6304+
source = "registry+https://github.com/rust-lang/crates.io-index"
6305+
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
6306+
62576307
[[package]]
62586308
name = "windows_x86_64_msvc"
62596309
version = "0.42.2"
@@ -6266,6 +6316,12 @@ version = "0.48.0"
62666316
source = "registry+https://github.com/rust-lang/crates.io-index"
62676317
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
62686318

6319+
[[package]]
6320+
name = "windows_x86_64_msvc"
6321+
version = "0.52.0"
6322+
source = "registry+https://github.com/rust-lang/crates.io-index"
6323+
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
6324+
62696325
[[package]]
62706326
name = "winnow"
62716327
version = "0.4.7"

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ If you wish to _contribute_ to the compiler, you should read
1515
<summary>Table of Contents</summary>
1616

1717
- [Quick Start](#quick-start)
18+
- [Installing from Source](#installing-from-source)
1819
- [Getting Help](#getting-help)
1920
- [Contributing](#contributing)
2021
- [License](#license)
@@ -29,9 +30,10 @@ Read ["Installation"] from [The Book].
2930
["Installation"]: https://doc.rust-lang.org/book/ch01-01-installation.html
3031
[The Book]: https://doc.rust-lang.org/book/index.html
3132

32-
## Installing from source
33+
## Installing from Source
3334

34-
If you really want to install from source (though this is not recommended), see [INSTALL.md](INSTALL.md).
35+
If you really want to install from source (though this is not recommended), see
36+
[INSTALL.md](INSTALL.md).
3537

3638
## Getting Help
3739

compiler/rustc_abi/src/lib.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ bitflags! {
4949
| ReprFlags::IS_LINEAR.bits();
5050
}
5151
}
52-
rustc_data_structures::external_bitflags_debug! { ReprFlags }
52+
53+
// This is the same as `rustc_data_structures::external_bitflags_debug` but without the
54+
// `rustc_data_structures` to make it build on stable.
55+
impl std::fmt::Debug for ReprFlags {
56+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
57+
bitflags::parser::to_writer(self, f)
58+
}
59+
}
5360

5461
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
5562
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]

compiler/rustc_arena/src/lib.rs

+13
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,19 @@ impl DroplessArena {
484484
}
485485
}
486486

487+
/// Used by `Lift` to check whether this slice is allocated
488+
/// in this arena.
489+
#[inline]
490+
pub fn contains_slice<T>(&self, slice: &[T]) -> bool {
491+
for chunk in self.chunks.borrow_mut().iter_mut() {
492+
let ptr = slice.as_ptr().cast::<u8>().cast_mut();
493+
if chunk.start() <= ptr && chunk.end() >= ptr {
494+
return true;
495+
}
496+
}
497+
false
498+
}
499+
487500
/// Allocates a string slice that is copied into the `DroplessArena`, returning a
488501
/// reference to it. Will panic if passed an empty string.
489502
///

compiler/rustc_ast/src/ast.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub use UnsafeSource::*;
2727
use crate::ptr::P;
2828
use crate::token::{self, CommentKind, Delimiter};
2929
use crate::tokenstream::{DelimSpan, LazyAttrTokenStream, TokenStream};
30+
use rustc_data_structures::packed::Pu128;
3031
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
3132
use rustc_data_structures::stack::ensure_sufficient_stack;
3233
use rustc_data_structures::sync::Lrc;
@@ -625,7 +626,8 @@ impl Pat {
625626
| PatKind::Range(..)
626627
| PatKind::Ident(..)
627628
| PatKind::Path(..)
628-
| PatKind::MacCall(_) => {}
629+
| PatKind::MacCall(_)
630+
| PatKind::Err(_) => {}
629631
}
630632
}
631633

@@ -809,6 +811,9 @@ pub enum PatKind {
809811

810812
/// A macro pattern; pre-expansion.
811813
MacCall(P<MacCall>),
814+
815+
/// Placeholder for a pattern that wasn't syntactically well formed in some way.
816+
Err(ErrorGuaranteed),
812817
}
813818

814819
/// Whether the `..` is present in a struct fields pattern.
@@ -1829,7 +1834,7 @@ pub enum LitKind {
18291834
/// A character literal (`'a'`).
18301835
Char(char),
18311836
/// An integer literal (`1`).
1832-
Int(u128, LitIntType),
1837+
Int(Pu128, LitIntType),
18331838
/// A float literal (`1.0`, `1f64` or `1E10f64`). The pre-suffix part is
18341839
/// stored as a symbol rather than `f64` so that `LitKind` can impl `Eq`
18351840
/// and `Hash`.

compiler/rustc_ast/src/mut_visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ pub fn noop_visit_pat<T: MutVisitor>(pat: &mut P<Pat>, vis: &mut T) {
12671267
let Pat { id, kind, span, tokens } = pat.deref_mut();
12681268
vis.visit_id(id);
12691269
match kind {
1270-
PatKind::Wild | PatKind::Rest | PatKind::Never => {}
1270+
PatKind::Wild | PatKind::Rest | PatKind::Never | PatKind::Err(_) => {}
12711271
PatKind::Ident(_binding_mode, ident, sub) => {
12721272
vis.visit_ident(ident);
12731273
visit_opt(sub, |sub| vis.visit_pat(sub));

0 commit comments

Comments
 (0)