]> git.lizzy.rs Git - rust.git/blob - tests/source/skip.rs
Merge pull request #1806 from topecongiro/item-brace-style
[rust.git] / tests / source / skip.rs
1 // Test the skip attribute works
2
3 #[rustfmt_skip]
4 fn foo() { badly; formatted; stuff
5 ; }
6
7 #[rustfmt_skip]
8 trait Foo
9 {
10 fn foo(
11 );
12 }
13
14 impl LateLintPass for UsedUnderscoreBinding {
15     #[cfg_attr(rustfmt, rustfmt_skip)]
16     fn check_expr() { // comment
17     }
18 }
19
20 fn issue1346() {
21     #[cfg_attr(rustfmt, rustfmt_skip)]
22     Box::new(self.inner.call(req).then(move |result| {
23         match result {
24             Ok(resp) => Box::new(future::done(Ok(resp))),
25             Err(e) => {
26                 try_error!(clo_stderr, "{}", e);
27                 Box::new(future::err(e))
28             }
29         }
30     }))
31 }