Skip to content

Commit 26f3feb

Browse files
committed
Add rust_2018_preview feature and fix rustfmt annotation
1 parent 8ed8ee8 commit 26f3feb

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

clippy_lints/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![allow(stable_features)]
1212
#![feature(iterator_find_map)]
1313
#![feature(macro_at_most_once_rep)]
14+
#![feature(rust_2018_preview)]
1415

1516
extern crate cargo_metadata;
1617
#[macro_use]

clippy_lints/src/new_without_default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NewWithoutDefault {
153153
}
154154

155155
fn create_new_without_default_suggest_msg(ty: Ty) -> String {
156-
#[rustfmt_skip]
156+
#[cfg_attr(rustfmt, rustfmt_skip)]
157157
format!(
158158
"impl Default for {} {{
159159
fn default() -> Self {{

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// error-pattern:cargo-clippy
22
#![feature(plugin_registrar)]
3+
#![feature(rust_2018_preview)]
34
#![feature(rustc_private)]
45
#![feature(macro_vis_matcher)]
56
#![allow(unknown_lints)]

0 commit comments

Comments
 (0)