File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test checks that it will output warnings for usage of `standalone` or `standalone_crate`.
2+
3+ //@ compile-flags:--test -Zunstable-options --edition 2024
4+ //@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
5+ //@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
6+ //@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
7+
8+ #![ deny( warnings) ]
9+
10+ //! ```standalone
11+ //! bla
12+ //! ```
13+ //!
14+ //! ```standalone_crate
15+ //! bla
16+ //! ```
Original file line number Diff line number Diff line change 1+ error: unknown attribute `standalone`
2+ --> $DIR/standalone-warning-2024.rs:10:1
3+ |
4+ 10 | / //! ```standalone
5+ 11 | | //! bla
6+ 12 | | //! ```
7+ 13 | | //!
8+ 14 | | //! ```standalone_crate
9+ 15 | | //! bla
10+ 16 | | //! ```
11+ | |_______^
12+ |
13+ = help: there is an attribute with a similar name: `standalone-crate`
14+ = help: the code block will either not be tested if not marked as a rust one or the code will be run as part of the merged doctests if compatible
15+ note: the lint level is defined here
16+ --> $DIR/standalone-warning-2024.rs:8:9
17+ |
18+ 8 | #![deny(warnings)]
19+ | ^^^^^^^^
20+ = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(warnings)]`
21+
22+ error: unknown attribute `standalone_crate`
23+ --> $DIR/standalone-warning-2024.rs:10:1
24+ |
25+ 10 | / //! ```standalone
26+ 11 | | //! bla
27+ 12 | | //! ```
28+ 13 | | //!
29+ 14 | | //! ```standalone_crate
30+ 15 | | //! bla
31+ 16 | | //! ```
32+ | |_______^
33+ |
34+ = help: there is an attribute with a similar name: `standalone-crate`
35+ = help: the code block will either not be tested if not marked as a rust one or the code will be run as part of the merged doctests if compatible
36+
37+ error: aborting due to 2 previous errors
38+
Original file line number Diff line number Diff line change 1+ // This test checks that it will not output warning for usage of `standalone` or `standalone_crate`.
2+ //@ check-pass
3+
4+ //! ```standalone
5+ //! bla
6+ //! ```
7+ //!
8+ //! ```standalone_crate
9+ //! bla
10+ //! ```
You can’t perform that action at this time.
0 commit comments