Skip to content

Commit e4dceef

Browse files
committed
Revert "Automatically defines the clippy feature"
This reverts commit d7ba66b. It was causing problems with crates with: ```rust #![cfg_attr(feature="clippy", plugin(clippy))] ```
1 parent 9ceb708 commit e4dceef

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
33

44
## 0.0.78 - TBA
55
* New lints: [`wrong_transmute`]
6+
* For compatibility, `cargo clippy` does not defines the `clippy` feature
7+
introduced in 0.0.76 anymore
68

79
## 0.0.77 — 2016-06-21
810
* Rustup to *rustc 1.11.0-nightly (5522e678b 2016-06-20)*

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,6 @@ You can add options to `allow`/`warn`/`deny`:
326326

327327
Note: `deny` produces errors instead of warnings.
328328

329-
For convenience, `cargo clippy` automatically defines a `clippy` features. This
330-
lets you set lints level and compile with or without clippy transparently:
331-
332-
```rust
333-
#[cfg_attr(feature = "clippy", allow(needless_lifetimes))]
334-
```
335-
336329
## Link with clippy service
337330

338331
`clippy-service` is a rust web initiative providing `rust-clippy` as a web service.

src/main.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,11 @@ pub fn main() {
149149
}
150150
}
151151
} else {
152-
let mut args: Vec<String> = if env::args().any(|s| s == "--sysroot") {
152+
let args: Vec<String> = if env::args().any(|s| s == "--sysroot") {
153153
env::args().collect()
154154
} else {
155155
env::args().chain(Some("--sysroot".to_owned())).chain(Some(sys_root)).collect()
156156
};
157-
158-
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="clippy""#.to_owned()]);
159-
160157
let (result, _) = rustc_driver::run_compiler(&args, &mut ClippyCompilerCalls::new());
161158

162159
if let Err(err_count) = result {
@@ -187,8 +184,6 @@ fn process<P, I>(old_args: I, dep_path: P, sysroot: &str) -> Result<(), i32>
187184
args.push(String::from("--sysroot"));
188185
args.push(sysroot.to_owned());
189186
args.push("-Zno-trans".to_owned());
190-
args.push("--cfg".to_owned());
191-
args.push(r#"feature="clippy""#.to_owned());
192187

193188
let path = std::env::current_exe().expect("current executable path invalid");
194189
let exit_status = std::process::Command::new("cargo")

0 commit comments

Comments
 (0)