Skip to content

Commit 21d7eba

Browse files
authored
Merge branch 'rust-lang:master' into cstr-bytes-iter
2 parents 20c2d6a + cae4a84 commit 21d7eba

File tree

2,992 files changed

+56440
-32197
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,992 files changed

+56440
-32197
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
defaults:
6666
run:
6767
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68-
timeout-minutes: 600
68+
timeout-minutes: 240
6969
env:
7070
CI_JOB_NAME: ${{ matrix.image }}
7171
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ build/
5050
/target
5151
/src/bootstrap/target
5252
/src/tools/x/target
53+
/inc-fat/
5354
# Created by default with `src/ci/docker/run.sh`
5455
/obj/
5556
/rustc-ice*

.ignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Make vscode *not* count `config.toml` as ignored, so it is included in search
2+
!/config.toml

.reuse/dep5

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Files: compiler/*
3636
.gitignore
3737
.gitmodules
3838
.mailmap
39+
.ignore
3940
Copyright: The Rust Project Developers (see https://thanks.rust-lang.org)
4041
License: MIT or Apache-2.0
4142

Cargo.lock

+45-10
Original file line numberDiff line numberDiff line change
@@ -3141,7 +3141,19 @@ dependencies = [
31413141
"bitflags 2.5.0",
31423142
"getopts",
31433143
"memchr",
3144-
"pulldown-cmark-escape",
3144+
"pulldown-cmark-escape 0.10.1",
3145+
"unicase",
3146+
]
3147+
3148+
[[package]]
3149+
name = "pulldown-cmark"
3150+
version = "0.11.0"
3151+
source = "registry+https://github.com/rust-lang/crates.io-index"
3152+
checksum = "8746739f11d39ce5ad5c2520a9b75285310dbfe78c541ccf832d38615765aec0"
3153+
dependencies = [
3154+
"bitflags 2.5.0",
3155+
"memchr",
3156+
"pulldown-cmark-escape 0.11.0",
31453157
"unicase",
31463158
]
31473159

@@ -3151,6 +3163,12 @@ version = "0.10.1"
31513163
source = "registry+https://github.com/rust-lang/crates.io-index"
31523164
checksum = "bd348ff538bc9caeda7ee8cad2d1d48236a1f443c1fa3913c6a02fe0043b1dd3"
31533165

3166+
[[package]]
3167+
name = "pulldown-cmark-escape"
3168+
version = "0.11.0"
3169+
source = "registry+https://github.com/rust-lang/crates.io-index"
3170+
checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
3171+
31543172
[[package]]
31553173
name = "pulldown-cmark-to-cmark"
31563174
version = "13.0.0"
@@ -3401,6 +3419,8 @@ name = "run_make_support"
34013419
version = "0.2.0"
34023420
dependencies = [
34033421
"ar",
3422+
"bstr",
3423+
"build_helper",
34043424
"gimli 0.28.1",
34053425
"object 0.34.0",
34063426
"regex",
@@ -3460,6 +3480,13 @@ dependencies = [
34603480
"stable_mir",
34613481
]
34623482

3483+
[[package]]
3484+
name = "rustc-perf-wrapper"
3485+
version = "0.1.0"
3486+
dependencies = [
3487+
"clap",
3488+
]
3489+
34633490
[[package]]
34643491
name = "rustc-rayon"
34653492
version = "0.5.0"
@@ -3488,6 +3515,12 @@ version = "1.1.0"
34883515
source = "registry+https://github.com/rust-lang/crates.io-index"
34893516
checksum = "5be1bdc7edf596692617627bbfeaba522131b18e06ca4df2b6b689e3c5d5ce84"
34903517

3518+
[[package]]
3519+
name = "rustc-stable-hash"
3520+
version = "0.1.0"
3521+
source = "registry+https://github.com/rust-lang/crates.io-index"
3522+
checksum = "e5c9f15eec8235d7cb775ee6f81891db79b98fd54ba1ad8fae565b88ef1ae4e2"
3523+
34913524
[[package]]
34923525
name = "rustc-std-workspace-alloc"
34933526
version = "1.99.0"
@@ -3826,6 +3859,7 @@ dependencies = [
38263859
"portable-atomic",
38273860
"rustc-hash",
38283861
"rustc-rayon",
3862+
"rustc-stable-hash",
38293863
"rustc_arena",
38303864
"rustc_graphviz",
38313865
"rustc_index",
@@ -4142,8 +4176,10 @@ dependencies = [
41424176
"rustc_index",
41434177
"rustc_macros",
41444178
"rustc_middle",
4179+
"rustc_next_trait_solver",
41454180
"rustc_span",
41464181
"rustc_target",
4182+
"rustc_type_ir",
41474183
"smallvec",
41484184
"tracing",
41494185
]
@@ -4596,7 +4632,7 @@ name = "rustc_resolve"
45964632
version = "0.0.0"
45974633
dependencies = [
45984634
"bitflags 2.5.0",
4599-
"pulldown-cmark 0.9.6",
4635+
"pulldown-cmark 0.11.0",
46004636
"rustc_arena",
46014637
"rustc_ast",
46024638
"rustc_ast_pretty",
@@ -4675,6 +4711,8 @@ name = "rustc_smir"
46754711
version = "0.0.0"
46764712
dependencies = [
46774713
"rustc_abi",
4714+
"rustc_ast",
4715+
"rustc_ast_pretty",
46784716
"rustc_data_structures",
46794717
"rustc_hir",
46804718
"rustc_middle",
@@ -4750,8 +4788,6 @@ checksum = "8ba09476327c4b70ccefb6180f046ef588c26a24cf5d269a9feba316eb4f029f"
47504788
name = "rustc_trait_selection"
47514789
version = "0.0.0"
47524790
dependencies = [
4753-
"bitflags 2.5.0",
4754-
"derivative",
47554791
"itertools",
47564792
"rustc_ast",
47574793
"rustc_ast_ir",
@@ -4760,7 +4796,6 @@ dependencies = [
47604796
"rustc_errors",
47614797
"rustc_fluent_macro",
47624798
"rustc_hir",
4763-
"rustc_index",
47644799
"rustc_infer",
47654800
"rustc_macros",
47664801
"rustc_middle",
@@ -4773,7 +4808,6 @@ dependencies = [
47734808
"rustc_target",
47744809
"rustc_transmute",
47754810
"rustc_type_ir",
4776-
"rustc_type_ir_macros",
47774811
"smallvec",
47784812
"tracing",
47794813
]
@@ -4877,6 +4911,7 @@ dependencies = [
48774911
"indexmap",
48784912
"itertools",
48794913
"minifier",
4914+
"pulldown-cmark 0.9.6",
48804915
"regex",
48814916
"rustdoc-json-types",
48824917
"serde",
@@ -6331,9 +6366,9 @@ dependencies = [
63316366

63326367
[[package]]
63336368
name = "windows-bindgen"
6334-
version = "0.57.0"
6369+
version = "0.58.0"
63356370
source = "registry+https://github.com/rust-lang/crates.io-index"
6336-
checksum = "1ccb96113d6277ba543c0f77e1c5494af8094bf9daf9b85acdc3f1b620e7c7b4"
6371+
checksum = "91cd28d93c692351f3a6e5615567c56756e330bee1c99c6bdd57bfc5ab15f589"
63376372
dependencies = [
63386373
"proc-macro2",
63396374
"rayon",
@@ -6354,9 +6389,9 @@ dependencies = [
63546389

63556390
[[package]]
63566391
name = "windows-metadata"
6357-
version = "0.57.0"
6392+
version = "0.58.0"
63586393
source = "registry+https://github.com/rust-lang/crates.io-index"
6359-
checksum = "8308d076825b9d9e5abc64f8113e96d02b2aeeba869b20fdd65c7e70cda13dfc"
6394+
checksum = "2e837f3c3012cfe9e7086302a93f441a7999439be1ad4c530d55d2f6d2921809"
63606395

63616396
[[package]]
63626397
name = "windows-sys"

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ members = [
4444
"src/tools/rustdoc-gui-test",
4545
"src/tools/opt-dist",
4646
"src/tools/coverage-dump",
47+
"src/tools/rustc-perf-wrapper",
4748
]
4849

4950
exclude = [

INSTALL.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If building LLVM from source, you'll need additional tools:
4848
[LLVM's documentation](https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library)
4949
* `ninja`, or GNU `make` 3.81 or later (Ninja is recommended, especially on
5050
Windows)
51-
* `cmake` 3.13.4 or later
51+
* `cmake` version listed on [LLVM's documentation](https://llvm.org/docs/GettingStarted.html#software)
5252
* `libstdc++-static` may be required on some Linux distributions such as Fedora
5353
and Ubuntu
5454

@@ -215,7 +215,7 @@ python x.py build
215215

216216
Right now, building Rust only works with some known versions of Visual Studio.
217217
If you have a more recent version installed and the build system doesn't
218-
understand, you may need to force rustbuild to use an older version.
218+
understand, you may need to force bootstrap to use an older version.
219219
This can be done by manually calling the appropriate vcvars file before running
220220
the bootstrap.
221221

RELEASES.md

+158
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,161 @@
1+
Version 1.80 (2024-07-25)
2+
==========================
3+
4+
<a id="1.80-Language"></a>
5+
6+
Language
7+
--------
8+
- [Document maximum allocation size](https://github.com/rust-lang/rust/pull/116675/)
9+
- [Allow zero-byte offsets and ZST read/writes on arbitrary pointers](https://github.com/rust-lang/rust/pull/117329/)
10+
- [Support C23's variadics without a named parameter](https://github.com/rust-lang/rust/pull/124048/)
11+
- [Stabilize `exclusive_range_pattern` feature](https://github.com/rust-lang/rust/pull/124459/)
12+
- [Guarantee layout and ABI of `Result` in some scenarios](https://github.com/rust-lang/rust/pull/124870)
13+
14+
<a id="1.80-Compiler"></a>
15+
16+
Compiler
17+
--------
18+
- [Update cc crate to v1.0.97 allowing additional spectre mitigations on MSVC targets](https://github.com/rust-lang/rust/pull/124892/)
19+
- [Allow field reordering on types marked `repr(packed(1))`](https://github.com/rust-lang/rust/pull/125360/)
20+
- [Add a lint against never type fallback affecting unsafe code](https://github.com/rust-lang/rust/pull/123939/)
21+
- [Disallow cast with trailing braced macro in let-else](https://github.com/rust-lang/rust/pull/125049/)
22+
- [Expand `for_loops_over_fallibles` lint to lint on fallibles behind references.](https://github.com/rust-lang/rust/pull/125156/)
23+
- [self-contained linker: retry linking without `-fuse-ld=lld` on CCs that don't support it](https://github.com/rust-lang/rust/pull/125417/)
24+
- [Do not parse CVarArgs (`...`) as a type in trait bounds](https://github.com/rust-lang/rust/pull/125863/)
25+
- Improvements to LLDB formatting [#124458](https://github.com/rust-lang/rust/pull/124458) [#124500](https://github.com/rust-lang/rust/pull/124500)
26+
- [For the wasm32-wasip2 target default to PIC and do not use `-fuse-ld=lld`](https://github.com/rust-lang/rust/pull/124858/)
27+
- [Add x86_64-unknown-linux-none as a tier 3 target](https://github.com/rust-lang/rust/pull/125023/)
28+
- [Lint on `foo.into_iter()` resolving to `&Box<[T]>: IntoIterator`](https://github.com/rust-lang/rust/pull/124097/)
29+
30+
<a id="1.80-Libraries"></a>
31+
32+
Libraries
33+
---------
34+
- [Add `size_of` and `size_of_val` and `align_of` and `align_of_val` to the prelude](https://github.com/rust-lang/rust/pull/123168/)
35+
- [Abort a process when FD ownership is violated](https://github.com/rust-lang/rust/pull/124210/)
36+
- [io::Write::write_fmt: panic if the formatter fails when the stream does not fail](https://github.com/rust-lang/rust/pull/125012/)
37+
- [Panic if `PathBuf::set_extension` would add a path separator](https://github.com/rust-lang/rust/pull/125070/)
38+
- [Add assert_unsafe_precondition to unchecked_{add,sub,neg,mul,shl,shr} methods](https://github.com/rust-lang/rust/pull/121571/)
39+
- [Update `c_char` on AIX to use the correct type](https://github.com/rust-lang/rust/pull/122986/)
40+
- [`offset_of!` no longer returns a temporary](https://github.com/rust-lang/rust/pull/124484/)
41+
- [Handle sigma in `str.to_lowercase` correctly](https://github.com/rust-lang/rust/pull/124773/)
42+
- [Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB](https://github.com/rust-lang/rust/pull/126059/)
43+
44+
<a id="1.80-Stabilized-APIs"></a>
45+
46+
Stabilized APIs
47+
---------------
48+
- [`impl Default for Rc<CStr>`](https://doc.rust-lang.org/beta/alloc/rc/struct.Rc.html#impl-Default-for-Rc%3CCStr%3E)
49+
- [`impl Default for Rc<str>`](https://doc.rust-lang.org/beta/alloc/rc/struct.Rc.html#impl-Default-for-Rc%3Cstr%3E)
50+
- [`impl Default for Rc<[T]>`](https://doc.rust-lang.org/beta/alloc/rc/struct.Rc.html#impl-Default-for-Rc%3C%5BT%5D%3E)
51+
- [`impl Default for Arc<str>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3Cstr%3E)
52+
- [`impl Default for Arc<CStr>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3CCStr%3E)
53+
- [`impl Default for Arc<[T]>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3C%5BT%5D%3E)
54+
- [`impl IntoIterator for Box<[T]>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-IntoIterator-for-Box%3C%5BI%5D,+A%3E)
55+
- [`impl FromIterator<String> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3CString%3E-for-Box%3Cstr%3E)
56+
- [`impl FromIterator<char> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3Cchar%3E-for-Box%3Cstr%3E)
57+
- [`LazyCell`](https://doc.rust-lang.org/beta/core/cell/struct.LazyCell.html)
58+
- [`LazyLock`](https://doc.rust-lang.org/beta/std/sync/struct.LazyLock.html)
59+
- [`Duration::div_duration_f32`](https://doc.rust-lang.org/beta/std/time/struct.Duration.html#method.div_duration_f32)
60+
- [`Duration::div_duration_f64`](https://doc.rust-lang.org/beta/std/time/struct.Duration.html#method.div_duration_f64)
61+
- [`Option::take_if`](https://doc.rust-lang.org/beta/std/option/enum.Option.html#method.take_if)
62+
- [`Seek::seek_relative`](https://doc.rust-lang.org/beta/std/io/trait.Seek.html#method.seek_relative)
63+
- [`BinaryHeap::as_slice`](https://doc.rust-lang.org/beta/std/collections/struct.BinaryHeap.html#method.as_slice)
64+
- [`NonNull::offset`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.offset)
65+
- [`NonNull::byte_offset`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_offset)
66+
- [`NonNull::add`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.add)
67+
- [`NonNull::byte_add`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_add)
68+
- [`NonNull::sub`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.sub)
69+
- [`NonNull::byte_sub`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_sub)
70+
- [`NonNull:offset_from`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.offset_from)
71+
- [`NonNull::byte_offset_from`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_offset_from)
72+
- [`NonNull::read`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.read)
73+
- [`NonNull::read_volatile`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.read_volatile)
74+
- [`NonNull::read_unaligned`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.read_unaligned)
75+
- [`NonNull::write`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write)
76+
- [`NonNull::write_volatile`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write_volatile)
77+
- [`NonNull::write_unaligned`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write_unaligned)
78+
- [`NonNull::write_bytes`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write_bytes)
79+
- [`NonNull::copy_to`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_to)
80+
- [`NonNull::copy_to_nonoverlapping`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_to_nonoverlapping)
81+
- [`NonNull::copy_from`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_from)
82+
- [`NonNull::copy_from_nonoverlapping`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_from_nonoverlapping)
83+
- [`NonNull::replace`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.replace)
84+
- [`NonNull::swap`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.swap)
85+
- [`NonNull::drop_in_place`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.drop_in_place)
86+
- [`NonNull::align_offset`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.align_offset)
87+
- [`<[T]>::split_at_checked`](https://doc.rust-lang.org/beta/std/primitive.slice.html#method.split_at_checked)
88+
- [`<[T]>::split_at_mut_checked`](https://doc.rust-lang.org/beta/std/primitive.slice.html#method.split_at_mut_checked)
89+
- [`str::split_at_checked`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.split_at_checked)
90+
- [`str::split_at_mut_checked`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.split_at_mut_checked)
91+
- [`str::trim_ascii`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.trim_ascii)
92+
- [`str::trim_ascii_start`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.trim_ascii_start)
93+
- [`str::trim_ascii_end`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.trim_ascii_end)
94+
- [`<[AsciiChar]>::trim_ascii`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.trim_ascii)
95+
- [`<[AsciiChar]>::trim_ascii_start`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.trim_ascii_start)
96+
- [`<[AsciiChar]>::trim_ascii_end`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.trim_ascii_end)
97+
- [`Ipv4Addr::BITS`](https://doc.rust-lang.org/beta/core/net/struct.Ipv4Addr.html#associatedconstant.BITS)
98+
- [`Ipv4Addr::to_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv4Addr.html#method.to_bits)
99+
- [`Ipv4Addr::from_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv4Addr.html#method.from_bits)
100+
- [`Ipv6Addr::BITS`](https://doc.rust-lang.org/beta/core/net/struct.Ipv6Addr.html#associatedconstant.BITS)
101+
- [`Ipv6Addr::to_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv6Addr.html#method.to_bits)
102+
- [`Ipv6Addr::from_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv6Addr.html#method.from_bits)
103+
- [`Vec::<[T; N]>::into_flattened`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html#method.into_flattened)
104+
- [`<[[T; N]]>::as_flattened`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.as_flattened)
105+
- [`<[[T; N]]>::as_flattened_mut`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.as_flattened_mut)
106+
107+
These APIs are now stable in const contexts:
108+
109+
- [`<[T]>::last_chunk`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.last_chunk)
110+
- [`BinaryHeap::new`](https://doc.rust-lang.org/beta/std/collections/struct.BinaryHeap.html#method.new)
111+
112+
<a id="1.80-Cargo"></a>
113+
114+
Cargo
115+
-----
116+
- [Stabilize `-Zcheck-cfg` as always enabled](https://github.com/rust-lang/cargo/pull/13571/)
117+
- [Warn, rather than fail publish, if a target is excluded](https://github.com/rust-lang/cargo/pull/13713/)
118+
- [Add special `check-cfg` lint config for the `unexpected_cfgs` lint](https://github.com/rust-lang/cargo/pull/13913/)
119+
- [Stabilize `cargo update --precise <yanked>`](https://github.com/rust-lang/cargo/pull/13974/)
120+
- [Don't change file permissions on `Cargo.toml` when using `cargo add`](https://github.com/rust-lang/cargo/pull/13898/)
121+
- [Support using `cargo fix` on IPv6-only networks](https://github.com/rust-lang/cargo/pull/13907/)
122+
123+
<a id="1.80-Rustdoc"></a>
124+
125+
Rustdoc
126+
-----
127+
128+
- [Allow searching for references](https://github.com/rust-lang/rust/pull/124148/)
129+
- [Stabilize `custom_code_classes_in_docs` feature](https://github.com/rust-lang/rust/pull/124577/)
130+
- [fix: In cross-crate scenarios show enum variants on type aliases of enums](https://github.com/rust-lang/rust/pull/125300/)
131+
132+
<a id="1.80-Compatibility-Notes"></a>
133+
134+
Compatibility Notes
135+
-------------------
136+
- [rustfmt estimates line lengths differently when using non-ascii characters](https://github.com/rust-lang/rustfmt/issues/6203)
137+
- [Type aliases are now handled correctly in orphan check](https://github.com/rust-lang/rust/pull/117164/)
138+
- [Allow instructing rustdoc to read from stdin via `-`](https://github.com/rust-lang/rust/pull/124611/)
139+
- [`std::env::{set_var, remove_var}` can no longer be converted to safe function pointers and no longer implement the `Fn` family of traits](https://github.com/rust-lang/rust/pull/124636)
140+
- [Warn (or error) when `Self` constructor from outer item is referenced in inner nested item](https://github.com/rust-lang/rust/pull/124187/)
141+
- [Turn `indirect_structural_match` and `pointer_structural_match` lints into hard errors](https://github.com/rust-lang/rust/pull/124661/)
142+
- [Make `where_clause_object_safety` lint a regular object safety violation](https://github.com/rust-lang/rust/pull/125380/)
143+
- [Turn `proc_macro_back_compat` lint into a hard error.](https://github.com/rust-lang/rust/pull/125596/)
144+
- [Detect unused structs even when implementing private traits](https://github.com/rust-lang/rust/pull/122382/)
145+
- [`std::sync::ReentrantLockGuard<T>` is no longer `Sync` if `T: !Sync`](https://github.com/rust-lang/rust/pull/125527) which means [`std::io::StdoutLock` and `std::io::StderrLock` are no longer Sync](https://github.com/rust-lang/rust/issues/127340)
146+
147+
<a id="1.80-Internal-Changes"></a>
148+
149+
Internal Changes
150+
----------------
151+
152+
These changes do not affect any public interfaces of Rust, but they represent
153+
significant improvements to the performance or internals of rustc and related
154+
tools.
155+
156+
- Misc improvements to size of generated html by rustdoc e.g. [#124738](https://github.com/rust-lang/rust/pull/124738/) and [#123734](https://github.com/rust-lang/rust/pull/123734/)
157+
- [MSVC targets no longer depend on libc](https://github.com/rust-lang/rust/pull/124050/)
158+
1159
Version 1.79.0 (2024-06-13)
2160
==========================
3161

compiler/rustc_abi/src/layout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ pub trait LayoutCalculator {
186186
let (present_first, present_second) = {
187187
let mut present_variants = variants
188188
.iter_enumerated()
189-
.filter_map(|(i, v)| if absent(v) { None } else { Some(i) });
189+
.filter_map(|(i, v)| if !repr.c() && absent(v) { None } else { Some(i) });
190190
(present_variants.next(), present_variants.next())
191191
};
192192
let present_first = match present_first {
@@ -621,7 +621,7 @@ where
621621
let discr_type = repr.discr_type();
622622
let bits = Integer::from_attr(dl, discr_type).size().bits();
623623
for (i, mut val) in discriminants {
624-
if variants[i].iter().any(|f| f.abi.is_uninhabited()) {
624+
if !repr.c() && variants[i].iter().any(|f| f.abi.is_uninhabited()) {
625625
continue;
626626
}
627627
if discr_type.is_signed() {

0 commit comments

Comments
 (0)