Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust 2018 migration #2821

Merged
merged 4 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#![allow(stable_features)]
#![feature(iterator_find_map)]
#![feature(macro_at_most_once_rep)]
#![feature(rust_2018_preview)]

extern crate cargo_metadata;
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/new_without_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NewWithoutDefault {
}

fn create_new_without_default_suggest_msg(ty: Ty) -> String {
#[rustfmt_skip]
#[cfg_attr(rustfmt, rustfmt_skip)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that should be #[rustfmt::skip] without the cfg_attr

Copy link
Contributor Author

@mati865 mati865 May 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought about it but decided to keep it more consistent with current code base.

click here for `rg` output
$ rg "rustfmt" .     
pre_publish.sh
23:echo "remember to add a git tag and running 'cargo test' before committing the rustfmt changes"

tests/trim_multiline.rs
16:#[cfg_attr(rustfmt, rustfmt_skip)]
41:#[cfg_attr(rustfmt, rustfmt_skip)]

tests/needless_continue_helpers.rs
8:#[cfg_attr(rustfmt, rustfmt_skip)]
26:#[cfg_attr(rustfmt, rustfmt_skip)]
38:#[cfg_attr(rustfmt, rustfmt_skip)]
57:#[cfg_attr(rustfmt, rustfmt_skip)]
73:#[cfg_attr(rustfmt, rustfmt_skip)]

clippy_lints/src/new_without_default.rs
156:    #[cfg_attr(rustfmt, rustfmt_skip)]

clippy_lints/src/loops.rs
1781:#[cfg_attr(rustfmt, rustfmt_skip)]

clippy_lints/src/non_expressive_names.rs
91:#[cfg_attr(rustfmt, rustfmt_skip)]

clippy_lints/src/methods.rs
1824:#[cfg_attr(rustfmt, rustfmt_skip)]
1834:#[cfg_attr(rustfmt, rustfmt_skip)]
1868:#[cfg_attr(rustfmt, rustfmt_skip)]

clippy_lints/src/matches.rs
200:#[cfg_attr(rustfmt, rustfmt_skip)]

clippy_lints/src/lib.rs
211:#[cfg_attr(rustfmt, rustfmt_skip)]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh ^^

format!(
"impl Default for {} {{
fn default() -> Self {{
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// error-pattern:cargo-clippy
#![feature(plugin_registrar)]
#![feature(rust_2018_preview)]
#![feature(rustc_private)]
#![feature(macro_vis_matcher)]
#![allow(unknown_lints)]
Expand Down