Skip to content

Commit

Permalink
Add some discription to the test file
Browse files Browse the repository at this point in the history
  • Loading branch information
longfangsong committed Apr 9, 2021
1 parent 7ee35c6 commit f9df01a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/rustdoc/glob-shadowing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@
// @has - '//div[@class="docblock"]' 'sub2::describe'

mod sub1 {
// this should be shadowed by sub2::describe
/// sub1::describe
pub fn describe() -> &'static str {
"sub1::describe"
}

// this should be shadowed by mod::prelude
/// sub1::prelude
pub mod prelude {
pub use super::describe;
}

// this should not be shadowed, because sub1::Foo and mod::Foo are in different namespace
/// sub1::Foo (struct)
pub struct Foo;
}
Expand Down

0 comments on commit f9df01a

Please sign in to comment.