Add test for re-exports

I had a hard time getting this to work without the `extern crate`,
suggestions are welcome.
This commit is contained in:
Joshua Nelson 2020-06-07 21:48:31 -04:00
parent 99f34d814e
commit e78d499637
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#![crate_name = "bar"]
pub trait Foo {
/// [`Bar`] [`Baz`]
fn foo();
}
pub trait Bar {
}
pub trait Baz {
}

View file

@ -1,5 +1,7 @@
// aux-build:intra-doc-basic.rs
// build-aux-docs
// from https://github.com/rust-lang/rust/issues/65983
extern crate a;
// @has 'basic/struct.Bar.html' '//a[@href="../a/struct.Foo.html"]' 'Foo'

View file

@ -0,0 +1,14 @@
// aux-build:submodule.rs
// edition:2018
extern crate bar as bar_;
// from https://github.com/rust-lang/rust/issues/60883
pub mod bar {
pub use ::bar_::Bar;
}
// NOTE: we re-exported both `Foo` and `Bar` here,
// NOTE: so they are inlined and therefore we link to the current module.
// @has 'submodule/trait.Foo.html' '//a[@href="../submodule/bar/trait.Bar.html"]' 'Bar'
// @has 'submodule/trait.Foo.html' '//a[@href="../submodule/trait.Baz.html"]' 'Baz'
pub use ::bar_::{Foo, Baz};