diff options
| author | bors <bors@rust-lang.org> | 2025-08-28 19:57:03 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-28 19:57:03 +0000 | 
| commit | f2824da98d44c4a4e17bf39eb45103c8fc249117 (patch) | |
| tree | 812545bfb6f5c28312e21654298d5303b0fe4e06 /tests/rustdoc/doc-attribute.rs | |
| parent | 35d55b34bffd51384ac430cc20852b7d16dd5a90 (diff) | |
| parent | a60b96a3d47ca522439df646534dd5e27beb5a07 (diff) | |
| download | rust-f2824da98d44c4a4e17bf39eb45103c8fc249117.tar.gz rust-f2824da98d44c4a4e17bf39eb45103c8fc249117.zip | |
Auto merge of #145970 - GuillaumeGomez:rollup-pr11qds, r=GuillaumeGomez
Rollup of 6 pull requests Successful merges: - rust-lang/rust#142472 (Add new `doc(attribute = "...")` attribute) - rust-lang/rust#145368 (CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`) - rust-lang/rust#145853 (Improve error messages around invalid literals in attribute arguments) - rust-lang/rust#145920 (bootstrap: Explicitly mark the end of a failed test's captured output) - rust-lang/rust#145937 (add doc-hidden to exports in attribute prelude) - rust-lang/rust#145965 (Move exporting of profiler and sanitizer symbols to the LLVM backend) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/rustdoc/doc-attribute.rs')
| -rw-r--r-- | tests/rustdoc/doc-attribute.rs | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/tests/rustdoc/doc-attribute.rs b/tests/rustdoc/doc-attribute.rs new file mode 100644 index 00000000000..92e603ae6e5 --- /dev/null +++ b/tests/rustdoc/doc-attribute.rs @@ -0,0 +1,24 @@ +// Test checking the `#[doc(attribute = "...")]` attribute. + +#![crate_name = "foo"] + +#![feature(rustdoc_internals)] + +//@ has foo/index.html '//h2[@id="attributes"]' 'Attributes' +//@ has foo/index.html '//a[@href="attribute.no_mangle.html"]' 'no_mangle' +//@ has foo/index.html '//div[@class="sidebar-elems"]//li/a' 'Attributes' +//@ has foo/index.html '//div[@class="sidebar-elems"]//li/a/@href' '#attributes' +//@ has foo/attribute.no_mangle.html '//h1' 'Attribute no_mangle' +//@ has foo/attribute.no_mangle.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' +//@ has foo/index.html '//a/@href' '../foo/index.html' +//@ !has foo/foo/index.html +//@ !has-dir foo/foo +//@ !has foo/index.html '//span' '🔒' +#[doc(attribute = "no_mangle")] +/// this is a test! +mod foo{} + +//@ has foo/attribute.repr.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello' +#[doc(attribute = "repr")] +/// hello +mod bar {} | 
