Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ae3ab14

Browse files
committed
Auto merge of rust-lang#110839 - jyn514:rollup-uikilwm, r=jyn514
Rollup of 9 pull requests Successful merges: - rust-lang#108416 (black_box doc corrections for clarification - Issue rust-lang#107957) - rust-lang#109379 (Replace `yes` command by `while-echo` in test `tests/ui/process/process-sigpipe.rs`) - rust-lang#110266 (Update documentation wording on path 'try_exists' functions) - rust-lang#110329 (Improve tests for rust-lang#110138) - rust-lang#110418 (Spelling rustdoc) - rust-lang#110587 (Fix `std` compilation error for wasi+atomics) - rust-lang#110594 (`rustc --help` add `--cfg` SPEC declaration.) - rust-lang#110792 (Use the standard macOS CI runner) - rust-lang#110817 (Add regression tests for const-generic inherent associated types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 70540d5 + 8c0dfa3 commit ae3ab14

File tree

17 files changed

+117
-41
lines changed

17 files changed

+117
-41
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ jobs:
326326
NO_DEBUG_ASSERTIONS: 1
327327
NO_OVERFLOW_CHECKS: 1
328328
DIST_REQUIRE_ALL_TOOLS: 1
329-
os: macos-12-xl
329+
os: macos-latest
330330
- name: dist-apple-various
331331
env:
332332
SCRIPT: "./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim"
@@ -337,7 +337,7 @@ jobs:
337337
NO_LLVM_ASSERTIONS: 1
338338
NO_DEBUG_ASSERTIONS: 1
339339
NO_OVERFLOW_CHECKS: 1
340-
os: macos-12-xl
340+
os: macos-latest
341341
- name: dist-x86_64-apple-alt
342342
env:
343343
SCRIPT: "./x.py dist bootstrap --include-default-paths"
@@ -348,7 +348,7 @@ jobs:
348348
NO_LLVM_ASSERTIONS: 1
349349
NO_DEBUG_ASSERTIONS: 1
350350
NO_OVERFLOW_CHECKS: 1
351-
os: macos-12-xl
351+
os: macos-latest
352352
- name: x86_64-apple-1
353353
env:
354354
SCRIPT: "./x.py --stage 2 test --exclude tests/ui --exclude tests/rustdoc --exclude tests/run-make-fulldeps"
@@ -359,7 +359,7 @@ jobs:
359359
NO_LLVM_ASSERTIONS: 1
360360
NO_DEBUG_ASSERTIONS: 1
361361
NO_OVERFLOW_CHECKS: 1
362-
os: macos-12-xl
362+
os: macos-latest
363363
- name: x86_64-apple-2
364364
env:
365365
SCRIPT: "./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps"
@@ -370,7 +370,7 @@ jobs:
370370
NO_LLVM_ASSERTIONS: 1
371371
NO_DEBUG_ASSERTIONS: 1
372372
NO_OVERFLOW_CHECKS: 1
373-
os: macos-12-xl
373+
os: macos-latest
374374
- name: dist-aarch64-apple
375375
env:
376376
SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
@@ -385,7 +385,7 @@ jobs:
385385
NO_OVERFLOW_CHECKS: 1
386386
DIST_REQUIRE_ALL_TOOLS: 1
387387
JEMALLOC_SYS_WITH_LG_PAGE: 14
388-
os: macos-12-xl
388+
os: macos-latest
389389
- name: x86_64-msvc-1
390390
env:
391391
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"

compiler/rustc_session/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,8 @@ The default is {DEFAULT_EDITION} and the latest stable edition is {LATEST_STABLE
14001400
pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
14011401
vec![
14021402
opt::flag_s("h", "help", "Display this message"),
1403-
opt::multi_s("", "cfg", "Configure the compilation environment", "SPEC"),
1403+
opt::multi_s("", "cfg", "Configure the compilation environment.
1404+
SPEC supports the syntax `NAME[=\"VALUE\"]`.", "SPEC"),
14041405
opt::multi("", "check-cfg", "Provide list of valid cfg options for checking", "SPEC"),
14051406
opt::multi_s(
14061407
"L",

library/core/src/hint.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,14 @@ pub fn spin_loop() {
217217
/// Note however, that `black_box` is only (and can only be) provided on a "best-effort" basis. The
218218
/// extent to which it can block optimisations may vary depending upon the platform and code-gen
219219
/// backend used. Programs cannot rely on `black_box` for *correctness*, beyond it behaving as the
220-
/// identity function.
220+
/// identity function. As such, it **must not be relied upon to control critical program behavior.**
221+
/// This _immediately_ precludes any direct use of this function for cryptographic or security
222+
/// purposes.
221223
///
222224
/// [`std::convert::identity`]: crate::convert::identity
223225
///
224226
/// # When is this useful?
225227
///
226-
/// First and foremost: `black_box` does _not_ guarantee any exact behavior and, in some cases, may
227-
/// do nothing at all. As such, it **must not be relied upon to control critical program behavior.**
228-
/// This _immediately_ precludes any direct use of this function for cryptographic or security
229-
/// purposes.
230-
///
231228
/// While not suitable in those mission-critical cases, `black_box`'s functionality can generally be
232229
/// relied upon for benchmarking, and should be used there. It will try to ensure that the
233230
/// compiler doesn't optimize away part of the intended test code based on context. For

library/std/src/fs.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,9 +2515,10 @@ impl AsInnerMut<fs_imp::DirBuilder> for DirBuilder {
25152515
/// This function will traverse symbolic links to query information about the
25162516
/// destination file. In case of broken symbolic links this will return `Ok(false)`.
25172517
///
2518-
/// As opposed to the [`Path::exists`] method, this one doesn't silently ignore errors
2519-
/// unrelated to the path not existing. (E.g. it will return `Err(_)` in case of permission
2520-
/// denied on some of the parent directories.)
2518+
/// As opposed to the [`Path::exists`] method, this will only return `Ok(true)` or `Ok(false)`
2519+
/// if the path was _verified_ to exist or not exist. If its existence can neither be confirmed
2520+
/// nor denied, an `Err(_)` will be propagated instead. This can be the case if e.g. listing
2521+
/// permission is denied on one of the parent directories.
25212522
///
25222523
/// Note that while this avoids some pitfalls of the `exists()` method, it still can not
25232524
/// prevent time-of-check to time-of-use (TOCTOU) bugs. You should only use it in scenarios

library/std/src/path.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,9 +2844,11 @@ impl Path {
28442844
/// This function will traverse symbolic links to query information about the
28452845
/// destination file. In case of broken symbolic links this will return `Ok(false)`.
28462846
///
2847-
/// As opposed to the [`exists()`] method, this one doesn't silently ignore errors
2848-
/// unrelated to the path not existing. (E.g. it will return `Err(_)` in case of permission
2849-
/// denied on some of the parent directories.)
2847+
/// [`Path::exists()`] only checks whether or not a path was both found and readable. By
2848+
/// contrast, `try_exists` will return `Ok(true)` or `Ok(false)`, respectively, if the path
2849+
/// was _verified_ to exist or not exist. If its existence can neither be confirmed nor
2850+
/// denied, it will propagate an `Err(_)` instead. This can be the case if e.g. listing
2851+
/// permission is denied on one of the parent directories.
28502852
///
28512853
/// Note that while this avoids some pitfalls of the `exists()` method, it still can not
28522854
/// prevent time-of-check to time-of-use (TOCTOU) bugs. You should only use it in scenarios

library/std/src/sys/wasi/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ pub mod io;
3232
#[path = "../unsupported/locks/mod.rs"]
3333
pub mod locks;
3434
pub mod net;
35-
#[path = "../unsupported/once.rs"]
36-
pub mod once;
3735
pub mod os;
3836
#[path = "../unix/os_str.rs"]
3937
pub mod os_str;
@@ -51,6 +49,13 @@ pub mod thread_local_dtor;
5149
pub mod thread_local_key;
5250
pub mod time;
5351

52+
cfg_if::cfg_if! {
53+
if #[cfg(not(target_feature = "atomics"))] {
54+
#[path = "../unsupported/once.rs"]
55+
pub mod once;
56+
}
57+
}
58+
5459
#[path = "../unsupported/common.rs"]
5560
#[deny(unsafe_op_in_unsafe_fn)]
5661
#[allow(unused)]

src/ci/github-actions/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ x--expand-yaml-anchors--remove:
8282
<<: *base-job
8383

8484
- &job-macos-xl
85-
os: macos-12-xl
85+
os: macos-latest # We use the standard runner for now
8686
<<: *base-job
8787

8888
- &job-windows-8c

src/doc/rustdoc/src/how-to-read-rustdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ including automatic and blanket implementations that `rustdoc` knows about.
4343
Subheadings, variants, fields, and many other things in this documentation
4444
are anchors and can be clicked on and deep-linked to,
4545
which is a great way to communicate exactly what you're talking about.
46-
The typograpical character "§" appears next to lines with anchors on them
46+
The typographical character "§" appears next to lines with anchors on them
4747
when hovered or given keyboard focus.
4848

4949
## The Navigation Bar

src/doc/rustdoc/src/references.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ If you know of other great resources, please submit a pull request!
1313

1414
## Community
1515
- [API Guidelines]
16-
- [Github tagged RFCs]
17-
- [Github tagged issues]
16+
- [GitHub tagged RFCs]
17+
- [GitHub tagged issues]
1818
- [RFC (stalled) front page styleguide]
1919
- [Guide on how to write documentation for a Rust crate]
2020

2121

2222
[API Guidelines]: https://rust-lang.github.io/api-guidelines/documentation.html
23-
[Github tagged RFCs]: https://github.com/rust-lang/rfcs/issues?q=label%3AT-rustdoc
24-
[Github tagged issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AT-rustdoc
23+
[GitHub tagged RFCs]: https://github.com/rust-lang/rfcs/issues?q=label%3AT-rustdoc
24+
[GitHub tagged issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AT-rustdoc
2525
[Guide on how to write documentation for a Rust crate]: https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate
2626
[Learn Rust]: https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments
2727
[RFC 1574: More API Documentation Conventions]: https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//! Should not be inlined
2+
3+
/// Should not be inlined
4+
pub enum O {
5+
L = -1,
6+
}

0 commit comments

Comments
 (0)