Skip to content

Commit 71fe8f7

Browse files
committed
Add test for submodules in inner crate
1 parent 9eb6394 commit 71fe8f7

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![crate_name = "a"]
2+
3+
pub mod bar {
4+
pub struct Bar;
5+
}
6+
7+
pub mod foo {
8+
use crate::bar;
9+
/// link to [bar::Bar]
10+
pub struct Foo;
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// aux-build:submodule-inner.rs
2+
// build-aux-docs
3+
extern crate a;
4+
5+
// @has 'submodule_inner/struct.Foo.html' '//a[@href="../a/bar/struct.Bar.html"]' 'Bar'
6+
pub use a::foo::Foo;
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// aux-build:submodule.rs
1+
// aux-build:submodule-outer.rs
22
// edition:2018
33
extern crate bar as bar_;
44

@@ -9,6 +9,6 @@ pub mod bar {
99

1010
// NOTE: we re-exported both `Foo` and `Bar` here,
1111
// NOTE: so they are inlined and therefore we link to the current module.
12-
// @has 'submodule/trait.Foo.html' '//a[@href="../submodule/bar/trait.Bar.html"]' 'Bar'
13-
// @has 'submodule/trait.Foo.html' '//a[@href="../submodule/trait.Baz.html"]' 'Baz'
12+
// @has 'submodule_outer/trait.Foo.html' '//a[@href="../submodule_outer/bar/trait.Bar.html"]' 'Bar'
13+
// @has 'submodule_outer/trait.Foo.html' '//a[@href="../submodule_outer/trait.Baz.html"]' 'Baz'
1414
pub use ::bar_::{Foo, Baz};

0 commit comments

Comments
 (0)