Skip to content

Commit

Permalink
Use an attribute example that actually prevents combining
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Aug 19, 2024
1 parent 2dc4b85 commit 53ac97c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rust-2024/rustdoc-doctests.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ In some situations it is not possible for rustdoc to combine examples in a singl
* Uses the [`compile_fail`][tags] language tag, which indicates that the example fails to compile.
* Uses the [`edition`][tags], which indicates the edition of the example.[^edition-tag]
* Uses global attributes like the [`global_allocator`] attribute, which could potentially interfere with other tests.
* Defines any crate-wide attributes (like `#![deny(unused)]`).
* Defines any crate-wide attributes (like `#![feature(...)]`).
* Defines a macro that uses `$crate`, because the `$crate` path will not work correctly.

However, rustdoc is not able to automatically determine *all* situations where an example cannot be combined with other examples. In these situations, you can add the `standalone` language tag to indicate that the example should be built as a separate executable.
Expand Down

0 comments on commit 53ac97c

Please sign in to comment.