add tests interleaving doc attrib comments and regular comments

This commit is contained in:
Rémy Rakic 2018-09-13 02:27:09 +02:00
parent 6c96ab7c9a
commit cbc58410d9
2 changed files with 21 additions and 1 deletions

View file

@ -24,6 +24,16 @@ mod tests {
}
}
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() {}

View file

@ -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"