diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f4c1d004..96a1e7e5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.0.209 +* Rustup to *rustc 1.28.0-nightly (523097979 2018-06-18)* + ## 0.0.208 * Rustup to *rustc 1.28.0-nightly (86a8f1a63 2018-06-17)* diff --git a/Cargo.toml b/Cargo.toml index 1bb86b08c..de2db9604 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ cargo-features = ["edition"] [package] name = "clippy" -version = "0.0.208" +version = "0.0.209" authors = [ "Manish Goregaokar ", "Andre Bogus ", @@ -40,7 +40,7 @@ path = "src/driver.rs" [dependencies] # begin automatic update -clippy_lints = { version = "0.0.208", path = "clippy_lints" } +clippy_lints = { version = "0.0.209", path = "clippy_lints" } # end automatic update regex = "1" semver = "0.9" diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index e1dc29b53..be46cda49 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -3,7 +3,7 @@ cargo-features = ["edition"] [package] name = "clippy_lints" # begin automatic update -version = "0.0.208" +version = "0.0.209" # end automatic update authors = [ "Manish Goregaokar ", diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index 42f8da7c9..e45996310 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -327,10 +327,12 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> { TyPath(ref path) => { self.collect_anonymous_lifetimes(path, ty); }, - TyImplTraitExistential(ref exist_ty, _) => { - for bound in &exist_ty.bounds { - if let RegionTyParamBound(_) = *bound { - self.record(&None); + TyImplTraitExistential(exist_ty_id, _, _) => { + if let ItemExistential(ref exist_ty) = self.cx.tcx.hir.expect_item(exist_ty_id.id).node { + for bound in &exist_ty.bounds { + if let RegionTyParamBound(_) = *bound { + self.record(&None); + } } } } diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs index 94d1ab0ae..ebb3869f4 100644 --- a/clippy_lints/src/missing_doc.rs +++ b/clippy_lints/src/missing_doc.rs @@ -143,6 +143,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc { hir::ItemGlobalAsm(..) => "an assembly blob", hir::ItemTy(..) => "a type alias", hir::ItemUnion(..) => "a union", + hir::ItemExistential(..) => "an existential type", hir::ItemExternCrate(..) | hir::ItemForeignMod(..) | hir::ItemImpl(..) | diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index cab9adc7b..46b65cf39 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -380,6 +380,9 @@ fn print_item(cx: &LateContext, item: &hir::Item) { hir::ItemTy(..) => { println!("type alias for {:?}", cx.tcx.type_of(did)); }, + hir::ItemExistential(..) => { + println!("existential type with real type {:?}", cx.tcx.type_of(did)); + }, hir::ItemEnum(..) => { println!("enum definition of type {:?}", cx.tcx.type_of(did)); }, diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 6c3f0c25a..02391cde6 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -981,6 +981,7 @@ pub fn opt_def_id(def: Def) -> Option { Def::Const(id) | Def::AssociatedConst(id) | Def::Macro(id, ..) | + Def::Existential(id) | Def::GlobalAsm(id) => Some(id), Def::Upvar(..) | Def::Local(_) | Def::Label(..) | Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => None, diff --git a/min_version.txt b/min_version.txt index f14456b1e..7971ed2b3 100644 --- a/min_version.txt +++ b/min_version.txt @@ -1,7 +1,7 @@ -rustc 1.28.0-nightly (86a8f1a63 2018-06-17) +rustc 1.28.0-nightly (523097979 2018-06-18) binary: rustc -commit-hash: 86a8f1a6374dd558ebdafe061e61720a73ae732c -commit-date: 2018-06-17 +commit-hash: 5230979794db209de492b3f7cc688020b72bc7c6 +commit-date: 2018-06-18 host: x86_64-unknown-linux-gnu release: 1.28.0-nightly LLVM version: 6.0