Skip to content

Commit 0c9c489

Browse files
authored
Merge pull request rust-lang#19169 from lnicola/sync-from-rust
minor: Sync from downstream
2 parents 2a0d16f + 952bfae commit 0c9c489

File tree

2,812 files changed

+29745
-19960
lines changed

Some content is hidden

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

2,812 files changed

+29745
-19960
lines changed

Diff for: .editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12+
13+
[!src/llvm-project]
1214
indent_style = space
1315
indent_size = 4
1416

Diff for: .git-blame-ignore-revs

+2
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
2929
99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad
3030
# reformat with rustfmt edition 2024
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
32+
# reformat with updated edition 2024
33+
1fcae03369abb4c2cc180cd5a49e1f4440a81300

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ no_llvm_build
5454
/library/target
5555
/src/bootstrap/target
5656
/src/tools/x/target
57+
# Created by `x vendor`
58+
/vendor
5759
# Created by default with `src/ci/docker/run.sh`
5860
/obj/
5961
# Created by nix dev shell / .envrc

Diff for: Cargo.lock

+16-47
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ version = "0.1.0"
420420

421421
[[package]]
422422
name = "cc"
423-
version = "1.2.7"
423+
version = "1.2.13"
424424
source = "registry+https://github.com/rust-lang/crates.io-index"
425-
checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7"
425+
checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
426426
dependencies = [
427427
"shlex",
428428
]
@@ -1209,16 +1209,6 @@ dependencies = [
12091209
"tidy",
12101210
]
12111211

1212-
[[package]]
1213-
name = "field-offset"
1214-
version = "0.3.6"
1215-
source = "registry+https://github.com/rust-lang/crates.io-index"
1216-
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
1217-
dependencies = [
1218-
"memoffset",
1219-
"rustc_version",
1220-
]
1221-
12221212
[[package]]
12231213
name = "filetime"
12241214
version = "0.2.25"
@@ -2007,7 +1997,7 @@ dependencies = [
20071997
"anyhow",
20081998
"clap",
20091999
"fs-err",
2010-
"rustc-hash 2.1.0",
2000+
"rustc-hash 2.1.1",
20112001
"rustdoc-json-types",
20122002
"serde",
20132003
"serde_json",
@@ -2295,15 +2285,6 @@ dependencies = [
22952285
"libc",
22962286
]
22972287

2298-
[[package]]
2299-
name = "memoffset"
2300-
version = "0.9.1"
2301-
source = "registry+https://github.com/rust-lang/crates.io-index"
2302-
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
2303-
dependencies = [
2304-
"autocfg",
2305-
]
2306-
23072288
[[package]]
23082289
name = "mime"
23092290
version = "0.3.17"
@@ -3207,7 +3188,7 @@ dependencies = [
32073188
"proc-macro2",
32083189
"quote",
32093190
"rinja_parser",
3210-
"rustc-hash 2.1.0",
3191+
"rustc-hash 2.1.1",
32113192
"serde",
32123193
"syn 2.0.96",
32133194
]
@@ -3271,9 +3252,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
32713252

32723253
[[package]]
32733254
name = "rustc-hash"
3274-
version = "2.1.0"
3255+
version = "2.1.1"
32753256
source = "registry+https://github.com/rust-lang/crates.io-index"
3276-
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
3257+
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
32773258

32783259
[[package]]
32793260
name = "rustc-main"
@@ -3336,7 +3317,6 @@ dependencies = [
33363317
"rand 0.8.5",
33373318
"rand_xoshiro",
33383319
"rustc_data_structures",
3339-
"rustc_feature",
33403320
"rustc_index",
33413321
"rustc_macros",
33423322
"rustc_serialize",
@@ -3398,6 +3378,7 @@ dependencies = [
33983378
"rustc_ast_pretty",
33993379
"rustc_data_structures",
34003380
"rustc_errors",
3381+
"rustc_feature",
34013382
"rustc_fluent_macro",
34023383
"rustc_hir",
34033384
"rustc_index",
@@ -3428,7 +3409,6 @@ dependencies = [
34283409
"rustc_parse",
34293410
"rustc_session",
34303411
"rustc_span",
3431-
"rustc_target",
34323412
"thin-vec",
34333413
]
34343414

@@ -3673,7 +3653,7 @@ dependencies = [
36733653
"memmap2",
36743654
"parking_lot",
36753655
"portable-atomic",
3676-
"rustc-hash 2.1.0",
3656+
"rustc-hash 2.1.1",
36773657
"rustc-rayon",
36783658
"rustc-stable-hash",
36793659
"rustc_arena",
@@ -3702,6 +3682,7 @@ version = "0.0.0"
37023682
dependencies = [
37033683
"ctrlc",
37043684
"libc",
3685+
"rustc_abi",
37053686
"rustc_ast",
37063687
"rustc_ast_lowering",
37073688
"rustc_ast_passes",
@@ -4173,7 +4154,6 @@ version = "0.0.0"
41734154
dependencies = [
41744155
"bitflags",
41754156
"either",
4176-
"field-offset",
41774157
"gsgdt",
41784158
"polonius-engine",
41794159
"rustc-rayon-core",
@@ -4357,6 +4337,7 @@ version = "0.0.0"
43574337
dependencies = [
43584338
"rustc_abi",
43594339
"rustc_ast",
4340+
"rustc_ast_lowering",
43604341
"rustc_ast_pretty",
43614342
"rustc_attr_parsing",
43624343
"rustc_data_structures",
@@ -4380,7 +4361,7 @@ dependencies = [
43804361
name = "rustc_pattern_analysis"
43814362
version = "0.0.0"
43824363
dependencies = [
4383-
"rustc-hash 2.1.0",
4364+
"rustc-hash 2.1.1",
43844365
"rustc_abi",
43854366
"rustc_apfloat",
43864367
"rustc_arena",
@@ -4421,7 +4402,6 @@ dependencies = [
44214402
name = "rustc_query_impl"
44224403
version = "0.0.0"
44234404
dependencies = [
4424-
"field-offset",
44254405
"measureme",
44264406
"rustc_data_structures",
44274407
"rustc_errors",
@@ -4442,6 +4422,7 @@ version = "0.0.0"
44424422
dependencies = [
44434423
"parking_lot",
44444424
"rustc-rayon-core",
4425+
"rustc_abi",
44454426
"rustc_ast",
44464427
"rustc_data_structures",
44474428
"rustc_errors",
@@ -4453,7 +4434,6 @@ dependencies = [
44534434
"rustc_serialize",
44544435
"rustc_session",
44554436
"rustc_span",
4456-
"rustc_target",
44574437
"smallvec",
44584438
"thin-vec",
44594439
"tracing",
@@ -4776,7 +4756,7 @@ name = "rustdoc-json-types"
47764756
version = "0.1.0"
47774757
dependencies = [
47784758
"bincode",
4779-
"rustc-hash 2.1.0",
4759+
"rustc-hash 2.1.1",
47804760
"serde",
47814761
"serde_json",
47824762
]
@@ -5427,7 +5407,7 @@ dependencies = [
54275407
"ignore",
54285408
"miropt-test-tools",
54295409
"regex",
5430-
"rustc-hash 2.1.0",
5410+
"rustc-hash 2.1.1",
54315411
"semver",
54325412
"serde",
54335413
"similar",
@@ -6215,16 +6195,11 @@ dependencies = [
62156195

62166196
[[package]]
62176197
name = "windows-bindgen"
6218-
version = "0.58.0"
6198+
version = "0.59.0"
62196199
source = "registry+https://github.com/rust-lang/crates.io-index"
6220-
checksum = "91cd28d93c692351f3a6e5615567c56756e330bee1c99c6bdd57bfc5ab15f589"
6200+
checksum = "9b7fb600834d7e868f6e5bb748a86101427330fafbf9485c331b9d5f562d54a5"
62216201
dependencies = [
6222-
"proc-macro2",
62236202
"rayon",
6224-
"serde",
6225-
"serde_json",
6226-
"syn 2.0.96",
6227-
"windows-metadata",
62286203
]
62296204

62306205
[[package]]
@@ -6305,12 +6280,6 @@ dependencies = [
63056280
"syn 2.0.96",
63066281
]
63076282

6308-
[[package]]
6309-
name = "windows-metadata"
6310-
version = "0.58.0"
6311-
source = "registry+https://github.com/rust-lang/crates.io-index"
6312-
checksum = "2e837f3c3012cfe9e7086302a93f441a7999439be1ad4c530d55d2f6d2921809"
6313-
63146283
[[package]]
63156284
name = "windows-result"
63166285
version = "0.1.2"

Diff for: RELEASES.md

+127
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,130 @@
1+
Version 1.85.0 (2025-02-20)
2+
==========================
3+
4+
<a id="1.85.0-Language"></a>
5+
6+
Language
7+
--------
8+
- [The 2024 Edition is now stable.](https://github.com/rust-lang/rust/pull/133349)
9+
See [the edition guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html) for more details.
10+
- [Stabilize async closures](https://github.com/rust-lang/rust/pull/132706)
11+
See [RFC 3668](https://rust-lang.github.io/rfcs/3668-async-closures.html) for more details.
12+
- [Stabilize `#[diagnostic::do_not_recommend]`](https://github.com/rust-lang/rust/pull/132056)
13+
- [Add `unpredictable_function_pointer_comparisons` lint to warn against function pointer comparisons](https://github.com/rust-lang/rust/pull/118833)
14+
- [Lint on combining `#[no_mangle]` and `#[export_name]` attributes.](https://github.com/rust-lang/rust/pull/131558)
15+
16+
<a id="1.85.0-Compiler"></a>
17+
18+
Compiler
19+
--------
20+
- [The unstable flag `-Zpolymorphize` has been removed](https://github.com/rust-lang/rust/pull/133883), see https://github.com/rust-lang/compiler-team/issues/810 for some background.
21+
22+
<a id="1.85.0-Platform-Support"></a>
23+
24+
Platform Support
25+
----------------
26+
- [Promote `powerpc64le-unknown-linux-musl` to tier 2 with host tools](https://github.com/rust-lang/rust/pull/133801)
27+
28+
Refer to Rust's [platform support page][platform-support-doc]
29+
for more information on Rust's tiered platform support.
30+
31+
<a id="1.85.0-Libraries"></a>
32+
33+
Libraries
34+
---------
35+
- [Panics in the standard library now have a leading `library/` in their path](https://github.com/rust-lang/rust/pull/132390)
36+
- [`std::env::home_dir()` on Windows now ignores the non-standard `$HOME` environment variable](https://github.com/rust-lang/rust/pull/132515)
37+
It will be un-deprecated in a subsequent release.
38+
- [Add `AsyncFn*` to the prelude in all editions.](https://github.com/rust-lang/rust/pull/132611)
39+
40+
<a id="1.85.0-Stabilized-APIs"></a>
41+
42+
Stabilized APIs
43+
---------------
44+
45+
- [`BuildHasherDefault::new`](https://doc.rust-lang.org/stable/std/hash/struct.BuildHasherDefault.html#method.new)
46+
- [`ptr::fn_addr_eq`](https://doc.rust-lang.org/std/ptr/fn.fn_addr_eq.html)
47+
- [`io::ErrorKind::QuotaExceeded`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.QuotaExceeded)
48+
- [`io::ErrorKind::CrossesDevices`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.CrossesDevices)
49+
- [`{float}::midpoint`](https://doc.rust-lang.org/core/primitive.f32.html#method.midpoint)
50+
- [Unsigned `{integer}::midpoint`](https://doc.rust-lang.org/std/primitive.u64.html#method.midpoint)
51+
- [`NonZeroU*::midpoint`](https://doc.rust-lang.org/std/num/type.NonZeroU32.html#method.midpoint)
52+
- [impl `std::iter::Extend` for tuples with arity 1 through 12](https://doc.rust-lang.org/stable/std/iter/trait.Extend.html#impl-Extend%3C(A,)%3E-for-(EA,))
53+
- [`FromIterator<(A, ...)>` for tuples with arity 1 through 12](https://doc.rust-lang.org/stable/std/iter/trait.FromIterator.html#impl-FromIterator%3C(EA,)%3E-for-(A,))
54+
- [`std::task::Waker::noop`](https://doc.rust-lang.org/stable/std/task/struct.Waker.html#method.noop)
55+
56+
These APIs are now stable in const contexts:
57+
58+
- [`mem::size_of_val`](https://doc.rust-lang.org/stable/std/mem/fn.size_of_val.html)
59+
- [`mem::align_of_val`](https://doc.rust-lang.org/stable/std/mem/fn.align_of_val.html)
60+
- [`Layout::for_value`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.for_value)
61+
- [`Layout::align_to`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align_to)
62+
- [`Layout::pad_to_align`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.pad_to_align)
63+
- [`Layout::extend`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.extend)
64+
- [`Layout::array`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.array)
65+
- [`std::mem::swap`](https://doc.rust-lang.org/stable/std/mem/fn.swap.html)
66+
- [`std::ptr::swap`](https://doc.rust-lang.org/stable/std/ptr/fn.swap.html)
67+
- [`NonNull::new`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.new)
68+
- [`HashMap::with_hasher`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.with_hasher)
69+
- [`HashSet::with_hasher`](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.with_hasher)
70+
- [`BuildHasherDefault::new`](https://doc.rust-lang.org/stable/std/hash/struct.BuildHasherDefault.html#method.new)
71+
- [`<float>::recip`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.recip)
72+
- [`<float>::to_degrees`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.to_degrees)
73+
- [`<float>::to_radians`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.to_radians)
74+
- [`<float>::max`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.max)
75+
- [`<float>::min`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.min)
76+
- [`<float>::clamp`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp)
77+
- [`<float>::abs`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.abs)
78+
- [`<float>::signum`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.signum)
79+
- [`<float>::copysign`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign)
80+
- [`MaybeUninit::write`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.write)
81+
82+
<a id="1.85.0-Cargo"></a>
83+
84+
Cargo
85+
-----
86+
- [Add future-incompatibility warning against keywords in cfgs and add raw-idents](https://github.com/rust-lang/cargo/pull/14671/)
87+
- [Stabilize higher precedence trailing flags](https://github.com/rust-lang/cargo/pull/14900/)
88+
- [Pass `CARGO_CFG_FEATURE` to build scripts](https://github.com/rust-lang/cargo/pull/14902/)
89+
90+
<a id="1.85.0-Rustdoc"></a>
91+
92+
Rustdoc
93+
-----
94+
- [Doc comment on impl blocks shows the first line, even when the impl block is collapsed](https://github.com/rust-lang/rust/pull/132155)
95+
96+
<a id="1.85.0-Compatibility-Notes"></a>
97+
98+
Compatibility Notes
99+
-------------------
100+
- [`rustc` no longer treats the `test` cfg as a well known check-cfg](https://github.com/rust-lang/rust/pull/131729), instead it is up to the build systems and users of `--check-cfg`[^check-cfg] to set it as a well known cfg using `--check-cfg=cfg(test)`.
101+
This is done to enable build systems like Cargo to set it conditionally, as not all source files are suitable for unit tests.
102+
[Cargo (for now) unconditionally sets the `test` cfg as a well known cfg](https://github.com/rust-lang/cargo/pull/14963).
103+
[^check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
104+
- [Disable potentially incorrect type inference if there are trivial and non-trivial where-clauses](https://github.com/rust-lang/rust/pull/132325)
105+
- `std::env::home_dir()` has been deprecated for years, because it can give surprising results in some Windows configurations if the `HOME` environment variable is set (which is not the normal configuration on Windows). We had previously avoided changing its behavior, out of concern for compatibility with code depending on this non-standard configuration. Given how long this function has been deprecated, we're now fixing its behavior as a bugfix. A subsequent release will remove the deprecation for this function.
106+
- [Make `core::ffi::c_char` signedness more closely match that of the platform-default `char`](https://github.com/rust-lang/rust/pull/132975)
107+
This changed `c_char` from an `i8` to `u8` or vice versa on many Tier 2 and 3
108+
targets (mostly Arm and RISC-V embedded targets). The new definition may
109+
result in compilation failures but fixes compatibility issues with C.
110+
The `libc` crate matches this change as of its 0.2.169 release.
111+
- [When compiling a nested `macro_rules` macro from an external crate, the content of the inner `macro_rules` is now built with the edition of the external crate, not the local crate.](https://github.com/rust-lang/rust/pull/133274)
112+
- [Increase `sparcv9-sun-solaris` and `x86_64-pc-solaris` Solaris baseline to 11.4.](https://github.com/rust-lang/rust/pull/133293)
113+
- [Show `abi_unsupported_vector_types` lint in future breakage reports](https://github.com/rust-lang/rust/pull/133374)
114+
- [Error if multiple super-trait instantiations of `dyn Trait` need associated types to be specified but only one is provided](https://github.com/rust-lang/rust/pull/133392)
115+
- [Change `powerpc64-ibm-aix` default `codemodel` to large](https://github.com/rust-lang/rust/pull/133811)
116+
117+
<a id="1.85.0-Internal-Changes"></a>
118+
119+
Internal Changes
120+
----------------
121+
122+
These changes do not affect any public interfaces of Rust, but they represent
123+
significant improvements to the performance or internals of rustc and related
124+
tools.
125+
126+
- [Build `x86_64-unknown-linux-gnu` with LTO for C/C++ code (e.g., `jemalloc`)](https://github.com/rust-lang/rust/pull/134690)
127+
1128
Version 1.84.1 (2025-01-30)
2129
==========================
3130

Diff for: compiler/rustc_abi/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ bitflags = "2.4.1"
99
rand = { version = "0.8.4", default-features = false, optional = true }
1010
rand_xoshiro = { version = "0.6.0", optional = true }
1111
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
12-
rustc_feature = { path = "../rustc_feature", optional = true }
1312
rustc_index = { path = "../rustc_index", default-features = false }
1413
rustc_macros = { path = "../rustc_macros", optional = true }
1514
rustc_serialize = { path = "../rustc_serialize", optional = true }
@@ -24,7 +23,6 @@ default = ["nightly", "randomize"]
2423
# without depending on rustc_data_structures, rustc_macros and rustc_serialize
2524
nightly = [
2625
"dep:rustc_data_structures",
27-
"dep:rustc_feature",
2826
"dep:rustc_macros",
2927
"dep:rustc_serialize",
3028
"dep:rustc_span",

Diff for: compiler/rustc_abi/src/callconv.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[cfg(feature = "nightly")]
2-
use crate::{BackendRepr, FieldsShape, TyAbiInterface, TyAndLayout};
3-
use crate::{Primitive, Size, Variants};
2+
use crate::{BackendRepr, FieldsShape, Primitive, Size, TyAbiInterface, TyAndLayout, Variants};
43

54
mod reg;
65

0 commit comments

Comments
 (0)