diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 72709753b1dff..c7ff28ccaffb7 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1788,6 +1788,8 @@ symbols! { ptr_slice_from_raw_parts_mut, ptr_swap, ptr_swap_nonoverlapping, + ptr_without_provenance, + ptr_without_provenance_mut, ptr_write, ptr_write_bytes, ptr_write_unaligned, diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 29fe77390a16b..335c5c6ee944e 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -880,6 +880,7 @@ pub const fn null_mut() -> *mut T { #[must_use] #[stable(feature = "strict_provenance", since = "1.84.0")] #[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")] +#[rustc_diagnostic_item = "ptr_without_provenance"] pub const fn without_provenance(addr: usize) -> *const T { without_provenance_mut(addr) } @@ -918,6 +919,7 @@ pub const fn dangling() -> *const T { #[must_use] #[stable(feature = "strict_provenance", since = "1.84.0")] #[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")] +#[rustc_diagnostic_item = "ptr_without_provenance_mut"] #[allow(integer_to_ptr_transmutes)] // Expected semantics here. pub const fn without_provenance_mut(addr: usize) -> *mut T { // An int-to-pointer transmute currently has exactly the intended semantics: it creates a diff --git a/src/doc/rustc-dev-guide/.github/workflows/date-check.yml b/src/doc/rustc-dev-guide/.github/workflows/date-check.yml index 3bac68d23b748..e26dec6ce25dd 100644 --- a/src/doc/rustc-dev-guide/.github/workflows/date-check.yml +++ b/src/doc/rustc-dev-guide/.github/workflows/date-check.yml @@ -22,9 +22,7 @@ jobs: rustup update stable - name: Run `date-check` - working-directory: ci/date-check - run: | - cargo run -- ../../src/ > ../../date-check-output.txt + run: cargo run --manifest-path ci/date-check/Cargo.toml . > date-check-output.txt - name: Open issue uses: actions/github-script@v7 diff --git a/src/doc/rustc-dev-guide/ci/date-check/src/main.rs b/src/doc/rustc-dev-guide/ci/date-check/src/main.rs index 0a32f4e9b7b66..c9f349147e793 100644 --- a/src/doc/rustc-dev-guide/ci/date-check/src/main.rs +++ b/src/doc/rustc-dev-guide/ci/date-check/src/main.rs @@ -153,9 +153,13 @@ fn main() { println!(); for (path, dates) in dates_by_file { - println!("- {}", path.strip_prefix(&root_dir_path).unwrap_or(&path).display(),); + let path = path.strip_prefix(&root_dir_path).unwrap_or(&path).display(); + println!("- {path}"); for (line, date) in dates { - println!(" - [ ] line {}: {}", line, date); + let url = format!( + "https://github.com/rust-lang/rustc-dev-guide/blob/main/{path}?plain=1#L{line}" + ); + println!(" - [ ] {date} [line {line}]({url})"); } } println!(); diff --git a/src/doc/rustc-dev-guide/rust-version b/src/doc/rustc-dev-guide/rust-version index 7345c25066a82..7b444a9ef5f11 100644 --- a/src/doc/rustc-dev-guide/rust-version +++ b/src/doc/rustc-dev-guide/rust-version @@ -1 +1 @@ -2dc30247c5d8293aaa31e1d7dae2ed2fde908ada +85c8ff69cb3efd950395cc444a54bbbdad668865 diff --git a/src/doc/rustc-dev-guide/src/getting-started.md b/src/doc/rustc-dev-guide/src/getting-started.md index 36d19e6c570e2..6ccc5a75497aa 100644 --- a/src/doc/rustc-dev-guide/src/getting-started.md +++ b/src/doc/rustc-dev-guide/src/getting-started.md @@ -179,7 +179,7 @@ The following tasks are doable without much background knowledge but are incredi to read a part of the code and write doc comments for it. This will help you to learn some part of the compiler while also producing a useful artifact! - [Triaging issues][triage]: categorizing, replicating, and minimizing issues is very helpful to the Rust maintainers. -- [Working groups][wg]: there are a bunch of working groups on a wide variety +- [Working areas][wa]: there are a bunch of working areas on a wide variety of rust-related things. - Answer questions on [users.rust-lang.org][users], or on [Stack Overflow][so]. - Participate in the [RFC process](https://github.com/rust-lang/rfcs). @@ -191,7 +191,7 @@ The following tasks are doable without much background knowledge but are incredi [so]: http://stackoverflow.com/questions/tagged/rust [community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library [wd]: ./contributing.md#writing-documentation -[wg]: https://rust-lang.github.io/compiler-team/working-groups/ +[wa]: https://forge.rust-lang.org/compiler/working-areas.html [triage]: ./contributing.md#issue-triage ## Cloning and Building diff --git a/src/doc/rustc-dev-guide/src/overview.md b/src/doc/rustc-dev-guide/src/overview.md index 23cc94d41846d..1200a854f8edb 100644 --- a/src/doc/rustc-dev-guide/src/overview.md +++ b/src/doc/rustc-dev-guide/src/overview.md @@ -50,10 +50,10 @@ preserves full fidelity information for both IDEs and procedural macros The *parser* [translates the token stream from the `lexer` into an Abstract Syntax Tree (AST)][parser]. It uses a recursive descent (top-down) approach to syntax analysis. The crate entry points for the `parser` are the -[`Parser::parse_crate_mod()`][parse_crate_mod] and [`Parser::parse_mod()`][parse_mod] +[`Parser::parse_crate_mod`][parse_crate_mod] and [`Parser::parse_mod`][parse_mod] methods found in [`rustc_parse::parser::Parser`]. The external module parsing entry point is [`rustc_expand::module::parse_external_mod`][parse_external_mod]. -And the macro-`parser` entry point is [`Parser::parse_nonterminal()`][parse_nonterminal]. +And the macro-`parser` entry point is [`Parser::parse_nonterminal`][parse_nonterminal]. Parsing is performed with a set of [`parser`] utility methods including [`bump`], [`check`], [`eat`], [`expect`], [`look_ahead`]. diff --git a/src/doc/rustc-dev-guide/src/tests/best-practices.md b/src/doc/rustc-dev-guide/src/tests/best-practices.md index 10372c36ac99e..ff4ea11bbc7a9 100644 --- a/src/doc/rustc-dev-guide/src/tests/best-practices.md +++ b/src/doc/rustc-dev-guide/src/tests/best-practices.md @@ -153,6 +153,7 @@ This may include remarks on: - Try to make sure the test is as minimal as possible. - Minimize non-critical code and especially minimize unnecessary syntax and type errors which can clutter stderr snapshots. +- Use `#![allow(...)]` or `#![expect(...)]` to suppress unrelated warnings. - Where possible, use semantically meaningful names (e.g. `fn bare_coverage_attributes() {}`). diff --git a/src/doc/rustc-dev-guide/src/tests/perf.md b/src/doc/rustc-dev-guide/src/tests/perf.md index e460ed8187ebc..18762556137e1 100644 --- a/src/doc/rustc-dev-guide/src/tests/perf.md +++ b/src/doc/rustc-dev-guide/src/tests/perf.md @@ -41,7 +41,9 @@ To evaluate the performance impact of a PR, write this comment on the PR: > repository](https://github.com/rust-lang/team) with the `perf = true` value in > the `[permissions]` section (and bors permissions are also required). If you > are not on one of those teams, feel free to ask for someone to post it for you -> (either on Zulip or ask the assigned reviewer). +> (either on [Zulip][perf run] or ask the assigned reviewer). + +[perf run]: https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/perf.20run This will first tell bors to do a "try" build which do a full release build for `x86_64-unknown-linux-gnu`. After the build finishes, it will place it in the diff --git a/src/doc/rustc-dev-guide/triagebot.toml b/src/doc/rustc-dev-guide/triagebot.toml index fbfe742341480..974f4cd3dd969 100644 --- a/src/doc/rustc-dev-guide/triagebot.toml +++ b/src/doc/rustc-dev-guide/triagebot.toml @@ -58,9 +58,6 @@ allow-unauthenticated = [ # Documentation at: https://forge.rust-lang.org/triagebot/issue-links.html [issue-links] -[behind-upstream] -days-threshold = 7 - # Enable triagebot (PR) assignment. # Documentation at: https://forge.rust-lang.org/triagebot/pr-assignment.html [assign]