Skip to content

Commit f0d864f

Browse files
committed
Auto merge of #3395 - rust-lang:rustup-2024-03-23, r=saethlin
Automatic Rustup
2 parents 2fae357 + 5039f8b commit f0d864f

File tree

219 files changed

+1565
-1091
lines changed

Some content is hidden

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

219 files changed

+1565
-1091
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ James Hinshelwood <jameshinshelwood1@gmail.com> <james.hinshelwood@bigpayme.com>
259259
James Miller <bladeon@gmail.com> <james@aatch.net>
260260
James Perry <james.austin.perry@gmail.com>
261261
James Sanderson <zofrex@gmail.com>
262+
Jan-Erik Rediger <janerik@fnordig.de> <badboy@archlinux.us>
262263
Jaro Fietz <jaro.fietz@gmx.de>
263264
Jason Fager <jfager@gmail.com>
264265
Jason Liquorish <jason@liquori.sh> <Bassetts@users.noreply.github.com>

Cargo.lock

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ version = "0.1.5"
214214
source = "registry+https://github.com/rust-lang/crates.io-index"
215215
checksum = "9792d37ca5173d7e7f4fe453739a0671d0557915a030a383d6b866476bbc3e71"
216216
dependencies = [
217-
"object",
217+
"object 0.32.2",
218218
]
219219

220220
[[package]]
@@ -281,7 +281,7 @@ dependencies = [
281281
"cfg-if",
282282
"libc",
283283
"miniz_oxide",
284-
"object",
284+
"object 0.32.2",
285285
"rustc-demangle",
286286
]
287287

@@ -2636,10 +2636,21 @@ dependencies = [
26362636
"memchr",
26372637
"rustc-std-workspace-alloc",
26382638
"rustc-std-workspace-core",
2639-
"ruzstd",
2639+
"ruzstd 0.5.0",
26402640
"wasmparser",
26412641
]
26422642

2643+
[[package]]
2644+
name = "object"
2645+
version = "0.34.0"
2646+
source = "registry+https://github.com/rust-lang/crates.io-index"
2647+
checksum = "d7090bae93f8585aad99e595b7073c5de9ba89fbd6b4e9f0cdd7a10177273ac8"
2648+
dependencies = [
2649+
"flate2",
2650+
"memchr",
2651+
"ruzstd 0.6.0",
2652+
]
2653+
26432654
[[package]]
26442655
name = "odht"
26452656
version = "0.3.1"
@@ -3323,6 +3334,7 @@ dependencies = [
33233334
name = "run_make_support"
33243335
version = "0.0.0"
33253336
dependencies = [
3337+
"object 0.34.0",
33263338
"wasmparser",
33273339
]
33283340

@@ -3634,7 +3646,7 @@ dependencies = [
36343646
"itertools 0.12.1",
36353647
"libc",
36363648
"measureme",
3637-
"object",
3649+
"object 0.32.2",
36383650
"rustc-demangle",
36393651
"rustc_ast",
36403652
"rustc_attr",
@@ -3670,7 +3682,7 @@ dependencies = [
36703682
"itertools 0.12.1",
36713683
"jobserver",
36723684
"libc",
3673-
"object",
3685+
"object 0.32.2",
36743686
"pathdiff",
36753687
"regex",
36763688
"rustc_arena",
@@ -3686,6 +3698,7 @@ dependencies = [
36863698
"rustc_macros",
36873699
"rustc_metadata",
36883700
"rustc_middle",
3701+
"rustc_monomorphize",
36893702
"rustc_query_system",
36903703
"rustc_serialize",
36913704
"rustc_session",
@@ -4630,7 +4643,7 @@ name = "rustc_target"
46304643
version = "0.0.0"
46314644
dependencies = [
46324645
"bitflags 2.4.2",
4633-
"object",
4646+
"object 0.32.2",
46344647
"rustc_abi",
46354648
"rustc_data_structures",
46364649
"rustc_feature",
@@ -4897,6 +4910,17 @@ dependencies = [
48974910
"twox-hash",
48984911
]
48994912

4913+
[[package]]
4914+
name = "ruzstd"
4915+
version = "0.6.0"
4916+
source = "registry+https://github.com/rust-lang/crates.io-index"
4917+
checksum = "5174a470eeb535a721ae9fdd6e291c2411a906b96592182d05217591d5c5cf7b"
4918+
dependencies = [
4919+
"byteorder",
4920+
"derive_more",
4921+
"twox-hash",
4922+
]
4923+
49004924
[[package]]
49014925
name = "ryu"
49024926
version = "1.0.17"
@@ -5200,7 +5224,7 @@ dependencies = [
52005224
"hermit-abi",
52015225
"libc",
52025226
"miniz_oxide",
5203-
"object",
5227+
"object 0.32.2",
52045228
"panic_abort",
52055229
"panic_unwind",
52065230
"profiler_builtins",
@@ -5517,7 +5541,7 @@ checksum = "4db52ee8fec06e119b692ef3dd2c4cf621a99204c1b8c47407870ed050305b9b"
55175541
dependencies = [
55185542
"gimli",
55195543
"hashbrown",
5520-
"object",
5544+
"object 0.32.2",
55215545
"tracing",
55225546
]
55235547

Cargo.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ exclude = [
6666
]
6767

6868
[profile.release.package.compiler_builtins]
69-
# The compiler-builtins crate cannot reference libcore, and its own CI will
70-
# verify that this is the case. This requires, however, that the crate is built
71-
# without overflow checks and debug assertions. Forcefully disable debug
72-
# assertions and overflow checks here which should ensure that even if these
73-
# assertions are enabled for libstd we won't enable them for compiler_builtins
74-
# which should ensure we still link everything correctly.
75-
debug-assertions = false
76-
overflow-checks = false
77-
7869
# For compiler-builtins we always use a high number of codegen units.
7970
# The goal here is to place every single intrinsic into its own object
8071
# file to avoid symbol clashes with the system libgcc if possible. Note

compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
366366
Some(variant.fields[field].name.to_string())
367367
}
368368
ty::Tuple(_) => Some(field.index().to_string()),
369-
ty::Ref(_, ty, _) | ty::RawPtr(ty::TypeAndMut { ty, .. }) => {
369+
ty::Ref(_, ty, _) | ty::RawPtr(ty, _) => {
370370
self.describe_field_from_ty(ty, field, variant_index, including_tuple_field)
371371
}
372372
ty::Array(ty, _) | ty::Slice(ty) => {

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,10 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
503503
ty::VarianceDiagInfo::None => {}
504504
ty::VarianceDiagInfo::Invariant { ty, param_index } => {
505505
let (desc, note) = match ty.kind() {
506-
ty::RawPtr(ty_mut) => {
507-
assert_eq!(ty_mut.mutbl, rustc_hir::Mutability::Mut);
506+
ty::RawPtr(ty, mutbl) => {
507+
assert_eq!(*mutbl, rustc_hir::Mutability::Mut);
508508
(
509-
format!("a mutable pointer to `{}`", ty_mut.ty),
509+
format!("a mutable pointer to `{}`", ty),
510510
"mutable pointers are invariant over their type parameter".to_string(),
511511
)
512512
}

compiler/rustc_borrowck/src/diagnostics/region_name.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
555555
search_stack.push((*elem_ty, elem_hir_ty));
556556
}
557557

558-
(ty::RawPtr(mut_ty), hir::TyKind::Ptr(mut_hir_ty)) => {
559-
search_stack.push((mut_ty.ty, &mut_hir_ty.ty));
558+
(ty::RawPtr(mut_ty, _), hir::TyKind::Ptr(mut_hir_ty)) => {
559+
search_stack.push((*mut_ty, &mut_hir_ty.ty));
560560
}
561561

562562
_ => {

compiler/rustc_borrowck/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
16491649
| ty::Str
16501650
| ty::Array(_, _)
16511651
| ty::Slice(_)
1652-
| ty::RawPtr(_)
1652+
| ty::RawPtr(_, _)
16531653
| ty::Ref(_, _, _)
16541654
| ty::FnDef(_, _)
16551655
| ty::FnPtr(_)
@@ -2284,8 +2284,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
22842284
}
22852285
}
22862286
}
2287-
ty::RawPtr(tnm) => {
2288-
match tnm.mutbl {
2287+
ty::RawPtr(_, mutbl) => {
2288+
match mutbl {
22892289
// `*const` raw pointers are not mutable
22902290
hir::Mutability::Not => Err(place),
22912291
// `*mut` raw pointers are always mutable, regardless of

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
20652065
from_closure: constraint.from_closure,
20662066
cause: ObligationCause::new(constraint.span, CRATE_DEF_ID, cause_code.clone()),
20672067
variance_info: constraint.variance_info,
2068-
outlives_constraint: *constraint,
20692068
})
20702069
.collect();
20712070
debug!("categorized_path={:#?}", categorized_path);
@@ -2294,5 +2293,4 @@ pub struct BlameConstraint<'tcx> {
22942293
pub from_closure: bool,
22952294
pub cause: ObligationCause<'tcx>,
22962295
pub variance_info: ty::VarianceDiagInfo<'tcx>,
2297-
pub outlives_constraint: OutlivesConstraint<'tcx>,
22982296
}

compiler/rustc_borrowck/src/type_check/canonical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
8282
) {
8383
self.prove_predicate(
8484
ty::Binder::dummy(ty::PredicateKind::Clause(ty::ClauseKind::Trait(
85-
ty::TraitPredicate { trait_ref, polarity: ty::ImplPolarity::Positive },
85+
ty::TraitPredicate { trait_ref, polarity: ty::PredicatePolarity::Positive },
8686
))),
8787
locations,
8888
category,

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,15 +2157,12 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21572157
}
21582158

21592159
CastKind::PointerCoercion(PointerCoercion::MutToConstPointer) => {
2160-
let ty::RawPtr(ty::TypeAndMut { ty: ty_from, mutbl: hir::Mutability::Mut }) =
2161-
op.ty(body, tcx).kind()
2160+
let ty::RawPtr(ty_from, hir::Mutability::Mut) = op.ty(body, tcx).kind()
21622161
else {
21632162
span_mirbug!(self, rvalue, "unexpected base type for cast {:?}", ty,);
21642163
return;
21652164
};
2166-
let ty::RawPtr(ty::TypeAndMut { ty: ty_to, mutbl: hir::Mutability::Not }) =
2167-
ty.kind()
2168-
else {
2165+
let ty::RawPtr(ty_to, hir::Mutability::Not) = ty.kind() else {
21692166
span_mirbug!(self, rvalue, "unexpected target type for cast {:?}", ty,);
21702167
return;
21712168
};
@@ -2190,12 +2187,10 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21902187
let ty_from = op.ty(body, tcx);
21912188

21922189
let opt_ty_elem_mut = match ty_from.kind() {
2193-
ty::RawPtr(ty::TypeAndMut { mutbl: array_mut, ty: array_ty }) => {
2194-
match array_ty.kind() {
2195-
ty::Array(ty_elem, _) => Some((ty_elem, *array_mut)),
2196-
_ => None,
2197-
}
2198-
}
2190+
ty::RawPtr(array_ty, array_mut) => match array_ty.kind() {
2191+
ty::Array(ty_elem, _) => Some((ty_elem, *array_mut)),
2192+
_ => None,
2193+
},
21992194
_ => None,
22002195
};
22012196

@@ -2210,9 +2205,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
22102205
};
22112206

22122207
let (ty_to, ty_to_mut) = match ty.kind() {
2213-
ty::RawPtr(ty::TypeAndMut { mutbl: ty_to_mut, ty: ty_to }) => {
2214-
(ty_to, *ty_to_mut)
2215-
}
2208+
ty::RawPtr(ty_to, ty_to_mut) => (ty_to, *ty_to_mut),
22162209
_ => {
22172210
span_mirbug!(
22182211
self,
@@ -2413,7 +2406,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
24132406
let ty_left = left.ty(body, tcx);
24142407
match ty_left.kind() {
24152408
// Types with regions are comparable if they have a common super-type.
2416-
ty::RawPtr(_) | ty::FnPtr(_) => {
2409+
ty::RawPtr(_, _) | ty::FnPtr(_) => {
24172410
let ty_right = right.ty(body, tcx);
24182411
let common_ty = self.infcx.next_ty_var(TypeVariableOrigin {
24192412
kind: TypeVariableOriginKind::MiscVariable,

0 commit comments

Comments
 (0)