Skip to content

Commit 1a3dd7e

Browse files
committed
Auto merge of #3087 - rust-lang:rustup-2023-09-27, r=RalfJung
Automatic sync from rustc
2 parents e86c68a + c8a44b1 commit 1a3dd7e

File tree

461 files changed

+8307
-3501
lines changed

Some content is hidden

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

461 files changed

+8307
-3501
lines changed

Cargo.lock

Lines changed: 60 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,15 @@ dependencies = [
118118

119119
[[package]]
120120
name = "anstream"
121-
version = "0.3.2"
121+
version = "0.5.0"
122122
source = "registry+https://github.com/rust-lang/crates.io-index"
123-
checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
123+
checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c"
124124
dependencies = [
125125
"anstyle",
126126
"anstyle-parse",
127127
"anstyle-query",
128128
"anstyle-wincon",
129129
"colorchoice",
130-
"is-terminal",
131130
"utf8parse",
132131
]
133132

@@ -157,9 +156,9 @@ dependencies = [
157156

158157
[[package]]
159158
name = "anstyle-wincon"
160-
version = "1.0.1"
159+
version = "2.1.0"
161160
source = "registry+https://github.com/rust-lang/crates.io-index"
162-
checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
161+
checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd"
163162
dependencies = [
164163
"anstyle",
165164
"windows-sys 0.48.0",
@@ -291,9 +290,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
291290

292291
[[package]]
293292
name = "bitflags"
294-
version = "2.3.3"
293+
version = "2.4.0"
295294
source = "registry+https://github.com/rust-lang/crates.io-index"
296-
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
295+
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
297296

298297
[[package]]
299298
name = "block-buffer"
@@ -459,25 +458,23 @@ dependencies = [
459458

460459
[[package]]
461460
name = "clap"
462-
version = "4.3.10"
461+
version = "4.4.4"
463462
source = "registry+https://github.com/rust-lang/crates.io-index"
464-
checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a"
463+
checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136"
465464
dependencies = [
466465
"clap_builder",
467466
"clap_derive",
468-
"once_cell",
469467
]
470468

471469
[[package]]
472470
name = "clap_builder"
473-
version = "4.3.10"
471+
version = "4.4.4"
474472
source = "registry+https://github.com/rust-lang/crates.io-index"
475-
checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d"
473+
checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56"
476474
dependencies = [
477475
"anstream",
478476
"anstyle",
479477
"clap_lex",
480-
"once_cell",
481478
"strsim",
482479
"terminal_size",
483480
]
@@ -493,9 +490,9 @@ dependencies = [
493490

494491
[[package]]
495492
name = "clap_derive"
496-
version = "4.3.2"
493+
version = "4.4.2"
497494
source = "registry+https://github.com/rust-lang/crates.io-index"
498-
checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
495+
checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873"
499496
dependencies = [
500497
"heck",
501498
"proc-macro2",
@@ -515,7 +512,6 @@ version = "0.1.74"
515512
dependencies = [
516513
"clippy_lints",
517514
"clippy_utils",
518-
"derive-new",
519515
"filetime",
520516
"futures",
521517
"if_chain",
@@ -944,17 +940,6 @@ dependencies = [
944940
"syn 2.0.29",
945941
]
946942

947-
[[package]]
948-
name = "derive-new"
949-
version = "0.5.9"
950-
source = "registry+https://github.com/rust-lang/crates.io-index"
951-
checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535"
952-
dependencies = [
953-
"proc-macro2",
954-
"quote",
955-
"syn 1.0.109",
956-
]
957-
958943
[[package]]
959944
name = "derive_builder"
960945
version = "0.12.0"
@@ -1253,12 +1238,9 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
12531238

12541239
[[package]]
12551240
name = "fastrand"
1256-
version = "1.9.0"
1241+
version = "2.0.0"
12571242
source = "registry+https://github.com/rust-lang/crates.io-index"
1258-
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
1259-
dependencies = [
1260-
"instant",
1261-
]
1243+
checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
12621244

12631245
[[package]]
12641246
name = "field-offset"
@@ -1993,17 +1975,6 @@ dependencies = [
19931975
"unic-langid",
19941976
]
19951977

1996-
[[package]]
1997-
name = "io-lifetimes"
1998-
version = "1.0.11"
1999-
source = "registry+https://github.com/rust-lang/crates.io-index"
2000-
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
2001-
dependencies = [
2002-
"hermit-abi 0.3.2",
2003-
"libc",
2004-
"windows-sys 0.48.0",
2005-
]
2006-
20071978
[[package]]
20081979
name = "ipnet"
20091980
version = "2.7.2"
@@ -2017,7 +1988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
20171988
checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb"
20181989
dependencies = [
20191990
"hermit-abi 0.3.2",
2020-
"rustix 0.38.2",
1991+
"rustix",
20211992
"windows-sys 0.48.0",
20221993
]
20231994

@@ -2214,15 +2185,9 @@ dependencies = [
22142185

22152186
[[package]]
22162187
name = "linux-raw-sys"
2217-
version = "0.3.8"
2218-
source = "registry+https://github.com/rust-lang/crates.io-index"
2219-
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
2220-
2221-
[[package]]
2222-
name = "linux-raw-sys"
2223-
version = "0.4.3"
2188+
version = "0.4.7"
22242189
source = "registry+https://github.com/rust-lang/crates.io-index"
2225-
checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
2190+
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"
22262191

22272192
[[package]]
22282193
name = "litemap"
@@ -3006,6 +2971,27 @@ dependencies = [
30062971
"proc-macro2",
30072972
]
30082973

2974+
[[package]]
2975+
name = "r-efi"
2976+
version = "4.2.0"
2977+
source = "registry+https://github.com/rust-lang/crates.io-index"
2978+
checksum = "575fc2d9b3da54adbdfaddf6eca48fec256d977c8630a1750b8991347d1ac911"
2979+
dependencies = [
2980+
"compiler_builtins",
2981+
"rustc-std-workspace-core",
2982+
]
2983+
2984+
[[package]]
2985+
name = "r-efi-alloc"
2986+
version = "1.0.0"
2987+
source = "registry+https://github.com/rust-lang/crates.io-index"
2988+
checksum = "31d6f09fe2b6ad044bc3d2c34ce4979796581afd2f1ebc185837e02421e02fd7"
2989+
dependencies = [
2990+
"compiler_builtins",
2991+
"r-efi",
2992+
"rustc-std-workspace-core",
2993+
]
2994+
30092995
[[package]]
30102996
name = "rand"
30112997
version = "0.8.5"
@@ -3259,6 +3245,7 @@ dependencies = [
32593245
"rustc_driver",
32603246
"rustc_driver_impl",
32613247
"rustc_smir",
3248+
"stable_mir",
32623249
]
32633250

32643251
[[package]]
@@ -4423,7 +4410,7 @@ dependencies = [
44234410
"rustc_session",
44244411
"rustc_span",
44254412
"rustc_target",
4426-
"scoped-tls",
4413+
"stable_mir",
44274414
"tracing",
44284415
]
44294416

@@ -4690,28 +4677,14 @@ dependencies = [
46904677

46914678
[[package]]
46924679
name = "rustix"
4693-
version = "0.37.22"
4680+
version = "0.38.14"
46944681
source = "registry+https://github.com/rust-lang/crates.io-index"
4695-
checksum = "8818fa822adcc98b18fedbb3632a6a33213c070556b5aa7c4c8cc21cff565c4c"
4682+
checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f"
46964683
dependencies = [
4697-
"bitflags 1.3.2",
4684+
"bitflags 2.4.0",
46984685
"errno",
4699-
"io-lifetimes",
47004686
"libc",
4701-
"linux-raw-sys 0.3.8",
4702-
"windows-sys 0.48.0",
4703-
]
4704-
4705-
[[package]]
4706-
name = "rustix"
4707-
version = "0.38.2"
4708-
source = "registry+https://github.com/rust-lang/crates.io-index"
4709-
checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4"
4710-
dependencies = [
4711-
"bitflags 2.3.3",
4712-
"errno",
4713-
"libc",
4714-
"linux-raw-sys 0.4.3",
4687+
"linux-raw-sys",
47154688
"windows-sys 0.48.0",
47164689
]
47174690

@@ -4974,6 +4947,14 @@ version = "1.2.0"
49744947
source = "registry+https://github.com/rust-lang/crates.io-index"
49754948
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
49764949

4950+
[[package]]
4951+
name = "stable_mir"
4952+
version = "0.1.0-preview"
4953+
dependencies = [
4954+
"scoped-tls",
4955+
"tracing",
4956+
]
4957+
49774958
[[package]]
49784959
name = "stacker"
49794960
version = "0.1.15"
@@ -5012,6 +4993,8 @@ dependencies = [
50124993
"panic_abort",
50134994
"panic_unwind",
50144995
"profiler_builtins",
4996+
"r-efi",
4997+
"r-efi-alloc",
50154998
"rand",
50164999
"rand_xorshift",
50175000
"rustc-demangle",
@@ -5173,15 +5156,14 @@ dependencies = [
51735156

51745157
[[package]]
51755158
name = "tempfile"
5176-
version = "3.6.0"
5159+
version = "3.8.0"
51775160
source = "registry+https://github.com/rust-lang/crates.io-index"
5178-
checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
5161+
checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
51795162
dependencies = [
5180-
"autocfg",
51815163
"cfg-if",
51825164
"fastrand",
51835165
"redox_syscall 0.3.5",
5184-
"rustix 0.37.22",
5166+
"rustix",
51855167
"windows-sys 0.48.0",
51865168
]
51875169

@@ -5218,11 +5200,11 @@ dependencies = [
52185200

52195201
[[package]]
52205202
name = "terminal_size"
5221-
version = "0.2.6"
5203+
version = "0.3.0"
52225204
source = "registry+https://github.com/rust-lang/crates.io-index"
5223-
checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237"
5205+
checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
52245206
dependencies = [
5225-
"rustix 0.37.22",
5207+
"rustix",
52265208
"windows-sys 0.48.0",
52275209
]
52285210

compiler/rustc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ rustc_codegen_ssa = { path = "../rustc_codegen_ssa" }
1313
# Make sure rustc_smir ends up in the sysroot, because this
1414
# crate is intended to be used by stable MIR consumers, which are not in-tree
1515
rustc_smir = { path = "../rustc_smir" }
16+
stable_mir = { path = "../stable_mir" }
1617

1718
[dependencies.jemalloc-sys]
1819
version = "0.5.0"

compiler/rustc_arena/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ use std::ptr::{self, NonNull};
3737
use std::slice;
3838
use std::{cmp, intrinsics};
3939

40+
/// This calls the passed function while ensuring it won't be inlined into the caller.
4041
#[inline(never)]
4142
#[cold]
42-
fn cold_path<F: FnOnce() -> R, R>(f: F) -> R {
43+
fn outline<F: FnOnce() -> R, R>(f: F) -> R {
4344
f()
4445
}
4546

@@ -600,7 +601,7 @@ impl DroplessArena {
600601
unsafe { self.write_from_iter(iter, len, mem) }
601602
}
602603
(_, _) => {
603-
cold_path(move || -> &mut [T] {
604+
outline(move || -> &mut [T] {
604605
let mut vec: SmallVec<[_; 8]> = iter.collect();
605606
if vec.is_empty() {
606607
return &mut [];

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
16641664
lifetime.ident,
16651665
));
16661666

1667-
// Now make an arg that we can use for the substs of the opaque tykind.
1667+
// Now make an arg that we can use for the generic params of the opaque tykind.
16681668
let id = self.next_node_id();
16691669
let lifetime_arg = self.new_named_lifetime_with_res(id, lifetime.ident, res);
16701670
let duplicated_lifetime_def_id = self.local_def_id(duplicated_lifetime_node_id);

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -578,25 +578,31 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
578578
}
579579
}
580580

581-
// All uses of `gate_all!` below this point were added in #65742,
581+
// All uses of `gate_all_legacy_dont_use!` below this point were added in #65742,
582582
// and subsequently disabled (with the non-early gating readded).
583583
// We emit an early future-incompatible warning for these.
584584
// New syntax gates should go above here to get a hard error gate.
585-
macro_rules! gate_all {
585+
macro_rules! gate_all_legacy_dont_use {
586586
($gate:ident, $msg:literal) => {
587587
for span in spans.get(&sym::$gate).unwrap_or(&vec![]) {
588588
gate_feature_post!(future_incompatible; &visitor, $gate, *span, $msg);
589589
}
590590
};
591591
}
592592

593-
gate_all!(trait_alias, "trait aliases are experimental");
594-
gate_all!(associated_type_bounds, "associated type bounds are unstable");
595-
gate_all!(return_type_notation, "return type notation is experimental");
596-
gate_all!(decl_macro, "`macro` is experimental");
597-
gate_all!(box_patterns, "box pattern syntax is experimental");
598-
gate_all!(exclusive_range_pattern, "exclusive range pattern syntax is experimental");
599-
gate_all!(try_blocks, "`try` blocks are unstable");
593+
gate_all_legacy_dont_use!(trait_alias, "trait aliases are experimental");
594+
gate_all_legacy_dont_use!(associated_type_bounds, "associated type bounds are unstable");
595+
// Despite being a new feature, `where T: Trait<Assoc(): Sized>`, which is RTN syntax now,
596+
// used to be gated under associated_type_bounds, which are right above, so RTN needs to
597+
// be too.
598+
gate_all_legacy_dont_use!(return_type_notation, "return type notation is experimental");
599+
gate_all_legacy_dont_use!(decl_macro, "`macro` is experimental");
600+
gate_all_legacy_dont_use!(box_patterns, "box pattern syntax is experimental");
601+
gate_all_legacy_dont_use!(
602+
exclusive_range_pattern,
603+
"exclusive range pattern syntax is experimental"
604+
);
605+
gate_all_legacy_dont_use!(try_blocks, "`try` blocks are unstable");
600606

601607
visit::walk_crate(&mut visitor, krate);
602608
}

0 commit comments

Comments
 (0)