Skip to content

Commit 8ddcb81

Browse files
committed
Rustup and lazy_static version mismatch fix
fixes rust-lang#2274
1 parent 86da435 commit 8ddcb81

10 files changed

+32
-23
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 0.0.176
5+
* Rustup to *rustc 1.24.0-nightly (0077d128d 2017-12-14)*
6+
47
## 0.0.175
58
* Rustup to *rustc 1.24.0-nightly (bb42071f6 2017-12-01)*
69

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.0.175"
3+
version = "0.0.176"
44
authors = [
55
"Manish Goregaokar <[email protected]>",
66
"Andre Bogus <[email protected]>",
@@ -37,15 +37,15 @@ path = "src/driver.rs"
3737

3838
[dependencies]
3939
# begin automatic update
40-
clippy_lints = { version = "0.0.175", path = "clippy_lints" }
40+
clippy_lints = { version = "0.0.176", path = "clippy_lints" }
4141
# end automatic update
4242
cargo_metadata = "0.2"
4343
regex = "0.2"
4444

4545
[dev-dependencies]
4646
compiletest_rs = "0.3"
4747
duct = "0.8.2"
48-
lazy_static = "0.2"
48+
lazy_static = "1.0"
4949
serde_derive = "1.0"
5050
clippy-mini-macro-test = { version = "0.1", path = "mini-macro" }
5151
serde = "1.0"

clippy_lints/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_lints"
33
# begin automatic update
4-
version = "0.0.175"
4+
version = "0.0.176"
55
# end automatic update
66
authors = [
77
"Manish Goregaokar <[email protected]>",
@@ -17,7 +17,7 @@ keywords = ["clippy", "lint", "plugin"]
1717

1818
[dependencies]
1919
itertools = "0.6.0"
20-
lazy_static = "0.2.8"
20+
lazy_static = "1.0"
2121
matches = "0.1.2"
2222
quine-mc_cluskey = "0.2.2"
2323
regex-syntax = "0.4.0"

clippy_lints/src/missing_doc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
129129
hir::ItemStatic(..) => "a static",
130130
hir::ItemStruct(..) => "a struct",
131131
hir::ItemTrait(..) => "a trait",
132+
hir::ItemTraitAlias(..) => "a trait alias",
132133
hir::ItemGlobalAsm(..) => "an assembly blob",
133134
hir::ItemTy(..) => "a type alias",
134135
hir::ItemUnion(..) => "a union",

clippy_lints/src/utils/inspector.rs

+3
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
403403
println!("trait is not auto");
404404
}
405405
},
406+
hir::ItemTraitAlias(..) => {
407+
println!("trait alias");
408+
}
406409
hir::ItemAutoImpl(_, ref _trait_ref) => {
407410
println!("auto impl");
408411
},

clippy_lints/src/utils/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {
940940
Def::StructCtor(id, ..) |
941941
Def::Union(id) |
942942
Def::Trait(id) |
943+
Def::TraitAlias(id) |
943944
Def::Method(id) |
944945
Def::Const(id) |
945946
Def::AssociatedConst(id) |

src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ pub fn main() {
141141
let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args);
142142
if let Some(first) = target.kind.get(0) {
143143
if target.kind.len() > 1 || first.ends_with("lib") {
144+
println!("lib: {}", target.name);
144145
if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args)) {
145146
std::process::exit(code);
146147
}
147148
} else if ["bin", "example", "test", "bench"].contains(&&**first) {
149+
println!("{}: {}", first, target.name);
148150
if let Err(code) = process(
149151
vec![format!("--{}", first), target.name]
150152
.into_iter()

tests/compile-test.rs

-18
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,3 @@ fn compile_test() {
7272
run_mode("run-pass", "run-pass");
7373
run_mode("ui", "ui");
7474
}
75-
76-
#[test]
77-
fn dogfood() {
78-
prepare_env();
79-
let files = ["src/main.rs", "src/driver.rs", "src/lib.rs", "clippy_lints/src/lib.rs"];
80-
let mut config = config("dogfood", "ui");
81-
config.target_rustcflags = config.target_rustcflags.map(|flags| format!("{} -Dclippy -Dclippy_pedantic -Dclippy_internal", flags));
82-
83-
for file in &files {
84-
let paths = test::TestPaths {
85-
base: PathBuf::new(),
86-
file: PathBuf::from(file),
87-
relative_dir: PathBuf::new(),
88-
};
89-
90-
compiletest::runtest::run(config.clone(), &paths);
91-
}
92-
}

tests/dogfood.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#[test]
2+
fn dogfood() {
3+
let root_dir = std::env::current_dir().unwrap();
4+
for d in &[".", "clippy_lints"] {
5+
std::env::set_current_dir(root_dir.join(d)).unwrap();
6+
let output = std::process::Command::new("cargo")
7+
.arg("run")
8+
.arg("--bin").arg("cargo-clippy")
9+
.arg("--manifest-path").arg(root_dir.join("Cargo.toml"))
10+
.output().unwrap();
11+
println!("status: {}", output.status);
12+
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
13+
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
14+
15+
assert!(output.status.success());
16+
}
17+
}
File renamed without changes.

0 commit comments

Comments
 (0)