Skip to content

Commit cf22ee0

Browse files
committed
Auto merge of rust-lang#3275 - rust-lang:rustup-2024-01-24, r=RalfJung
Automatic Rustup
2 parents b5a3acf + a9bc7e9 commit cf22ee0

File tree

220 files changed

+3704
-1220
lines changed

Some content is hidden

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

220 files changed

+3704
-1220
lines changed

.mailmap

Lines changed: 1 addition & 1 deletion
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

Lines changed: 77 additions & 12 deletions
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]]
@@ -2512,14 +2512,13 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
25122512

25132513
[[package]]
25142514
name = "nix"
2515-
version = "0.26.2"
2515+
version = "0.27.1"
25162516
source = "registry+https://github.com/rust-lang/crates.io-index"
2517-
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
2517+
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
25182518
dependencies = [
2519-
"bitflags 1.3.2",
2519+
"bitflags 2.4.1",
25202520
"cfg-if",
25212521
"libc",
2522-
"static_assertions",
25232522
]
25242523

25252524
[[package]]
@@ -2641,11 +2640,11 @@ dependencies = [
26412640

26422641
[[package]]
26432642
name = "openssl"
2644-
version = "0.10.55"
2643+
version = "0.10.63"
26452644
source = "registry+https://github.com/rust-lang/crates.io-index"
2646-
checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d"
2645+
checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8"
26472646
dependencies = [
2648-
"bitflags 1.3.2",
2647+
"bitflags 2.4.1",
26492648
"cfg-if",
26502649
"foreign-types",
26512650
"libc",
@@ -2673,9 +2672,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
26732672

26742673
[[package]]
26752674
name = "openssl-sys"
2676-
version = "0.9.90"
2675+
version = "0.9.99"
26772676
source = "registry+https://github.com/rust-lang/crates.io-index"
2678-
checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6"
2677+
checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae"
26792678
dependencies = [
26802679
"cc",
26812680
"libc",
@@ -6143,6 +6142,15 @@ dependencies = [
61436142
"windows-targets 0.48.1",
61446143
]
61456144

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+
61466154
[[package]]
61476155
name = "windows-targets"
61486156
version = "0.42.2"
@@ -6173,6 +6181,21 @@ dependencies = [
61736181
"windows_x86_64_msvc 0.48.0",
61746182
]
61756183

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+
61766199
[[package]]
61776200
name = "windows_aarch64_gnullvm"
61786201
version = "0.42.2"
@@ -6185,6 +6208,12 @@ version = "0.48.0"
61856208
source = "registry+https://github.com/rust-lang/crates.io-index"
61866209
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
61876210

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+
61886217
[[package]]
61896218
name = "windows_aarch64_msvc"
61906219
version = "0.42.2"
@@ -6197,6 +6226,12 @@ version = "0.48.0"
61976226
source = "registry+https://github.com/rust-lang/crates.io-index"
61986227
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
61996228

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+
62006235
[[package]]
62016236
name = "windows_i686_gnu"
62026237
version = "0.42.2"
@@ -6209,6 +6244,12 @@ version = "0.48.0"
62096244
source = "registry+https://github.com/rust-lang/crates.io-index"
62106245
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
62116246

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+
62126253
[[package]]
62136254
name = "windows_i686_msvc"
62146255
version = "0.42.2"
@@ -6221,6 +6262,12 @@ version = "0.48.0"
62216262
source = "registry+https://github.com/rust-lang/crates.io-index"
62226263
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
62236264

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+
62246271
[[package]]
62256272
name = "windows_x86_64_gnu"
62266273
version = "0.42.2"
@@ -6233,6 +6280,12 @@ version = "0.48.0"
62336280
source = "registry+https://github.com/rust-lang/crates.io-index"
62346281
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
62356282

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+
62366289
[[package]]
62376290
name = "windows_x86_64_gnullvm"
62386291
version = "0.42.2"
@@ -6245,6 +6298,12 @@ version = "0.48.0"
62456298
source = "registry+https://github.com/rust-lang/crates.io-index"
62466299
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
62476300

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+
62486307
[[package]]
62496308
name = "windows_x86_64_msvc"
62506309
version = "0.42.2"
@@ -6257,6 +6316,12 @@ version = "0.48.0"
62576316
source = "registry+https://github.com/rust-lang/crates.io-index"
62586317
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
62596318

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+
62606325
[[package]]
62616326
name = "winnow"
62626327
version = "0.4.7"

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
22
use rustc_data_structures::graph::WithSuccessors;
3-
use rustc_index::bit_set::HybridBitSet;
3+
use rustc_index::bit_set::BitSet;
44
use rustc_index::interval::IntervalSet;
55
use rustc_infer::infer::canonical::QueryRegionConstraints;
66
use rustc_infer::infer::outlives::for_liveness;
@@ -135,7 +135,7 @@ struct LivenessResults<'me, 'typeck, 'flow, 'tcx> {
135135
cx: LivenessContext<'me, 'typeck, 'flow, 'tcx>,
136136

137137
/// Set of points that define the current local.
138-
defs: HybridBitSet<PointIndex>,
138+
defs: BitSet<PointIndex>,
139139

140140
/// Points where the current variable is "use live" -- meaning
141141
/// that there is a future "full use" that may use its value.
@@ -158,7 +158,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
158158
let num_points = cx.elements.num_points();
159159
LivenessResults {
160160
cx,
161-
defs: HybridBitSet::new_empty(num_points),
161+
defs: BitSet::new_empty(num_points),
162162
use_live_at: IntervalSet::new(num_points),
163163
drop_live_at: IntervalSet::new(num_points),
164164
drop_locations: vec![],

compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ fn codegen_stmt<'tcx>(
682682
args,
683683
ty::ClosureKind::FnOnce,
684684
)
685-
.expect("failed to normalize and resolve closure during codegen")
686685
.polymorphize(fx.tcx);
687686
let func_ref = fx.get_function_ref(instance);
688687
let func_addr = fx.bcx.ins().func_addr(fx.pointer_type, func_ref);

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
435435
args,
436436
ty::ClosureKind::FnOnce,
437437
)
438-
.expect("failed to normalize and resolve closure during codegen")
439438
.polymorphize(bx.cx().tcx());
440439
OperandValue::Immediate(bx.cx().get_fn_addr(instance))
441440
}

compiler/rustc_const_eval/messages.ftl

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ const_eval_dangling_int_pointer =
4646
{$bad_pointer_message}: {$pointer} is a dangling pointer (it has no provenance)
4747
const_eval_dangling_null_pointer =
4848
{$bad_pointer_message}: null pointer is a dangling pointer (it has no provenance)
49-
const_eval_dangling_ptr_in_final = encountered dangling pointer in final constant
5049
50+
const_eval_dangling_ptr_in_final = encountered dangling pointer in final value of {const_eval_intern_kind}
5151
const_eval_dead_local =
5252
accessing a dead local variable
5353
const_eval_dealloc_immutable =
@@ -134,6 +134,14 @@ const_eval_interior_mutable_data_refer =
134134
This would make multiple uses of a constant to be able to see different values and allow circumventing
135135
the `Send` and `Sync` requirements for shared mutable data, which is unsound.
136136
137+
const_eval_intern_kind = {$kind ->
138+
[static] static
139+
[static_mut] mutable static
140+
[const] constant
141+
[promoted] promoted
142+
*[other] {""}
143+
}
144+
137145
const_eval_invalid_align =
138146
align has to be a power of 2
139147
@@ -205,6 +213,8 @@ const_eval_modified_global =
205213
const_eval_mut_deref =
206214
mutation through a reference is not allowed in {const_eval_const_context}s
207215
216+
const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind}
217+
208218
const_eval_non_const_fmt_macro_call =
209219
cannot call non-const formatting macro in {const_eval_const_context}s
210220
@@ -327,7 +337,7 @@ const_eval_too_many_caller_args =
327337
328338
const_eval_transient_mut_borrow = mutable references are not allowed in {const_eval_const_context}s
329339
330-
const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in {const_eval_const_context}s
340+
const_eval_transient_mut_raw = raw mutable pointers are not allowed in {const_eval_const_context}s
331341
332342
const_eval_try_block_from_output_non_const =
333343
`try` block cannot convert `{$ty}` to the result in {const_eval_const_context}s
@@ -341,21 +351,21 @@ const_eval_unallowed_heap_allocations =
341351
342352
const_eval_unallowed_inline_asm =
343353
inline assembly is not allowed in {const_eval_const_context}s
344-
const_eval_unallowed_mutable_refs =
345-
mutable references are not allowed in the final value of {const_eval_const_context}s
354+
const_eval_unallowed_mutable_raw =
355+
raw mutable pointers are not allowed in the final value of {const_eval_const_context}s
346356
.teach_note =
357+
References in statics and constants may only refer to immutable values.
358+
359+
347360
Statics are shared everywhere, and if they refer to mutable data one might violate memory
348361
safety since holding multiple mutable references to shared data is not allowed.
349362
350363
351364
If you really want global mutable state, try using static mut or a global UnsafeCell.
352365
353-
const_eval_unallowed_mutable_refs_raw =
354-
raw mutable references are not allowed in the final value of {const_eval_const_context}s
366+
const_eval_unallowed_mutable_refs =
367+
mutable references are not allowed in the final value of {const_eval_const_context}s
355368
.teach_note =
356-
References in statics and constants may only refer to immutable values.
357-
358-
359369
Statics are shared everywhere, and if they refer to mutable data one might violate memory
360370
safety since holding multiple mutable references to shared data is not allowed.
361371
@@ -392,9 +402,6 @@ const_eval_unstable_in_stable =
392402
.unstable_sugg = if it is not part of the public API, make this function unstably const
393403
.bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
394404
395-
const_eval_unsupported_untyped_pointer = unsupported untyped pointer in constant
396-
.note = memory only reachable via raw pointers is not supported
397-
398405
const_eval_unterminated_c_string =
399406
reading a null-terminated string starting at {$pointer} with no null found before end of allocation
400407
@@ -406,7 +413,6 @@ const_eval_upcast_mismatch =
406413
407414
## The `front_matter`s here refer to either `const_eval_front_matter_invalid_value` or `const_eval_front_matter_invalid_value_with_path`.
408415
## (We'd love to sort this differently to make that more clear but tidy won't let us...)
409-
const_eval_validation_box_to_mut = {$front_matter}: encountered a box pointing to mutable memory in a constant
410416
const_eval_validation_box_to_static = {$front_matter}: encountered a box pointing to a static variable in a constant
411417
const_eval_validation_box_to_uninhabited = {$front_matter}: encountered a box pointing to uninhabited type {$ty}
412418
const_eval_validation_dangling_box_no_provenance = {$front_matter}: encountered a dangling box ({$pointer} has no provenance)
@@ -441,7 +447,8 @@ const_eval_validation_invalid_fn_ptr = {$front_matter}: encountered {$value}, bu
441447
const_eval_validation_invalid_ref_meta = {$front_matter}: encountered invalid reference metadata: total size is bigger than largest supported object
442448
const_eval_validation_invalid_ref_slice_meta = {$front_matter}: encountered invalid reference metadata: slice is bigger than largest supported object
443449
const_eval_validation_invalid_vtable_ptr = {$front_matter}: encountered {$value}, but expected a vtable pointer
444-
const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in a `const`
450+
const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in a `const` or `static`
451+
const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory
445452
const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!`
446453
const_eval_validation_null_box = {$front_matter}: encountered a null box
447454
const_eval_validation_null_fn_ptr = {$front_matter}: encountered a null function pointer
@@ -451,15 +458,14 @@ const_eval_validation_out_of_range = {$front_matter}: encountered {$value}, but
451458
const_eval_validation_partial_pointer = {$front_matter}: encountered a partial pointer or a mix of pointers
452459
const_eval_validation_pointer_as_int = {$front_matter}: encountered a pointer, but {$expected}
453460
const_eval_validation_ptr_out_of_range = {$front_matter}: encountered a pointer, but expected something that cannot possibly fail to be {$in_range}
454-
const_eval_validation_ref_to_mut = {$front_matter}: encountered a reference pointing to mutable memory in a constant
455461
const_eval_validation_ref_to_static = {$front_matter}: encountered a reference pointing to a static variable in a constant
456462
const_eval_validation_ref_to_uninhabited = {$front_matter}: encountered a reference pointing to uninhabited type {$ty}
457463
const_eval_validation_unaligned_box = {$front_matter}: encountered an unaligned box (required {$required_bytes} byte alignment but found {$found_bytes})
458464
const_eval_validation_unaligned_ref = {$front_matter}: encountered an unaligned reference (required {$required_bytes} byte alignment but found {$found_bytes})
459465
const_eval_validation_uninhabited_enum_variant = {$front_matter}: encountered an uninhabited enum variant
460466
const_eval_validation_uninhabited_val = {$front_matter}: encountered a value of uninhabited type `{$ty}`
461467
const_eval_validation_uninit = {$front_matter}: encountered uninitialized memory, but {$expected}
462-
const_eval_validation_unsafe_cell = {$front_matter}: encountered `UnsafeCell` in a `const`
468+
const_eval_validation_unsafe_cell = {$front_matter}: encountered `UnsafeCell` in read-only memory
463469
464470
const_eval_write_through_immutable_pointer =
465471
writing through a pointer that was derived from a shared (immutable) reference

0 commit comments

Comments
 (0)