Skip to content

Commit bc26e04

Browse files
committed
Auto merge of #136272 - Zalathar:rollup-6s577l5, r=Zalathar
Rollup of 5 pull requests Successful merges: - #135847 (optimize slice::ptr_rotate for small rotates) - #136215 (btree/node.rs: remove incorrect comment from pop_internal_level docs) - #136252 (spastorino back from vacations) - #136254 (Rustc dev guide subtree update) - #136259 (Cleanup docs for Allocator) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 3c03203 + a6301ed commit bc26e04

10 files changed

+55
-41
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
uses: actions/cache/restore@v4
4242
with:
4343
path: book/linkcheck/cache.json
44-
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}
44+
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }}
45+
restore-keys: |
46+
linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--
4547
4648
- name: Install latest nightly Rust toolchain
4749
if: steps.mdbook-cache.outputs.cache-hit != 'true'
@@ -66,7 +68,7 @@ jobs:
6668
uses: actions/cache/save@v4
6769
with:
6870
path: book/linkcheck/cache.json
69-
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}
71+
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }}
7072

7173
- name: Deploy to gh-pages
7274
if: github.event_name == 'push'

.github/workflows/rustc-pull.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ jobs:
5050
RESULT=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | length' --json title`
5151
if [[ "$RESULT" -eq 0 ]]; then
5252
echo "Creating new pull request"
53-
PR_URL=gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.'
53+
PR_URL=`gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.'`
5454
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
5555
else
56-
PR_URL=gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title
56+
PR_URL=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title`
5757
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
5858
fi
5959
env:

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ecda83b30f0f68cf5692855dddc0bc38ee8863fc
1+
66d6064f9eb888018775e08f84747ee6f39ba28e

src/about-this-guide.md

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ You might also find the following sites useful:
7272
- The [Rust reference][rr], even though it doesn't specifically talk about
7373
Rust's internals, is a great resource nonetheless
7474
- Although out of date, [Tom Lee's great blog article][tlgba] is very helpful
75-
- [rustaceans.org][ro] is helpful, but mostly dedicated to IRC
7675
- The [Rust Compiler Testing Docs][rctd]
7776
- For [@bors], [this cheat sheet][cheatsheet] is helpful
7877
- Google is always helpful when programming.

src/backend/libs-and-metadata.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ format is specific to `rustc`, and may change over time. This file contains:
4242
### dylib
4343

4444
A `dylib` is a platform-specific shared library. It includes the `rustc`
45-
[metadata] in a special link section called `.rustc` in a compressed format.
45+
[metadata] in a special link section called `.rustc`.
4646

4747
### rmeta
4848

src/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ as the linter walks the AST. You can then choose to emit lints in a
602602
very similar way to compile errors.
603603

604604
You also declare the metadata of a particular lint via the `declare_lint!`
605-
macro. This includes the name, the default level, a short description, and some
605+
macro. [This macro](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/macro.declare_lint.html) includes the name, the default level, a short description, and some
606606
more details.
607607

608608
Note that the lint and the lint pass must be registered with the compiler.

src/early_late_parameters.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ In this example we call `foo`'s function item type twice, each time with a borro
126126
If the lifetime parameter on `foo` was late bound this would be able to compile as each caller could provide a different lifetime argument for its borrow. See the following example which demonstrates this using the `bar` function defined above:
127127

128128
```rust
129-
#fn foo<'a: 'a>(b: &'a String) -> &'a String { b }
130-
#fn bar<'a>(b: &'a String) -> &'a String { b }
131-
129+
# fn foo<'a: 'a>(b: &'a String) -> &'a String { b }
130+
# fn bar<'a>(b: &'a String) -> &'a String { b }
131+
#
132132
// Early bound parameters are instantiated here, however as `'a` is
133133
// late bound it is not provided here.
134134
let b = bar;
@@ -220,24 +220,24 @@ Then, for the first case, we can call each function with a single lifetime argum
220220
```rust
221221
#![deny(late_bound_lifetime_arguments)]
222222

223-
#fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
223+
# fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
224224
#
225-
#struct Foo;
225+
# struct Foo;
226226
#
227-
#trait Trait: Sized {
228-
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
229-
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
230-
#}
227+
# trait Trait: Sized {
228+
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
229+
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
230+
# }
231231
#
232-
#impl Trait for Foo {
233-
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
234-
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
235-
#}
232+
# impl Trait for Foo {
233+
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
234+
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
235+
# }
236236
#
237-
#impl Foo {
238-
# fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
239-
# fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
240-
#}
237+
# impl Foo {
238+
# fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
239+
# fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
240+
# }
241241
#
242242
// Specifying as many arguments as there are early
243243
// bound parameters is always a future compat warning
@@ -251,24 +251,24 @@ free_function::<'static>(&(), &());
251251

252252
For the second case we call each function with more lifetime arguments than there are lifetime parameters (be it early or late bound) and note that method calls result in a FCW as opposed to the free/associated functions which result in a hard error:
253253
```rust
254-
#fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
254+
# fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
255255
#
256-
#struct Foo;
256+
# struct Foo;
257257
#
258-
#trait Trait: Sized {
259-
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
260-
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
261-
#}
258+
# trait Trait: Sized {
259+
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
260+
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
261+
# }
262262
#
263-
#impl Trait for Foo {
264-
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
265-
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
266-
#}
263+
# impl Trait for Foo {
264+
# fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
265+
# fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
266+
# }
267267
#
268-
#impl Foo {
269-
# fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
270-
# fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
271-
#}
268+
# impl Foo {
269+
# fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
270+
# fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
271+
# }
272272
#
273273
// Specifying more arguments than there are early
274274
// bound parameters is a future compat warning when
@@ -421,4 +421,4 @@ impl<'a> Fn<()> for FooFnItem<'a> {
421421
type Output = &'a String;
422422
/* fn call(...) -> ... { ... } */
423423
}
424-
```
424+
```

src/getting-started.md

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ pull request, continuing the work on the feature.
137137

138138
[abandoned-prs]: https://github.com/rust-lang/rust/pulls?q=is%3Apr+label%3AS-inactive+is%3Aclosed
139139

140+
### Writing tests
141+
142+
Issues that have been resolved but do not have a regression test are marked with the `E-needs-test` label. Writing unit tests is a low-risk, lower-priority task that offers new contributors a great opportunity to familiarize themselves with the testing infrastructure and contribution workflow.
143+
140144
### Contributing to std (standard library)
141145

142146
See [std-dev-guide](https://std-dev-guide.rust-lang.org/).

src/rustdoc.md

+9
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
5858
* If you want to copy those docs to a webserver, copy all of
5959
`build/host/doc`, since that's where the CSS, JS, fonts, and landing
6060
page are.
61+
* For frontend debugging, disable the `rust.docs-minification` option in [`config.toml`].
6162
* Use `./x test tests/rustdoc*` to run the tests using a stage1
6263
rustdoc.
6364
* See [Rustdoc internals] for more information about tests.
6465

66+
[`config.toml`]: ./building/how-to-build-and-run.md
67+
6568
## Code structure
6669

6770
* All paths in this section are relative to `src/librustdoc` in the rust-lang/rust repository.
@@ -77,6 +80,7 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
7780
* The tests on the structure of rustdoc HTML output are located in `tests/rustdoc`, where
7881
they're handled by the test runner of bootstrap and the supplementary script
7982
`src/etc/htmldocck.py`.
83+
* Frontend CSS and JavaScript are stored in `html/static/`.
8084

8185
## Tests
8286

@@ -91,6 +95,11 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
9195
browser-UI-test](https://github.com/GuillaumeGomez/browser-UI-test/) that uses
9296
puppeteer to run tests in a headless browser and check rendering and
9397
interactivity.
98+
* Additionally, JavaScript type annotations are written using [TypeScript-flavored JSDoc]
99+
comments and an external d.ts file. The code itself is plain, valid JavaScript; we only
100+
use tsc as a linter.
101+
102+
[TypeScript-flavored JSDoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
94103

95104
## Constraints
96105

src/solve/significant-changes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ old implementation structurally relates the aliases instead. This enables the
4242
new solver to stall equality until it is able to normalize the related aliases.
4343

4444
The behavior of the old solver is incomplete and relies on eager normalization
45-
which replaces ambiguous aliases with inference variables. As this is not
45+
which replaces ambiguous aliases with inference variables. As this is
4646
not possible for aliases containing bound variables, the old implementation does
4747
not handle aliases inside of binders correctly, e.g. [#102048]. See the chapter on
4848
[normalization] for more details.

0 commit comments

Comments
 (0)