rust/tests/source/issue-2781.rs
hafiz 5e7fb45533 Pick up comments between visibility modifier and item name (#4239)
* Pick up comments between visibility modifier and item name

I don't think this hurts to fix. #2781, which surfaced this issue, has
a number of comments relating to similar but slightly different issues
(i.e. dropped comments in other places). I can mark #2781 as closed and
then will open new issues for the comments that are not already resolved
or tracked.

Closes #2781

* fixup! Pick up comments between visibility modifier and item name

* fixup! Pick up comments between visibility modifier and item name
2020-11-29 13:26:58 -06:00

12 lines
231 B
Rust

pub // Oh, no. A line comment.
struct Foo {}
pub /* Oh, no. A block comment. */ struct Foo {}
mod inner {
pub // Oh, no. A line comment.
struct Foo {}
pub /* Oh, no. A block comment. */ struct Foo {}
}