about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-09-14 02:19:28 +0000
committerbors <bors@rust-lang.org>2019-09-14 02:19:28 +0000
commitfdd48565d0c8a9e6fedd8c6db951ee46577b5f54 (patch)
tree5d5b9d1cae0f42ae984aa492c94d820461e88145 /src/test/rustdoc
parentd097af105526a8defe413c64d79766333bb2085b (diff)
parente0862784a1550dc1e07249c8967179a09b091141 (diff)
Auto merge of #64438 - cuviper:beta-rollup, r=Mark-Simulacrum
[beta] Rollup backports

Cherry-picked:

- Permit unwinding through FFI by default #62603
- pprust: Do not print spaces before some tokens #63897
- Account for doc comments coming from proc macros without spans #63930
- Support "soft" feature-gating using a lint #64066
- Update xLTO compatibility table in rustc book. #64092
- Include compiler-rt in the source tarball #64240
- Update LLVM submodule #64317

r? @Mark-Simulacrum
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/auxiliary/through-proc-macro-aux.rs20
-rw-r--r--src/test/rustdoc/through-proc-macro.rs12
2 files changed, 32 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/through-proc-macro-aux.rs b/src/test/rustdoc/auxiliary/through-proc-macro-aux.rs
new file mode 100644
index 00000000000..5c4a01ee3a7
--- /dev/null
+++ b/src/test/rustdoc/auxiliary/through-proc-macro-aux.rs
@@ -0,0 +1,20 @@
+// force-host
+// no-prefer-dynamic
+#![crate_type = "proc-macro"]
+#![crate_name="some_macros"]
+
+extern crate proc_macro;
+use proc_macro::TokenStream;
+
+#[proc_macro_attribute]
+pub fn first(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    item // This doesn't erase the spans.
+}
+
+#[proc_macro_attribute]
+pub fn second(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    // Make a new `TokenStream` to erase the spans:
+    let mut out: TokenStream = TokenStream::new();
+    out.extend(item);
+    out
+}
diff --git a/src/test/rustdoc/through-proc-macro.rs b/src/test/rustdoc/through-proc-macro.rs
new file mode 100644
index 00000000000..348c9eea2dc
--- /dev/null
+++ b/src/test/rustdoc/through-proc-macro.rs
@@ -0,0 +1,12 @@
+// aux-build:through-proc-macro-aux.rs
+// build-aux-docs
+#![warn(intra_doc_link_resolution_failure)]
+extern crate some_macros;
+
+#[some_macros::second]
+pub enum Boom {
+    /// [Oooops]
+    Bam,
+}
+
+fn main() {}