Skip to content

Commit

Permalink
Add tests for macro@ and derive@
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jun 10, 2020
1 parent 1784655 commit 34c6b38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/test/rustdoc/intra-link-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// aux-build:intra-link-proc-macro-macro.rs
// build-aux-docs
// @has intra_link_proc_macro/index.html
#![deny(intra_doc_link_resolution_failure)]

extern crate intra_link_proc_macro_macro;
Expand All @@ -9,6 +8,7 @@ extern crate intra_link_proc_macro_macro;
pub use intra_link_proc_macro_macro::{DeriveA, attr_a};
use intra_link_proc_macro_macro::{DeriveB, attr_b};

// @has intra_link_proc_macro/struct.Foo.html
// @has - '//a/@href' '../intra_link_proc_macro/derive.DeriveA.html'
// @has - '//a/@href' '../intra_link_proc_macro/attr.attr_a.html'
// @has - '//a/@href' '../intra_link_proc_macro/trait.DeriveTrait.html'
Expand All @@ -17,5 +17,11 @@ use intra_link_proc_macro_macro::{DeriveB, attr_b};
/// Link to [DeriveA], [attr_a], [DeriveB], [attr_b], [DeriveTrait]
pub struct Foo;

// @has intra_link_proc_macro/struct.Bar.html
// @has - '//a/@href' '../intra_link_proc_macro/derive.DeriveA.html'
// @has - '//a/@href' '../intra_link_proc_macro/attr.attr_a.html'
/// Link to [deriveA](derive@DeriveA) [attr](macro@attr_a)
pub struct Bar;

// this should not cause ambiguity errors
pub trait DeriveTrait {}

0 comments on commit 34c6b38

Please sign in to comment.