rust/tests/target/attrib.rs
Nick Cameron c696dcf8da Handle attributes on modules (#968)
* Handle attributes (including doc comments) on inline modules

Closes #22
Closes #684

* Tweak the rules for changing indentation in comments (to do it less often).
2016-05-02 10:54:25 +02:00

40 lines
837 B
Rust

// rustfmt-wrap_comments: true
// Test attributes and doc comments are preserved.
/// Blah blah blah.
/// Blah blah blah.
/// Blah blah blah.
/// Blah blah blah.
/// Blah blah blah.
impl Bar {
/// Blah blah blooo.
/// Blah blah blooo.
/// Blah blah blooo.
/// Blah blah blooo.
#[an_attribute]
fn foo(&mut self) -> isize {}
/// Blah blah bing.
/// Blah blah bing.
/// Blah blah bing.
/// Blah blah bing.
/// Blah blah bing.
/// Blah blah bing.
pub fn f2(self) {
(foo, bar)
}
#[another_attribute]
fn f3(self) -> Dog {}
/// Blah blah bing.
#[attrib1]
/// Blah blah bing.
#[attrib2]
// Another comment that needs rewrite because it's
// tooooooooooooooooooooooooooooooo loooooooooooong.
/// Blah blah bing.
fn f4(self) -> Cat {}
}