Skip to content

Commit 86d6dc0

Browse files
authored
Merge pull request rust-lang#4070 from rust-lang/rustup-2024-12-04
Automatic Rustup
2 parents aaa4e75 + 76c27a9 commit 86d6dc0

File tree

1,616 files changed

+17650
-11776
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,616 files changed

+17650
-11776
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ no_llvm_build
4646
/inst/
4747
/llvm/
4848
/mingw-build/
49-
build/
50-
!/compiler/rustc_mir_build/src/build/
49+
/build
5150
/build-rust-analyzer/
5251
/dist/
5352
/unicode-downloads

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Jack Huey <[email protected]> <[email protected]>
254254
255255
Jacob Greenfield <[email protected]>
256256
257+
257258
Jake Vossen <[email protected]>
258259
259260
Jakob Lautrup Nysom <[email protected]>

Cargo.lock

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
536536

537537
[[package]]
538538
name = "clippy"
539-
version = "0.1.84"
539+
version = "0.1.85"
540540
dependencies = [
541541
"anstream",
542542
"cargo_metadata",
@@ -567,8 +567,9 @@ dependencies = [
567567

568568
[[package]]
569569
name = "clippy_config"
570-
version = "0.1.84"
570+
version = "0.1.85"
571571
dependencies = [
572+
"clippy_utils",
572573
"itertools",
573574
"serde",
574575
"toml 0.7.8",
@@ -580,6 +581,7 @@ name = "clippy_dev"
580581
version = "0.0.1"
581582
dependencies = [
582583
"aho-corasick",
584+
"chrono",
583585
"clap",
584586
"indoc",
585587
"itertools",
@@ -590,7 +592,7 @@ dependencies = [
590592

591593
[[package]]
592594
name = "clippy_lints"
593-
version = "0.1.84"
595+
version = "0.1.85"
594596
dependencies = [
595597
"arrayvec",
596598
"cargo_metadata",
@@ -613,12 +615,12 @@ dependencies = [
613615

614616
[[package]]
615617
name = "clippy_utils"
616-
version = "0.1.84"
618+
version = "0.1.85"
617619
dependencies = [
618620
"arrayvec",
619-
"clippy_config",
620621
"itertools",
621622
"rustc_apfloat",
623+
"serde",
622624
]
623625

624626
[[package]]
@@ -1875,16 +1877,6 @@ version = "1.0.11"
18751877
source = "registry+https://github.com/rust-lang/crates.io-index"
18761878
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
18771879

1878-
[[package]]
1879-
name = "jemalloc-sys"
1880-
version = "0.5.4+5.3.0-patched"
1881-
source = "registry+https://github.com/rust-lang/crates.io-index"
1882-
checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2"
1883-
dependencies = [
1884-
"cc",
1885-
"libc",
1886-
]
1887-
18881880
[[package]]
18891881
name = "jobserver"
18901882
version = "0.1.32"
@@ -2285,7 +2277,6 @@ dependencies = [
22852277
"ctrlc",
22862278
"directories",
22872279
"getrandom",
2288-
"jemalloc-sys",
22892280
"libc",
22902281
"libffi",
22912282
"libloading",
@@ -2295,6 +2286,7 @@ dependencies = [
22952286
"rustc_version",
22962287
"smallvec",
22972288
"tempfile",
2289+
"tikv-jemalloc-sys",
22982290
"ui_test",
22992291
"windows-sys 0.52.0",
23002292
]
@@ -3149,12 +3141,12 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
31493141
name = "rustc-main"
31503142
version = "0.0.0"
31513143
dependencies = [
3152-
"jemalloc-sys",
31533144
"rustc_codegen_ssa",
31543145
"rustc_driver",
31553146
"rustc_driver_impl",
31563147
"rustc_smir",
31573148
"stable_mir",
3149+
"tikv-jemalloc-sys",
31583150
]
31593151

31603152
[[package]]
@@ -3820,7 +3812,6 @@ dependencies = [
38203812
name = "rustc_index"
38213813
version = "0.0.0"
38223814
dependencies = [
3823-
"arrayvec",
38243815
"rustc_index_macros",
38253816
"rustc_macros",
38263817
"rustc_serialize",
@@ -4137,6 +4128,7 @@ name = "rustc_monomorphize"
41374128
version = "0.0.0"
41384129
dependencies = [
41394130
"rustc_abi",
4131+
"rustc_attr",
41404132
"rustc_data_structures",
41414133
"rustc_errors",
41424134
"rustc_fluent_macro",
@@ -4711,9 +4703,9 @@ checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
47114703

47124704
[[package]]
47134705
name = "ruzstd"
4714-
version = "0.7.2"
4706+
version = "0.7.3"
47154707
source = "registry+https://github.com/rust-lang/crates.io-index"
4716-
checksum = "99c3938e133aac070997ddc684d4b393777d293ba170f2988c8fd5ea2ad4ce21"
4708+
checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f"
47174709
dependencies = [
47184710
"twox-hash",
47194711
]
@@ -5258,6 +5250,16 @@ dependencies = [
52585250
name = "tier-check"
52595251
version = "0.1.0"
52605252

5253+
[[package]]
5254+
name = "tikv-jemalloc-sys"
5255+
version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
5256+
source = "registry+https://github.com/rust-lang/crates.io-index"
5257+
checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d"
5258+
dependencies = [
5259+
"cc",
5260+
"libc",
5261+
]
5262+
52615263
[[package]]
52625264
name = "time"
52635265
version = "0.3.36"
@@ -5801,17 +5803,20 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
58015803

58025804
[[package]]
58035805
name = "wasm-component-ld"
5804-
version = "0.5.10"
5806+
version = "0.5.11"
58055807
source = "registry+https://github.com/rust-lang/crates.io-index"
5806-
checksum = "4d4aa6bd7fbe7cffbed29fe3e236fda74419def1bdef6f80f989ec51137edf44"
5808+
checksum = "a2b05c3820968b335f10e703218459e4fd2cc91fdfc8f7936a993f1aacaa0938"
58075809
dependencies = [
58085810
"anyhow",
58095811
"clap",
58105812
"lexopt",
5813+
"libc",
58115814
"tempfile",
58125815
"wasi-preview1-component-adapter-provider",
58135816
"wasmparser 0.219.1",
58145817
"wat",
5818+
"windows-sys 0.59.0",
5819+
"winsplit",
58155820
"wit-component",
58165821
"wit-parser",
58175822
]
@@ -6183,6 +6188,12 @@ dependencies = [
61836188
"memchr",
61846189
]
61856190

6191+
[[package]]
6192+
name = "winsplit"
6193+
version = "0.1.0"
6194+
source = "registry+https://github.com/rust-lang/crates.io-index"
6195+
checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956"
6196+
61866197
[[package]]
61876198
name = "wit-component"
61886199
version = "0.219.1"

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Libraries
4343
- [Document that `catch_unwind` can deal with foreign exceptions without UB, although the exact behavior is unspecified.](https://github.com/rust-lang/rust/pull/128321)
4444
- [Implement `Default` for `HashMap`/`HashSet` iterators that don't already have it.](https://github.com/rust-lang/rust/pull/128711)
4545
- [Bump Unicode to version 16.0.0.](https://github.com/rust-lang/rust/pull/130183)
46-
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229).
46+
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229)
4747

4848

4949
<a id="1.83.0-Stabilized-APIs"></a>

compiler/rustc/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ rustc_smir = { path = "../rustc_smir" }
2020
stable_mir = { path = "../stable_mir" }
2121
# tidy-alphabetical-end
2222

23-
[dependencies.jemalloc-sys]
24-
version = "0.5.0"
23+
[dependencies.tikv-jemalloc-sys]
24+
version = "0.6.0"
2525
optional = true
2626
features = ['unprefixed_malloc_on_supported_platforms']
2727

2828
[features]
2929
# tidy-alphabetical-start
30-
jemalloc = ['dep:jemalloc-sys']
30+
jemalloc = ['dep:tikv-jemalloc-sys']
3131
llvm = ['rustc_driver_impl/llvm']
3232
max_level_info = ['rustc_driver_impl/max_level_info']
3333
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']

compiler/rustc/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ fn main() {
4343
{
4444
use std::os::raw::{c_int, c_void};
4545

46+
use tikv_jemalloc_sys as jemalloc_sys;
47+
4648
#[used]
4749
static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc;
4850
#[used]

compiler/rustc_abi/src/lib.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,15 @@ impl Scalar {
12151215
Scalar::Union { .. } => true,
12161216
}
12171217
}
1218+
1219+
/// Returns `true` if this is a signed integer scalar
1220+
#[inline]
1221+
pub fn is_signed(&self) -> bool {
1222+
match self.primitive() {
1223+
Primitive::Int(_, signed) => signed,
1224+
_ => false,
1225+
}
1226+
}
12181227
}
12191228

12201229
// NOTE: This struct is generic over the FieldIdx for rust-analyzer usage.
@@ -1401,10 +1410,7 @@ impl BackendRepr {
14011410
#[inline]
14021411
pub fn is_signed(&self) -> bool {
14031412
match self {
1404-
BackendRepr::Scalar(scal) => match scal.primitive() {
1405-
Primitive::Int(_, signed) => signed,
1406-
_ => false,
1407-
},
1413+
BackendRepr::Scalar(scal) => scal.is_signed(),
14081414
_ => panic!("`is_signed` on non-scalar ABI {self:?}"),
14091415
}
14101416
}
@@ -1499,7 +1505,11 @@ impl BackendRepr {
14991505
#[cfg_attr(feature = "nightly", derive(HashStable_Generic))]
15001506
pub enum Variants<FieldIdx: Idx, VariantIdx: Idx> {
15011507
/// Single enum variants, structs/tuples, unions, and all non-ADTs.
1502-
Single { index: VariantIdx },
1508+
Single {
1509+
/// Always 0 for non-enums/generators.
1510+
/// For enums without a variant, this is an invalid index!
1511+
index: VariantIdx,
1512+
},
15031513

15041514
/// Enum-likes with more than one variant: each variant comes with
15051515
/// a *discriminant* (usually the same as the variant index but the user can
@@ -1528,14 +1538,22 @@ pub enum TagEncoding<VariantIdx: Idx> {
15281538
/// The variant `untagged_variant` contains a niche at an arbitrary
15291539
/// offset (field `tag_field` of the enum), which for a variant with
15301540
/// discriminant `d` is set to
1531-
/// `(d - niche_variants.start).wrapping_add(niche_start)`.
1541+
/// `(d - niche_variants.start).wrapping_add(niche_start)`
1542+
/// (this is wrapping arithmetic using the type of the niche field).
15321543
///
15331544
/// For example, `Option<(usize, &T)>` is represented such that
15341545
/// `None` has a null pointer for the second tuple field, and
15351546
/// `Some` is the identity function (with a non-null reference).
1547+
///
1548+
/// Other variants that are not `untagged_variant` and that are outside the `niche_variants`
1549+
/// range cannot be represented; they must be uninhabited.
15361550
Niche {
15371551
untagged_variant: VariantIdx,
1552+
/// This range *may* contain `untagged_variant`; that is then just a "dead value" and
1553+
/// not used to encode anything.
15381554
niche_variants: RangeInclusive<VariantIdx>,
1555+
/// This is inbounds of the type of the niche field
1556+
/// (not sign-extended, i.e., all bits beyond the niche field size are 0).
15391557
niche_start: u128,
15401558
},
15411559
}

0 commit comments

Comments
 (0)