about summary refs log tree commit diff
path: root/tests/rustdoc/attribute-rendering.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-09-14 01:32:20 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2025-09-25 11:30:58 +0200
commitd7d7725b8cbeea8db490c3b033773776ce8794f5 (patch)
treedccb7c948e48bc87f72f4e8b1405cbeed45d5447 /tests/rustdoc/attribute-rendering.rs
parent88e797784e21ecad4dc768109ede33c76293482e (diff)
downloadrust-d7d7725b8cbeea8db490c3b033773776ce8794f5.tar.gz
rust-d7d7725b8cbeea8db490c3b033773776ce8794f5.zip
rustdoc: Fully escape link section and export name
Escape "special characters" (e.g., double quotes `"` and line breaks `\n`).
Escape HTML.

Lastly, add regression tests and clean up existing tests.
Diffstat (limited to 'tests/rustdoc/attribute-rendering.rs')
-rw-r--r--tests/rustdoc/attribute-rendering.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/rustdoc/attribute-rendering.rs b/tests/rustdoc/attribute-rendering.rs
deleted file mode 100644
index fb40d0a9887..00000000000
--- a/tests/rustdoc/attribute-rendering.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![crate_name = "foo"]
-
-//@ has 'foo/fn.f.html'
-//@ has - //*[@'class="code-attribute"]' '#[unsafe(export_name = "f")]'
-//@ has - //*[@'class="rust item-decl"]' 'pub fn f()'
-#[unsafe(export_name = "\
-f")]
-pub fn f() {}