mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Revert "Automatically defines the clippy
feature"
This reverts commit d7ba66bf44
.
It was causing problems with crates with:
```rust
#![cfg_attr(feature="clippy", plugin(clippy))]
```
This commit is contained in:
parent
9ceb708727
commit
e4dceef7e7
3 changed files with 3 additions and 13 deletions
|
@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## 0.0.78 - TBA
|
## 0.0.78 - TBA
|
||||||
* New lints: [`wrong_transmute`]
|
* New lints: [`wrong_transmute`]
|
||||||
|
* For compatibility, `cargo clippy` does not defines the `clippy` feature
|
||||||
|
introduced in 0.0.76 anymore
|
||||||
|
|
||||||
## 0.0.77 — 2016-06-21
|
## 0.0.77 — 2016-06-21
|
||||||
* Rustup to *rustc 1.11.0-nightly (5522e678b 2016-06-20)*
|
* Rustup to *rustc 1.11.0-nightly (5522e678b 2016-06-20)*
|
||||||
|
|
|
@ -326,13 +326,6 @@ You can add options to `allow`/`warn`/`deny`:
|
||||||
|
|
||||||
Note: `deny` produces errors instead of warnings.
|
Note: `deny` produces errors instead of warnings.
|
||||||
|
|
||||||
For convenience, `cargo clippy` automatically defines a `clippy` features. This
|
|
||||||
lets you set lints level and compile with or without clippy transparently:
|
|
||||||
|
|
||||||
```rust
|
|
||||||
#[cfg_attr(feature = "clippy", allow(needless_lifetimes))]
|
|
||||||
```
|
|
||||||
|
|
||||||
## Link with clippy service
|
## Link with clippy service
|
||||||
|
|
||||||
`clippy-service` is a rust web initiative providing `rust-clippy` as a web service.
|
`clippy-service` is a rust web initiative providing `rust-clippy` as a web service.
|
||||||
|
|
|
@ -149,14 +149,11 @@ pub fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut args: Vec<String> = if env::args().any(|s| s == "--sysroot") {
|
let args: Vec<String> = if env::args().any(|s| s == "--sysroot") {
|
||||||
env::args().collect()
|
env::args().collect()
|
||||||
} else {
|
} else {
|
||||||
env::args().chain(Some("--sysroot".to_owned())).chain(Some(sys_root)).collect()
|
env::args().chain(Some("--sysroot".to_owned())).chain(Some(sys_root)).collect()
|
||||||
};
|
};
|
||||||
|
|
||||||
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="clippy""#.to_owned()]);
|
|
||||||
|
|
||||||
let (result, _) = rustc_driver::run_compiler(&args, &mut ClippyCompilerCalls::new());
|
let (result, _) = rustc_driver::run_compiler(&args, &mut ClippyCompilerCalls::new());
|
||||||
|
|
||||||
if let Err(err_count) = result {
|
if let Err(err_count) = result {
|
||||||
|
@ -187,8 +184,6 @@ fn process<P, I>(old_args: I, dep_path: P, sysroot: &str) -> Result<(), i32>
|
||||||
args.push(String::from("--sysroot"));
|
args.push(String::from("--sysroot"));
|
||||||
args.push(sysroot.to_owned());
|
args.push(sysroot.to_owned());
|
||||||
args.push("-Zno-trans".to_owned());
|
args.push("-Zno-trans".to_owned());
|
||||||
args.push("--cfg".to_owned());
|
|
||||||
args.push(r#"feature="clippy""#.to_owned());
|
|
||||||
|
|
||||||
let path = std::env::current_exe().expect("current executable path invalid");
|
let path = std::env::current_exe().expect("current executable path invalid");
|
||||||
let exit_status = std::process::Command::new("cargo")
|
let exit_status = std::process::Command::new("cargo")
|
||||||
|
|
Loading…
Reference in a new issue