-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rust 2018 migration #2821
Conversation
Meh
|
Yea, we're ddosing npm -.- there's a commit in some PR, but it hasn't been merged yet |
@@ -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)] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ^^
This is awesome! @killercup and I were talking about this at some point this in the last 24h. And now there's a PR ❤️ |
The future is now. Let's see how this goes |
@nikomatsakis might be interested to see it. |
Clippy being nightly-only crate can easily migrate to new Rust edition and start using new features.
This PR gives insight of required changes and is was created to open discussion about the migration.
I think it looks mostly fine although I'm not sure about setting edition in
Cargo.toml
just yet.