1
Fork 0

Rollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj

Handle existential types in dead code analysis

fixes #55124

r? @cramertj
This commit is contained in:
Pietro Albini 2018-12-05 23:54:32 +01:00 committed by GitHub
commit 1276ffeba2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -166,6 +166,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
hir::ItemKind::Fn(..)
| hir::ItemKind::Ty(..)
| hir::ItemKind::Static(..)
| hir::ItemKind::Existential(..)
| hir::ItemKind::Const(..) => {
intravisit::walk_item(self, &item);
}

View file

@ -0,0 +1,13 @@
// compile-pass
#[deny(warnings)]
enum Empty { }
trait Bar<T> {}
impl Bar<Empty> for () {}
fn boo() -> impl Bar<Empty> {}
fn main() {
boo();
}