diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-06-17 14:54:28 -0500 |
|---|---|---|
| committer | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-06-17 14:59:49 -0500 |
| commit | d4387b3e4f9c6da5009154882051ff7b4862df07 (patch) | |
| tree | f8d9a0e713ee1a454ed51a2fe26f3453d55d555f /src/test/rustdoc/inline_cross | |
| parent | 499583aa92203845353c45001e56d0dbe281e270 (diff) | |
| download | rust-d4387b3e4f9c6da5009154882051ff7b4862df07.tar.gz rust-d4387b3e4f9c6da5009154882051ff7b4862df07.zip | |
rustdoc: import cross-crate macros alongside everything else
Diffstat (limited to 'src/test/rustdoc/inline_cross')
| -rw-r--r-- | src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs | 35 | ||||
| -rw-r--r-- | src/test/rustdoc/inline_cross/macro-vis.rs | 42 |
2 files changed, 77 insertions, 0 deletions
diff --git a/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs b/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs new file mode 100644 index 00000000000..d4a9a9f379b --- /dev/null +++ b/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs @@ -0,0 +1,35 @@ +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_name = "qwop"] + +/// (writen on a spider's web) Some Macro +#[macro_export] +macro_rules! some_macro { + () => { + println!("this is some macro, for sure"); + }; +} + +/// Some other macro, to fill space. +#[macro_export] +macro_rules! other_macro { + () => { + println!("this is some other macro, whatev"); + }; +} + +/// This macro is so cool, it's Super. +#[macro_export] +macro_rules! super_macro { + () => { + println!("is it a bird? a plane? no, it's Super Macro!"); + }; +} diff --git a/src/test/rustdoc/inline_cross/macro-vis.rs b/src/test/rustdoc/inline_cross/macro-vis.rs new file mode 100644 index 00000000000..4dde19f2a0a --- /dev/null +++ b/src/test/rustdoc/inline_cross/macro-vis.rs @@ -0,0 +1,42 @@ +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:macro-vis.rs +// build-aux-docs +// ignore-cross-compile + +#![feature(use_extern_macros)] + +#[macro_use] extern crate qwop; + +// @has macro_vis/macro.some_macro.html +// @has macro_vis/index.html '//a/@href' 'macro.some_macro.html' +pub use qwop::some_macro; + +// @!has macro_vis/macro.other_macro.html +// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html' +// @!has - '//code' 'pub use qwop::other_macro;' +#[doc(hidden)] +pub use qwop::other_macro; + +// @has macro_vis/index.html '//code' 'pub use qwop::super_macro;' +// @!has macro_vis/macro.super_macro.html +#[doc(no_inline)] +pub use qwop::super_macro; + +// @has macro_vis/macro.this_is_dope.html +// @has macro_vis/index.html '//a/@href' 'macro.this_is_dope.html' +/// What it says on the tin. +#[macro_export] +macro_rules! this_is_dope { + () => { + println!("yo check this out"); + }; +} |
