Appease clippy again

This commit is contained in:
Michael Goulet 2022-09-06 17:27:47 +00:00
parent ac1c68a5e6
commit 854f751b26
6 changed files with 6 additions and 10 deletions

View File

@ -959,7 +959,7 @@ fn binding_ty_auto_deref_stability<'tcx>(
))
.is_sized(cx.tcx.at(DUMMY_SP), cx.param_env.without_caller_bounds()),
),
TyKind::OpaqueDef(..) | TyKind::ImplTraitInTrait(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err => {
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err => {
Position::ReborrowStable(precedence)
},
};

View File

@ -441,7 +441,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
fn visit_ty(&mut self, ty: &'tcx Ty<'_>) {
match ty.kind {
TyKind::OpaqueDef(item, bounds) => {
TyKind::OpaqueDef(item, bounds, _) => {
let map = self.cx.tcx.hir();
let item = map.item(item);
let len = self.lts.len();

View File

@ -103,7 +103,7 @@ fn future_trait_ref<'tcx>(
ty: &'tcx Ty<'tcx>,
) -> Option<(&'tcx TraitRef<'tcx>, Vec<LifetimeName>)> {
if_chain! {
if let TyKind::OpaqueDef(item_id, bounds) = ty.kind;
if let TyKind::OpaqueDef(item_id, bounds, false) = ty.kind;
let item = cx.tcx.hir().item(item_id);
if let ItemKind::OpaqueTy(opaque) = &item.kind;
if let Some(trait_ref) = opaque.bounds.iter().find_map(|bound| {

View File

@ -147,8 +147,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
| hir::ItemKind::TraitAlias(..)
| hir::ItemKind::TyAlias(..)
| hir::ItemKind::Union(..)
| hir::ItemKind::OpaqueTy(..)
| hir::ItemKind::ImplTraitPlaceholder(..) => {},
| hir::ItemKind::OpaqueTy(..) => {},
hir::ItemKind::ExternCrate(..)
| hir::ItemKind::ForeignMod { .. }
| hir::ItemKind::GlobalAsm(..)

View File

@ -128,7 +128,6 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
| hir::ItemKind::TyAlias(..)
| hir::ItemKind::Union(..)
| hir::ItemKind::OpaqueTy(..)
| hir::ItemKind::ImplTraitPlaceholder(..)
| hir::ItemKind::ExternCrate(..)
| hir::ItemKind::ForeignMod { .. }
| hir::ItemKind::Impl { .. }

View File

@ -987,12 +987,10 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
}
},
TyKind::Path(ref qpath) => self.hash_qpath(qpath),
TyKind::OpaqueDef(_, arg_list) => {
TyKind::OpaqueDef(_, arg_list, in_trait) => {
self.hash_generic_args(arg_list);
in_trait.hash(&mut self.s);
},
TyKind::ImplTraitInTrait(_) => {
// Do nothing
}
TyKind::TraitObject(_, lifetime, _) => {
self.hash_lifetime(*lifetime);
},