Skip to content

Commit

Permalink
Rustup and lazy_static version mismatch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 15, 2017
1 parent 86da435 commit 8ddcb81
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.

## 0.0.176
* Rustup to *rustc 1.24.0-nightly (0077d128d 2017-12-14)*

## 0.0.175
* Rustup to *rustc 1.24.0-nightly (bb42071f6 2017-12-01)*

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.0.175"
version = "0.0.176"
authors = [
"Manish Goregaokar <[email protected]>",
"Andre Bogus <[email protected]>",
Expand Down Expand Up @@ -37,15 +37,15 @@ path = "src/driver.rs"

[dependencies]
# begin automatic update
clippy_lints = { version = "0.0.175", path = "clippy_lints" }
clippy_lints = { version = "0.0.176", path = "clippy_lints" }
# end automatic update
cargo_metadata = "0.2"
regex = "0.2"

[dev-dependencies]
compiletest_rs = "0.3"
duct = "0.8.2"
lazy_static = "0.2"
lazy_static = "1.0"
serde_derive = "1.0"
clippy-mini-macro-test = { version = "0.1", path = "mini-macro" }
serde = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clippy_lints"
# begin automatic update
version = "0.0.175"
version = "0.0.176"
# end automatic update
authors = [
"Manish Goregaokar <[email protected]>",
Expand All @@ -17,7 +17,7 @@ keywords = ["clippy", "lint", "plugin"]

[dependencies]
itertools = "0.6.0"
lazy_static = "0.2.8"
lazy_static = "1.0"
matches = "0.1.2"
quine-mc_cluskey = "0.2.2"
regex-syntax = "0.4.0"
Expand Down
1 change: 1 addition & 0 deletions clippy_lints/src/missing_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
hir::ItemStatic(..) => "a static",
hir::ItemStruct(..) => "a struct",
hir::ItemTrait(..) => "a trait",
hir::ItemTraitAlias(..) => "a trait alias",
hir::ItemGlobalAsm(..) => "an assembly blob",
hir::ItemTy(..) => "a type alias",
hir::ItemUnion(..) => "a union",
Expand Down
3 changes: 3 additions & 0 deletions clippy_lints/src/utils/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
println!("trait is not auto");
}
},
hir::ItemTraitAlias(..) => {
println!("trait alias");
}
hir::ItemAutoImpl(_, ref _trait_ref) => {
println!("auto impl");
},
Expand Down
1 change: 1 addition & 0 deletions clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {
Def::StructCtor(id, ..) |
Def::Union(id) |
Def::Trait(id) |
Def::TraitAlias(id) |
Def::Method(id) |
Def::Const(id) |
Def::AssociatedConst(id) |
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@ pub fn main() {
let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args);
if let Some(first) = target.kind.get(0) {
if target.kind.len() > 1 || first.ends_with("lib") {
println!("lib: {}", target.name);
if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args)) {
std::process::exit(code);
}
} else if ["bin", "example", "test", "bench"].contains(&&**first) {
println!("{}: {}", first, target.name);
if let Err(code) = process(
vec![format!("--{}", first), target.name]
.into_iter()
Expand Down
18 changes: 0 additions & 18 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,3 @@ fn compile_test() {
run_mode("run-pass", "run-pass");
run_mode("ui", "ui");
}

#[test]
fn dogfood() {
prepare_env();
let files = ["src/main.rs", "src/driver.rs", "src/lib.rs", "clippy_lints/src/lib.rs"];
let mut config = config("dogfood", "ui");
config.target_rustcflags = config.target_rustcflags.map(|flags| format!("{} -Dclippy -Dclippy_pedantic -Dclippy_internal", flags));

for file in &files {
let paths = test::TestPaths {
base: PathBuf::new(),
file: PathBuf::from(file),
relative_dir: PathBuf::new(),
};

compiletest::runtest::run(config.clone(), &paths);
}
}
17 changes: 17 additions & 0 deletions tests/dogfood.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#[test]
fn dogfood() {
let root_dir = std::env::current_dir().unwrap();
for d in &[".", "clippy_lints"] {
std::env::set_current_dir(root_dir.join(d)).unwrap();
let output = std::process::Command::new("cargo")
.arg("run")
.arg("--bin").arg("cargo-clippy")
.arg("--manifest-path").arg(root_dir.join("Cargo.toml"))
.output().unwrap();
println!("status: {}", output.status);
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));

assert!(output.status.success());
}
}
File renamed without changes.

0 comments on commit 8ddcb81

Please sign in to comment.