Rollup merge of #149804 - xiaolinny:main, r=lcnr

chore: fix some minor issues in the comments

fix some minor issues in the comments
This commit is contained in:
Jonathan Brouwer 2025-12-16 20:21:08 +01:00 committed by GitHub
commit 297cdc8137
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View file

@ -172,7 +172,7 @@ fn test_buffered_reader_stream_position_panic() {
// cause internal buffer to be filled but read only partially
let mut buffer = [0, 0];
assert!(reader.read_exact(&mut buffer).is_ok());
// rewinding the internal reader will cause buffer to loose sync
// rewinding the internal reader will cause buffer to lose sync
let inner = reader.get_mut();
assert!(inner.seek(SeekFrom::Start(0)).is_ok());
// overflow when subtracting the remaining buffer size from current position

View file

@ -4,7 +4,7 @@ This page is specifically about the test suite named `rustdoc-json`, which tests
For other test suites used for testing rustdoc, see [§Rustdoc test suites](../tests/compiletest.md#rustdoc-test-suites).
Tests are run with compiletest, and have access to the usual set of [directives](../tests/directives.md).
Frequenly used directives here are:
Frequently used directives here are:
- [`//@ aux-build`][aux-build] to have dependencies.
- `//@ edition: 2021` (or some other edition).
@ -23,8 +23,8 @@ Also, talk about how it works
## jsondocck
[jsondocck] processes direcives given in comments, to assert that the values in the output are expected.
It's alot like [htmldocck](./rustdoc-test-suite.md) in that way.
[jsondocck] processes directives given in comments, to assert that the values in the output are expected.
It's a lot like [htmldocck](./rustdoc-test-suite.md) in that way.
It uses [JSONPath] as a query language, which takes a path, and returns a *list* of values that that path is said to match to.
@ -48,7 +48,7 @@ These are defined in [`directive.rs`].
Values can be either JSON values, or variables.
- JSON values are JSON literals, e.g. `true`, `"string"`, `{"key": "value"}`.
These often need to be quoted using `'`, to be processed as 1 value. See [§Argument spliting](#argument-spliting)
These often need to be quoted using `'`, to be processed as 1 value. See [§Argument splitting](#argument-splitting)
- Variables can be used to store the value in one path, and use it in later queries.
They are set with the `//@ set <name> = <path>` directive, and accessed with `$<name>`
@ -57,7 +57,7 @@ Values can be either JSON values, or variables.
//@ is $.some.other.path $foo
```
### Argument spliting
### Argument splitting
Arguments to directives are split using the [shlex] crate, which implements POSIX shell escaping.
This is because both `<path>` and `<value>` arguments to [directives](#directives) frequently have both

View file

@ -1,6 +1,6 @@
// Test when deferring repeat expr copy checks to end of typechecking whether they're
// checked before integer fallback occurs or not. We accomplish this by having a repeat
// count that can only be inferred after integer fallback has occured. This test will
// count that can only be inferred after integer fallback has occurred. This test will
// pass if we were to check repeat exprs after integer fallback.
use std::marker::PhantomData;