We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19a90c7 + 995513c commit 5925c8eCopy full SHA for 5925c8e
src/librustdoc/html/render/mod.rs
@@ -1002,7 +1002,12 @@ fn attributes(it: &clean::Item) -> Vec<String> {
1002
.iter()
1003
.filter_map(|attr| {
1004
if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) {
1005
- Some(pprust::attribute_to_string(attr).replace('\n', "").replace(" ", " "))
+ Some(
1006
+ pprust::attribute_to_string(attr)
1007
+ .replace("\\\n", "")
1008
+ .replace('\n', "")
1009
+ .replace(" ", " "),
1010
+ )
1011
} else {
1012
None
1013
}
src/test/rustdoc/attribute-rendering.rs
@@ -0,0 +1,7 @@
1
+#![crate_name = "foo"]
2
+
3
+// @has 'foo/fn.f.html'
4
+// @has - //*[@'class="docblock item-decl"]' '#[export_name = "f"] pub fn f()'
5
+#[export_name = "\
6
+f"]
7
+pub fn f() {}
0 commit comments