Skip to content

Commit 50b4bc0

Browse files
author
The Miri Conjob Bot
committed
Merge from rustc
2 parents a4d2130 + 656ee47 commit 50b4bc0

File tree

352 files changed

+5150
-2496
lines changed

Some content is hidden

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

352 files changed

+5150
-2496
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ jobs:
5050
matrix:
5151
include:
5252
- name: mingw-check
53-
os: ubuntu-20.04-16core-64gb
53+
os: ubuntu-20.04-4core-16gb
5454
env: {}
5555
- name: mingw-check-tidy
56-
os: ubuntu-20.04-16core-64gb
56+
os: ubuntu-20.04-4core-16gb
5757
env: {}
5858
- name: x86_64-gnu-llvm-15
5959
os: ubuntu-20.04-16core-64gb

Cargo.lock

Lines changed: 70 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,29 @@ version = "0.20.0"
88
source = "registry+https://github.com/rust-lang/crates.io-index"
99
checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3"
1010
dependencies = [
11-
"compiler_builtins",
1211
"gimli 0.27.3",
13-
"rustc-std-workspace-alloc",
14-
"rustc-std-workspace-core",
1512
]
1613

1714
[[package]]
18-
name = "adler"
19-
version = "1.0.2"
15+
name = "addr2line"
16+
version = "0.21.0"
2017
source = "registry+https://github.com/rust-lang/crates.io-index"
21-
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
18+
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
2219
dependencies = [
2320
"compiler_builtins",
21+
"gimli 0.28.0",
22+
"rustc-std-workspace-alloc",
2423
"rustc-std-workspace-core",
2524
]
2625

2726
[[package]]
28-
name = "ahash"
29-
version = "0.7.6"
27+
name = "adler"
28+
version = "1.0.2"
3029
source = "registry+https://github.com/rust-lang/crates.io-index"
31-
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
30+
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
3231
dependencies = [
33-
"getrandom",
34-
"once_cell",
35-
"version_check",
32+
"compiler_builtins",
33+
"rustc-std-workspace-core",
3634
]
3735

3836
[[package]]
@@ -178,11 +176,11 @@ dependencies = [
178176

179177
[[package]]
180178
name = "ar_archive_writer"
181-
version = "0.1.4"
179+
version = "0.1.5"
182180
source = "registry+https://github.com/rust-lang/crates.io-index"
183-
checksum = "74cfb39880a59e122232cb5fb06b20b4382d58c12fa9747d16f846d38a7b094c"
181+
checksum = "9792d37ca5173d7e7f4fe453739a0671d0557915a030a383d6b866476bbc3e71"
184182
dependencies = [
185-
"object",
183+
"object 0.32.0",
186184
]
187185

188186
[[package]]
@@ -252,12 +250,12 @@ version = "0.3.68"
252250
source = "registry+https://github.com/rust-lang/crates.io-index"
253251
checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12"
254252
dependencies = [
255-
"addr2line",
253+
"addr2line 0.20.0",
256254
"cc",
257255
"cfg-if",
258256
"libc",
259257
"miniz_oxide",
260-
"object",
258+
"object 0.31.1",
261259
"rustc-demangle",
262260
]
263261

@@ -1159,9 +1157,9 @@ dependencies = [
11591157

11601158
[[package]]
11611159
name = "fallible-iterator"
1162-
version = "0.2.0"
1160+
version = "0.3.0"
11631161
source = "registry+https://github.com/rust-lang/crates.io-index"
1164-
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
1162+
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
11651163

11661164
[[package]]
11671165
name = "fastrand"
@@ -1439,24 +1437,22 @@ dependencies = [
14391437

14401438
[[package]]
14411439
name = "gimli"
1442-
version = "0.26.2"
1440+
version = "0.27.3"
14431441
source = "registry+https://github.com/rust-lang/crates.io-index"
1444-
checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
1445-
dependencies = [
1446-
"fallible-iterator",
1447-
"indexmap 1.9.3",
1448-
"stable_deref_trait",
1449-
]
1442+
checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
14501443

14511444
[[package]]
14521445
name = "gimli"
1453-
version = "0.27.3"
1446+
version = "0.28.0"
14541447
source = "registry+https://github.com/rust-lang/crates.io-index"
1455-
checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
1448+
checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
14561449
dependencies = [
14571450
"compiler_builtins",
1451+
"fallible-iterator",
1452+
"indexmap 2.0.0",
14581453
"rustc-std-workspace-alloc",
14591454
"rustc-std-workspace-core",
1455+
"stable_deref_trait",
14601456
]
14611457

14621458
[[package]]
@@ -1525,25 +1521,14 @@ name = "hashbrown"
15251521
version = "0.12.3"
15261522
source = "registry+https://github.com/rust-lang/crates.io-index"
15271523
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
1528-
dependencies = [
1529-
"ahash 0.7.6",
1530-
]
1531-
1532-
[[package]]
1533-
name = "hashbrown"
1534-
version = "0.13.2"
1535-
source = "registry+https://github.com/rust-lang/crates.io-index"
1536-
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
1537-
dependencies = [
1538-
"ahash 0.8.3",
1539-
]
15401524

15411525
[[package]]
15421526
name = "hashbrown"
15431527
version = "0.14.0"
15441528
source = "registry+https://github.com/rust-lang/crates.io-index"
15451529
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
15461530
dependencies = [
1531+
"ahash",
15471532
"allocator-api2",
15481533
"compiler_builtins",
15491534
"rustc-std-workspace-alloc",
@@ -2449,12 +2434,21 @@ name = "object"
24492434
version = "0.31.1"
24502435
source = "registry+https://github.com/rust-lang/crates.io-index"
24512436
checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1"
2437+
dependencies = [
2438+
"memchr",
2439+
]
2440+
2441+
[[package]]
2442+
name = "object"
2443+
version = "0.32.0"
2444+
source = "registry+https://github.com/rust-lang/crates.io-index"
2445+
checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe"
24522446
dependencies = [
24532447
"compiler_builtins",
24542448
"crc32fast",
24552449
"flate2",
2456-
"hashbrown 0.13.2",
2457-
"indexmap 1.9.3",
2450+
"hashbrown 0.14.0",
2451+
"indexmap 2.0.0",
24582452
"memchr",
24592453
"rustc-std-workspace-alloc",
24602454
"rustc-std-workspace-core",
@@ -3362,7 +3356,7 @@ dependencies = [
33623356
"cstr",
33633357
"libc",
33643358
"measureme",
3365-
"object",
3359+
"object 0.32.0",
33663360
"rustc-demangle",
33673361
"rustc_ast",
33683362
"rustc_attr",
@@ -3398,7 +3392,7 @@ dependencies = [
33983392
"itertools",
33993393
"jobserver",
34003394
"libc",
3401-
"object",
3395+
"object 0.32.0",
34023396
"pathdiff",
34033397
"regex",
34043398
"rustc_arena",
@@ -3805,6 +3799,7 @@ dependencies = [
38053799
"rustc_data_structures",
38063800
"rustc_errors",
38073801
"rustc_expand",
3802+
"rustc_feature",
38083803
"rustc_fluent_macro",
38093804
"rustc_fs_util",
38103805
"rustc_hir",
@@ -4331,7 +4326,7 @@ name = "rustc_target"
43314326
version = "0.0.0"
43324327
dependencies = [
43334328
"bitflags 1.3.2",
4334-
"object",
4329+
"object 0.32.0",
43354330
"rustc_abi",
43364331
"rustc_data_structures",
43374332
"rustc_feature",
@@ -4586,12 +4581,12 @@ checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
45864581

45874582
[[package]]
45884583
name = "ruzstd"
4589-
version = "0.3.1"
4584+
version = "0.4.0"
45904585
source = "registry+https://github.com/rust-lang/crates.io-index"
4591-
checksum = "9a15e661f0f9dac21f3494fe5d23a6338c0ac116a2d22c2b63010acd89467ffe"
4586+
checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc"
45924587
dependencies = [
45934588
"byteorder",
4594-
"thiserror",
4589+
"thiserror-core",
45954590
"twox-hash",
45964591
]
45974592

@@ -4860,7 +4855,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
48604855
name = "std"
48614856
version = "0.0.0"
48624857
dependencies = [
4863-
"addr2line",
4858+
"addr2line 0.21.0",
48644859
"alloc",
48654860
"cfg-if",
48664861
"compiler_builtins",
@@ -4871,7 +4866,7 @@ dependencies = [
48714866
"hermit-abi 0.3.2",
48724867
"libc",
48734868
"miniz_oxide",
4874-
"object",
4869+
"object 0.32.0",
48754870
"panic_abort",
48764871
"panic_unwind",
48774872
"profiler_builtins",
@@ -5138,6 +5133,26 @@ dependencies = [
51385133
"thiserror-impl",
51395134
]
51405135

5136+
[[package]]
5137+
name = "thiserror-core"
5138+
version = "1.0.38"
5139+
source = "registry+https://github.com/rust-lang/crates.io-index"
5140+
checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497"
5141+
dependencies = [
5142+
"thiserror-core-impl",
5143+
]
5144+
5145+
[[package]]
5146+
name = "thiserror-core-impl"
5147+
version = "1.0.38"
5148+
source = "registry+https://github.com/rust-lang/crates.io-index"
5149+
checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac"
5150+
dependencies = [
5151+
"proc-macro2",
5152+
"quote",
5153+
"syn 1.0.109",
5154+
]
5155+
51415156
[[package]]
51425157
name = "thiserror-impl"
51435158
version = "1.0.40"
@@ -5151,13 +5166,13 @@ dependencies = [
51515166

51525167
[[package]]
51535168
name = "thorin-dwp"
5154-
version = "0.6.0"
5169+
version = "0.7.0"
51555170
source = "registry+https://github.com/rust-lang/crates.io-index"
5156-
checksum = "98c040e1340b889d4180c64e1d787efa9c32cb1617757e101480b61238b0d927"
5171+
checksum = "4db52ee8fec06e119b692ef3dd2c4cf621a99204c1b8c47407870ed050305b9b"
51575172
dependencies = [
5158-
"gimli 0.26.2",
5159-
"hashbrown 0.12.3",
5160-
"object",
5173+
"gimli 0.28.0",
5174+
"hashbrown 0.14.0",
5175+
"object 0.32.0",
51615176
"tracing",
51625177
]
51635178

compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
16481648
hir::ExprKind::Match(
16491649
scrutinee,
16501650
arena_vec![self; break_arm, continue_arm],
1651-
hir::MatchSource::TryDesugar,
1651+
hir::MatchSource::TryDesugar(scrutinee.hir_id),
16521652
)
16531653
}
16541654

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,35 +2495,31 @@ impl<'hir> GenericArgsCtor<'hir> {
24952495

24962496
let id = lcx.next_node_id();
24972497
let hir_id = lcx.next_id();
2498+
2499+
let Some(host_param_id) = lcx.host_param_id else {
2500+
lcx.tcx
2501+
.sess
2502+
.delay_span_bug(span, "no host param id for call in const yet no errors reported");
2503+
return;
2504+
};
2505+
24982506
let body = lcx.lower_body(|lcx| {
2499-
(
2500-
&[],
2501-
match constness {
2502-
ast::Const::Yes(_) => {
2503-
let hir_id = lcx.next_id();
2504-
let res =
2505-
Res::Def(DefKind::ConstParam, lcx.host_param_id.unwrap().to_def_id());
2506-
let expr_kind = hir::ExprKind::Path(hir::QPath::Resolved(
2507-
None,
2508-
lcx.arena.alloc(hir::Path {
2509-
span,
2510-
res,
2511-
segments: arena_vec![lcx; hir::PathSegment::new(Ident {
2512-
name: sym::host,
2513-
span,
2514-
}, hir_id, res)],
2515-
}),
2516-
));
2517-
lcx.expr(span, expr_kind)
2518-
}
2519-
ast::Const::No => lcx.expr(
2507+
(&[], {
2508+
let hir_id = lcx.next_id();
2509+
let res = Res::Def(DefKind::ConstParam, host_param_id.to_def_id());
2510+
let expr_kind = hir::ExprKind::Path(hir::QPath::Resolved(
2511+
None,
2512+
lcx.arena.alloc(hir::Path {
25202513
span,
2521-
hir::ExprKind::Lit(
2522-
lcx.arena.alloc(hir::Lit { span, node: ast::LitKind::Bool(true) }),
2523-
),
2524-
),
2525-
},
2526-
)
2514+
res,
2515+
segments: arena_vec![lcx; hir::PathSegment::new(Ident {
2516+
name: sym::host,
2517+
span,
2518+
}, hir_id, res)],
2519+
}),
2520+
));
2521+
lcx.expr(span, expr_kind)
2522+
})
25272523
});
25282524

25292525
let attr_id = lcx.tcx.sess.parse_sess.attr_id_generator.mk_attr_id();

compiler/rustc_ast_lowering/src/lifetime_collector.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::ResolverAstLoweringExt;
22
use rustc_ast::visit::{self, BoundKind, LifetimeCtxt, Visitor};
33
use rustc_ast::{GenericBounds, Lifetime, NodeId, PathSegment, PolyTraitRef, Ty, TyKind};
4-
use rustc_hir::def::LifetimeRes;
4+
use rustc_hir::def::{DefKind, LifetimeRes, Res};
55
use rustc_middle::span_bug;
66
use rustc_middle::ty::ResolverAstLowering;
77
use rustc_span::symbol::{kw, Ident};
@@ -77,7 +77,20 @@ impl<'ast> Visitor<'ast> for LifetimeCollectVisitor<'ast> {
7777
}
7878

7979
fn visit_ty(&mut self, t: &'ast Ty) {
80-
match t.kind {
80+
match &t.kind {
81+
TyKind::Path(None, _) => {
82+
// We can sometimes encounter bare trait objects
83+
// which are represented in AST as paths.
84+
if let Some(partial_res) = self.resolver.get_partial_res(t.id)
85+
&& let Some(Res::Def(DefKind::Trait | DefKind::TraitAlias, _)) = partial_res.full_res()
86+
{
87+
self.current_binders.push(t.id);
88+
visit::walk_ty(self, t);
89+
self.current_binders.pop();
90+
} else {
91+
visit::walk_ty(self, t);
92+
}
93+
}
8194
TyKind::BareFn(_) => {
8295
self.current_binders.push(t.id);
8396
visit::walk_ty(self, t);

0 commit comments

Comments
 (0)