Skip to content

Commit a241cf1

Browse files
committed
Auto merge of rust-lang#127713 - matthiaskrgr:rollup-zxlyexf, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang#127083 (Add release notes for 1.80) - rust-lang#127322 (handle ci-rustc incompatible options during config parse) - rust-lang#127697 (use std for file mtime and atime modifications) - rust-lang#127704 (Fix minor typos in std::process doc on Win argv) - rust-lang#127710 (clarify the meaning of the version number for accepted/removed features) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0ffbddd + 82f13e7 commit a241cf1

File tree

12 files changed

+310
-21
lines changed

12 files changed

+310
-21
lines changed

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_feature/src/accepted.rs

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ declare_features! (
4242
// feature-group-start: accepted features
4343
// -------------------------------------------------------------------------
4444

45+
// Note that the version indicates when it got *stabilized*.
46+
// When moving an unstable feature here, set the version number to
47+
// `CURRENT RUSTC VERSION` with ` ` replaced by `_`.
48+
4549
/// Allows `#[target_feature(...)]` on aarch64 platforms
4650
(accepted, aarch64_target_feature, "1.61.0", Some(44839)),
4751
/// Allows using the `efiapi` ABI.

compiler/rustc_feature/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ use std::num::NonZero;
3131
#[derive(Debug, Clone)]
3232
pub struct Feature {
3333
pub name: Symbol,
34+
/// For unstable features: the version the feature was added in.
35+
/// For accepted features: the version the feature got stabilized in.
36+
/// For removed features we are inconsistent; sometimes this is the
37+
/// version it got added, sometimes the version it got removed.
3438
pub since: &'static str,
3539
issue: Option<NonZero<u32>>,
3640
}

compiler/rustc_feature/src/removed.rs

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ declare_features! (
3232
// feature-group-start: removed features
3333
// -------------------------------------------------------------------------
3434

35+
// Note that the version indicates when it got *removed*.
36+
// When moving an unstable feature here, set the version number to
37+
// `CURRENT RUSTC VERSION` with ` ` replaced by `_`.
38+
// (But not all features below do this properly; many indicate the
39+
// version they got originally added in.)
40+
3541
/// Allows using the `amdgpu-kernel` ABI.
3642
(removed, abi_amdgpu_kernel, "1.77.0", Some(51575), None),
3743
(removed, advanced_slice_patterns, "1.0.0", Some(62254),

config.example.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609

610610
# Forces frame pointers to be used with `-Cforce-frame-pointers`.
611611
# This can be helpful for profiling at a small performance cost.
612-
# frame-pointers = false
612+
#frame-pointers = false
613613

614614
# Indicates whether stack protectors should be used
615615
# via the unstable option `-Zstack-protector`.

library/std/src/process.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@
9696
//! child processes must agree on how the commandline string is encoded.
9797
//!
9898
//! Most programs use the standard C run-time `argv`, which in practice results
99-
//! in consistent argument handling. However some programs have their own way of
99+
//! in consistent argument handling. However, some programs have their own way of
100100
//! parsing the commandline string. In these cases using [`arg`] or [`args`] may
101-
//! result in the child process seeing a different array of arguments then the
101+
//! result in the child process seeing a different array of arguments than the
102102
//! parent process intended.
103103
//!
104104
//! Two ways of mitigating this are:

src/bootstrap/Cargo.lock

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ dependencies = [
4848
"clap_complete",
4949
"cmake",
5050
"fd-lock",
51-
"filetime",
5251
"home",
5352
"ignore",
5453
"junction",

src/bootstrap/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ build_helper = { path = "../tools/build_helper" }
4444
clap = { version = "4.4", default-features = false, features = ["std", "usage", "help", "derive", "error-context"] }
4545
clap_complete = "4.4"
4646
fd-lock = "4.0"
47-
filetime = "0.2"
4847
home = "0.5"
4948
ignore = "0.4"
5049
libc = "0.2"

src/bootstrap/src/core/build_steps/compile.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use crate::utils::helpers::{
3333
};
3434
use crate::LLVM_TOOLS;
3535
use crate::{CLang, Compiler, DependencyType, GitRepo, Mode};
36-
use filetime::FileTime;
3736

3837
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3938
pub struct Std {
@@ -2161,9 +2160,11 @@ pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path)
21612160
return;
21622161
}
21632162

2164-
let previous_mtime = FileTime::from_last_modification_time(&path.metadata().unwrap());
2163+
let previous_mtime = t!(t!(path.metadata()).modified());
21652164
command("strip").capture().arg("--strip-debug").arg(path).run(builder);
21662165

2166+
let file = t!(fs::File::open(path));
2167+
21672168
// After running `strip`, we have to set the file modification time to what it was before,
21682169
// otherwise we risk Cargo invalidating its fingerprint and rebuilding the world next time
21692170
// bootstrap is invoked.
@@ -2176,5 +2177,5 @@ pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path)
21762177
// In the second invocation of bootstrap, Cargo will see that the mtime of librustc_driver.so
21772178
// is greater than the mtime of rustc-main, and will rebuild rustc-main. That will then cause
21782179
// everything else (standard library, future stages...) to be rebuilt.
2179-
t!(filetime::set_file_mtime(path, previous_mtime));
2180+
t!(file.set_modified(previous_mtime));
21802181
}

0 commit comments

Comments
 (0)