@@ -739,7 +739,7 @@ This flag can be passed multiple times to nest wrappers.
739739
740740## Passing arguments to rustc when compiling doctests
741741
742- You can use the ` --doctest-compilation-args ` flag if you want to add options when compiling the
742+ You can use the ` --doctest-build-arg ` flag if you want to add options when compiling the
743743doctest. For example if you have:
744744
745745``` rust,no_run
@@ -784,35 +784,19 @@ failures:
784784test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
785785```
786786
787- But if you can limit the lint level to warning by using ` --doctest_compilation_args =--cap-lints=warn ` :
787+ But if you can limit the lint level to warning by using ` --doctest-build-arg =--cap-lints=warn ` :
788788
789789``` console
790- $ rustdoc --test --doctest_compilation_args =--cap-lints=warn file.rs
790+ $ rustdoc --test --doctest-build-arg =--cap-lints=warn file.rs
791791
792792running 1 test
793793test tests/rustdoc-ui/doctest/rustflags.rs - Bar (line 5) ... ok
794794
795795test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
796796```
797797
798- The parsing of arguments works as follows: if it encounters a ` " ` or a ` ' ` , it will continue
799- until it finds the character unescaped (without a prepending ` \ ` ). If not inside a string, a
800- whitespace character will also split arguments. Example:
801-
802- ``` text
803- "hello 'a'\" ok" how are 'you today?'
804- ```
805-
806- will be split as follows:
807-
808- ``` text
809- [
810- "hello 'a'\" ok",
811- "how",
812- "are",
813- "you today?",
814- ]
815- ```
798+ In order to pass multiple arguments to the underlying compiler,
799+ pass ` --doctest-build-arg ARG ` for each argument ` ARG ` .
816800
817801## ` --generate-macro-expansion ` : Generate macros expansion toggles in source code
818802
0 commit comments