Fix style issues
This commit is contained in:
parent
bcb5c6fe5f
commit
459550b537
@ -80,8 +80,12 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
|
|||||||
self.get_auto_trait_impls(did, &def_ctor, Some(name))
|
self.get_auto_trait_impls(did, &def_ctor, Some(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_real_ty<F>(&self, def_id: DefId, def_ctor: &F, real_name: &Option<Ident>,
|
fn get_real_ty<F>(&self,
|
||||||
generics: &ty::Generics) -> hir::Ty
|
def_id: DefId,
|
||||||
|
def_ctor: &F,
|
||||||
|
real_name: &Option<Ident>,
|
||||||
|
generics: &ty::Generics,
|
||||||
|
) -> hir::Ty
|
||||||
where F: Fn(DefId) -> Def {
|
where F: Fn(DefId) -> Def {
|
||||||
let path = get_path_for_type(self.cx.tcx, def_id, def_ctor);
|
let path = get_path_for_type(self.cx.tcx, def_id, def_ctor);
|
||||||
let mut segments = path.segments.into_vec();
|
let mut segments = path.segments.into_vec();
|
||||||
@ -151,11 +155,9 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
|
|||||||
let generics = infcx.tcx.generics_of(impl_def_id);
|
let generics = infcx.tcx.generics_of(impl_def_id);
|
||||||
let trait_ref = infcx.tcx.impl_trait_ref(impl_def_id).unwrap();
|
let trait_ref = infcx.tcx.impl_trait_ref(impl_def_id).unwrap();
|
||||||
|
|
||||||
if !match infcx.tcx.type_of(impl_def_id).sty {
|
match infcx.tcx.type_of(impl_def_id).sty {
|
||||||
::rustc::ty::TypeVariants::TyParam(_) => true,
|
::rustc::ty::TypeVariants::TyParam(_) => {},
|
||||||
_ => false,
|
_ => return,
|
||||||
} {
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let substs = infcx.fresh_substs_for_item(DUMMY_SP, def_id);
|
let substs = infcx.fresh_substs_for_item(DUMMY_SP, def_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user