Auto merge of #4284 - flip1995:rustfmt, r=phansch

Format code

changelog: none
This commit is contained in:
bors 2019-07-18 17:16:28 +00:00
commit e9ff319f3e
2 changed files with 8 additions and 3 deletions

View file

@ -63,6 +63,7 @@ impl<'a, 'tcx> DoubleComparisons {
);
}};
}
#[rustfmt::skip]
match (op, lkind, rkind) {
(BinOpKind::Or, BinOpKind::Eq, BinOpKind::Lt) | (BinOpKind::Or, BinOpKind::Lt, BinOpKind::Eq) => {
lint_double_comparison!(<=)

View file

@ -2,13 +2,17 @@
#![deny(rust_2018_idioms)]
extern crate proc_macro;
use proc_macro::{TokenStream, quote};
use proc_macro::{quote, TokenStream};
#[proc_macro_derive(ClippyMiniMacroTest)]
pub fn mini_macro(_: TokenStream) -> TokenStream {
quote!(
#[allow(unused)] fn needless_take_by_value(s: String) { println!("{}", s.len()); }
#[allow(unused)] fn needless_loop(items: &[u8]) {
#[allow(unused)]
fn needless_take_by_value(s: String) {
println!("{}", s.len());
}
#[allow(unused)]
fn needless_loop(items: &[u8]) {
for i in 0..items.len() {
println!("{}", items[i]);
}