add tests interleaving doc attrib comments and regular comments
This commit is contained in:
parent
6c96ab7c9a
commit
cbc58410d9
2 changed files with 21 additions and 1 deletions
|
@ -18,12 +18,22 @@ mod tests {
|
|||
#[doc = "Level 3 comment"]
|
||||
fn f() {
|
||||
#[doc = "Level 4 comment"]
|
||||
fn g() {
|
||||
fn g() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct C {
|
||||
#[doc = "item doc attrib comment"]
|
||||
// regular item comment
|
||||
b: i32,
|
||||
|
||||
// regular item comment
|
||||
#[doc = "item doc attrib comment"]
|
||||
c: i32,
|
||||
}
|
||||
|
||||
// non-regression test for regular attributes, from #2647
|
||||
#[cfg(feature = "this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")]
|
||||
pub fn foo() {}
|
||||
|
|
|
@ -28,6 +28,16 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
struct C {
|
||||
/// item doc attrib comment
|
||||
// regular item comment
|
||||
b: i32,
|
||||
|
||||
// regular item comment
|
||||
/// item doc attrib comment
|
||||
c: i32,
|
||||
}
|
||||
|
||||
// non-regression test for regular attributes, from #2647
|
||||
#[cfg(
|
||||
feature = "this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
|
Loading…
Reference in a new issue