Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #134590

Merged
merged 25 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f371952
Abstract `ProcThreadAttributeList` into its own struct
michaelvanstraten Apr 7, 2024
f3ac64a
Add test of closure vs jump precedence
dtolnay Dec 3, 2024
193d827
Squash closures and jumps into a single precedence level
dtolnay Dec 3, 2024
4df47a0
Add test of closure precedence with return type
dtolnay Dec 3, 2024
72ac961
Raise precedence of closure that has explicit return type
dtolnay Dec 3, 2024
fe06c5d
Never parenthesize `continue`
dtolnay Dec 3, 2024
cb88030
Arbitrary self types v2: niche deshadowing test
adetaylor Dec 19, 2024
fae7207
Arbitrary self types v2: no deshadow pre feature.
adetaylor Dec 19, 2024
05731af
Add `--doctest-compilation-args` option to allow passing arguments to…
GuillaumeGomez Aug 7, 2024
2bd8690
Add regression test for `--doctest-compilation-args`
GuillaumeGomez Aug 7, 2024
d3c970a
Add explanations about `--doctest-compilation-args` in rustdoc book
GuillaumeGomez Aug 7, 2024
b3cc9b9
Restrict `#[non_exaustive]` on structs with default field values
estebank Dec 20, 2024
24fafe7
Update `run-make/rustdoc-default-output` test
GuillaumeGomez Aug 19, 2024
cbb3df4
Split arguments from `--doctest-compilation-args` like a shell would
GuillaumeGomez Aug 28, 2024
55653a5
Add explanations on how arguments are split
GuillaumeGomez Dec 20, 2024
bc03e40
Move test into the `tests.rs` file
GuillaumeGomez Dec 20, 2024
2d914be
Add test to ensure passing `--doctest_compilation_args` multiple time…
GuillaumeGomez Dec 20, 2024
9965ad7
Also lint on option of function pointer comparisons
Urgau Dec 19, 2024
758ad53
Rollup merge of #123604 - michaelvanstraten:proc_thread_attribute_lis…
matthiaskrgr Dec 21, 2024
472bbb9
Rollup merge of #128780 - GuillaumeGomez:rustflags-doctests, r=rustdoc
matthiaskrgr Dec 21, 2024
f3b19f5
Rollup merge of #133782 - dtolnay:closuresjumps, r=spastorino,travisc…
matthiaskrgr Dec 21, 2024
aea7c1d
Rollup merge of #134509 - adetaylor:niche-deshadowing-tests, r=wesley…
matthiaskrgr Dec 21, 2024
3201fe9
Rollup merge of #134524 - adetaylor:getref, r=compiler-errors
matthiaskrgr Dec 21, 2024
fea6c4e
Rollup merge of #134539 - estebank:restrict-non_exhaustive, r=jieyouxu
matthiaskrgr Dec 21, 2024
b7ac8d7
Rollup merge of #134586 - Urgau:fn-ptr-lint-option, r=compiler-errors
matthiaskrgr Dec 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test to ensure passing --doctest_compilation_args multiple time…
…s work
  • Loading branch information
GuillaumeGomez committed Dec 20, 2024
commit 2d914bed2dea1316fdbb55010f3bb2c5412942cb
2 changes: 1 addition & 1 deletion src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ This flag can be passed multiple times to nest wrappers.

## Passing arguments to rustc when compiling doctests

You can use the `--doctest-compilation-args` option if you want to add options when compiling the
You can use the `--doctest-compilation-args` flag if you want to add options when compiling the
doctest. For example if you have:

```rust,no_run
Expand Down
17 changes: 17 additions & 0 deletions tests/rustdoc-ui/doctest/rustflags-multiple-args.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This test checks that the test behave when `--doctest-compilation-args` is passed
// multiple times.

//@ check-pass
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
//@ compile-flags: --doctest-compilation-args=--cfg=another
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
/// #[cfg(testcase_must_be_present)]
/// #[cfg(another)]
/// fn must_be_present() {}
///
/// fn main() { must_be_present() }
/// ```
pub struct Bar;
6 changes: 6 additions & 0 deletions tests/rustdoc-ui/doctest/rustflags-multiple-args.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

running 1 test
test $DIR/rustflags-multiple-args.rs - Bar (line 10) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME

Loading