Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
56
tests/rustdoc/decl_macro.rs
Normal file
56
tests/rustdoc/decl_macro.rs
Normal file
|
@ -0,0 +1,56 @@
|
|||
// compile-flags: --document-private-items
|
||||
|
||||
#![feature(decl_macro)]
|
||||
|
||||
// @has decl_macro/macro.my_macro.html //pre 'pub macro my_macro() {'
|
||||
// @has - //pre '...'
|
||||
// @has - //pre '}'
|
||||
pub macro my_macro() {
|
||||
|
||||
}
|
||||
|
||||
// @has decl_macro/macro.my_macro_2.html //pre 'pub macro my_macro_2($($tok:tt)*) {'
|
||||
// @has - //pre '...'
|
||||
// @has - //pre '}'
|
||||
pub macro my_macro_2($($tok:tt)*) {
|
||||
|
||||
}
|
||||
|
||||
// @has decl_macro/macro.my_macro_multi.html //pre 'pub macro my_macro_multi {'
|
||||
// @has - //pre '(_) => { ... },'
|
||||
// @has - //pre '($foo:ident . $bar:expr) => { ... },'
|
||||
// @has - //pre '($($foo:literal),+) => { ... },'
|
||||
// @has - //pre '}'
|
||||
pub macro my_macro_multi {
|
||||
(_) => {
|
||||
|
||||
},
|
||||
($foo:ident . $bar:expr) => {
|
||||
|
||||
},
|
||||
($($foo:literal),+) => {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// @has decl_macro/macro.by_example_single.html //pre 'pub macro by_example_single($foo:expr) {'
|
||||
// @has - //pre '...'
|
||||
// @has - //pre '}'
|
||||
pub macro by_example_single {
|
||||
($foo:expr) => {}
|
||||
}
|
||||
|
||||
mod a {
|
||||
mod b {
|
||||
// @has decl_macro/a/b/macro.by_example_vis.html //pre 'pub(super) macro by_example_vis($foo:expr) {'
|
||||
pub(in super) macro by_example_vis {
|
||||
($foo:expr) => {}
|
||||
}
|
||||
mod c {
|
||||
// @has decl_macro/a/b/c/macro.by_example_vis_named.html //pre 'pub(in a) macro by_example_vis_named($foo:expr) {'
|
||||
pub(in a) macro by_example_vis_named {
|
||||
($foo:expr) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue