Skip to content

Commit dfc400e

Browse files
committed
Auto merge of rust-lang#124354 - matthiaskrgr:rollup-xsdnixm, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang#124322 (chore: fix some typos in comments) - rust-lang#124333 (Improve diagnostic for unknown `--print` request) - rust-lang#124334 (Strengthen tracking issue policy with consequences) - rust-lang#124335 (Stabilize `std::path::absolute`) - rust-lang#124351 (fix typo in binary_heap docs) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ef8b9dc + 62bc38d commit dfc400e

File tree

21 files changed

+24
-27
lines changed

21 files changed

+24
-27
lines changed

.github/ISSUE_TEMPLATE/tracking_issue.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Tracking issues are used to record the overall progress of implementation.
2828
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
2929
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
3030
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
31+
Discussion comments will get marked as off-topic or deleted.
32+
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
3133

3234
### Steps
3335
<!--

compiler/rustc_fs_util/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(absolute_path)]
2-
31
use std::ffi::CString;
42
use std::fs;
53
use std::io;

compiler/rustc_session/src/config.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1888,9 +1888,12 @@ fn collect_print_requests(
18881888
let prints =
18891889
PRINT_KINDS.iter().map(|(name, _)| format!("`{name}`")).collect::<Vec<_>>();
18901890
let prints = prints.join(", ");
1891-
early_dcx.early_fatal(format!(
1892-
"unknown print request `{req}`. Valid print requests are: {prints}"
1893-
));
1891+
1892+
let mut diag =
1893+
early_dcx.early_struct_fatal(format!("unknown print request: `{req}`"));
1894+
#[allow(rustc::diagnostic_outside_of_impl)]
1895+
diag.help(format!("valid print requests are: {prints}"));
1896+
diag.emit()
18941897
}
18951898
};
18961899

compiler/rustc_span/src/hygiene.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ struct HygieneDecodeContextInner {
12511251
// global `HygieneData`. When we deserialize a `SyntaxContext`, we need to create
12521252
// a new id in the global `HygieneData`. This map tracks the ID we end up picking,
12531253
// so that multiple occurrences of the same serialized id are decoded to the same
1254-
// `SyntaxContext`. This only stores `SyntaxContext`s which are completly decoded.
1254+
// `SyntaxContext`. This only stores `SyntaxContext`s which are completely decoded.
12551255
remapped_ctxts: Vec<Option<SyntaxContext>>,
12561256

12571257
/// Maps serialized `SyntaxContext` ids that are currently being decoded to a `SyntaxContext`.

compiler/rustc_type_ir/src/ty_kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub enum TyKind<I: Interner> {
227227
/// A placeholder type, used during higher ranked subtyping to instantiate
228228
/// bound variables.
229229
///
230-
/// It is conventional to render anonymous placeholer types like `!N` or `!U_N`,
230+
/// It is conventional to render anonymous placeholder types like `!N` or `!U_N`,
231231
/// where `N` is the placeholder variable's anonymous index (which corresponds
232232
/// to the bound variable's index from the binder from which it was instantiated),
233233
/// and `U` is the universe index in which it is instantiated, or totally omitted

library/alloc/src/collections/binary_heap/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//! // instead of a max-heap.
3232
//! impl Ord for State {
3333
//! fn cmp(&self, other: &Self) -> Ordering {
34-
//! // Notice that the we flip the ordering on costs.
34+
//! // Notice that we flip the ordering on costs.
3535
//! // In case of a tie we compare positions - this step is necessary
3636
//! // to make implementations of `PartialEq` and `Ord` consistent.
3737
//! other.cost.cmp(&self.cost)

library/core/src/fmt/rt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl<'a> Argument<'a> {
153153
///
154154
/// # Safety
155155
///
156-
/// This argument must actually be a placeholer argument.
156+
/// This argument must actually be a placeholder argument.
157157
///
158158
// FIXME: Transmuting formatter in new and indirectly branching to/calling
159159
// it here is an explicit CFI violation.

library/std/src/path.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -3332,7 +3332,6 @@ impl Error for StripPrefixError {
33323332
/// ## Posix paths
33333333
///
33343334
/// ```
3335-
/// #![feature(absolute_path)]
33363335
/// # #[cfg(unix)]
33373336
/// fn main() -> std::io::Result<()> {
33383337
/// use std::path::{self, Path};
@@ -3357,7 +3356,6 @@ impl Error for StripPrefixError {
33573356
/// ## Windows paths
33583357
///
33593358
/// ```
3360-
/// #![feature(absolute_path)]
33613359
/// # #[cfg(windows)]
33623360
/// fn main() -> std::io::Result<()> {
33633361
/// use std::path::{self, Path};
@@ -3382,7 +3380,7 @@ impl Error for StripPrefixError {
33823380
///
33833381
/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
33843382
/// [windows-path]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew
3385-
#[unstable(feature = "absolute_path", issue = "92750")]
3383+
#[stable(feature = "absolute_path", since = "CURRENT_RUSTC_VERSION")]
33863384
pub fn absolute<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
33873385
let path = path.as_ref();
33883386
if path.as_os_str().is_empty() {

src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Tests can be run on AArch64 Windows 11 devices.
7373

7474
## Cross-compilation toolchains and C code
7575

76-
C code can be built using the Arm64-targetting MSVC or Clang toolchain.
76+
C code can be built using the Arm64-targeting MSVC or Clang toolchain.
7777

7878
To compile:
7979

src/doc/rustc/src/platform-support/wasm32-wasip1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ languages compiled to WebAssembly, for example C/C++. Any ABI differences or
5959
mismatches are considered bugs that need to be fixed.
6060

6161
By default the WASI targets in Rust ship in rustup with a precompiled copy of
62-
[`wasi-libc`] meaning that a WebAssembly-targetting-Clang is not required to
62+
[`wasi-libc`] meaning that a WebAssembly-targeting-Clang is not required to
6363
use the WASI targets from Rust. If there is no actual interoperation with C
6464
then `rustup target add wasm32-wasip1` is all that's needed to get
6565
started with WASI.

src/doc/rustdoc/src/lints.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ warning: 1 warning emitted
417417

418418
This lint is **warn-by-default**. It detects explicit links that are the same
419419
as computed automatic links.
420-
This usually means the explicit links are removeable. For example:
420+
This usually means the explicit links are removable. For example:
421421

422422
```rust
423423
#![warn(rustdoc::redundant_explicit_links)] // note: unnecessary - warns by default.

src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,4 @@ render differently in this case:
168168
```
169169

170170
`1.` and `2.` will be displayed as is in the rendered documentation (ie, `[a]` and `[b][c]`)
171-
whereas `3.` and `4.` will be replaced by a link targetting `e` for `[d](e)` and `g` for `[f]`.
171+
whereas `3.` and `4.` will be replaced by a link targeting `e` for `[d](e)` and `g` for `[f]`.

src/librustdoc/lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ declare_rustdoc_lint! {
187187

188188
declare_rustdoc_lint! {
189189
/// This lint is **warn-by-default**. It detects explicit links that are the same
190-
/// as computed automatic links. This usually means the explicit links are removeable.
190+
/// as computed automatic links. This usually means the explicit links are removable.
191191
/// This is a `rustdoc` only lint, see the documentation in the [rustdoc book].
192192
///
193193
/// [rustdoc book]: ../../../rustdoc/lints.html#redundant_explicit_links

src/rustdoc-json-types/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pub enum StructKind {
314314
/// All [`Id`]'s will point to [`ItemEnum::StructField`]. Private and
315315
/// `#[doc(hidden)]` fields will be given as `None`
316316
Tuple(Vec<Option<Id>>),
317-
/// A struct with nammed fields.
317+
/// A struct with named fields.
318318
///
319319
/// ```rust
320320
/// pub struct PlainStruct { x: i32 }

src/tools/miri/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#![feature(let_chains)]
1313
#![feature(lint_reasons)]
1414
#![feature(trait_upcasting)]
15-
#![feature(absolute_path)]
1615
// Configure clippy and other lints
1716
#![allow(
1817
clippy::collapsible_else_if,

src/tools/miri/tests/pass/shims/path.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@compile-flags: -Zmiri-disable-isolation
2-
#![feature(absolute_path)]
32
use std::path::{absolute, Path};
43

54
#[track_caller]

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ run-make/unstable-flag-required/Makefile
317317
run-make/use-suggestions-rust-2018/Makefile
318318
run-make/used-cdylib-macos/Makefile
319319
run-make/used/Makefile
320-
run-make/valid-print-requests/Makefile
321320
run-make/volatile-intrinsics/Makefile
322321
run-make/wasm-exceptions-nostd/Makefile
323322
run-make/wasm-override-linker/Makefile

tests/run-make/valid-print-requests/Makefile

-4
This file was deleted.

tests/run-make/valid-print-requests/valid-print-requests.stderr

-2
This file was deleted.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//@ compile-flags: --print yyyy
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: unknown print request: `yyyy`
2+
|
3+
= help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
4+

0 commit comments

Comments
 (0)