Change ty.kind to a method
This commit is contained in:
parent
ef55a0a92f
commit
3e14b684dd
189 changed files with 947 additions and 899 deletions
|
@ -119,7 +119,7 @@ where
|
|||
fn visit_ty(&mut self, ty: Ty<'tcx>) -> bool {
|
||||
let tcx = self.def_id_visitor.tcx();
|
||||
// InternalSubsts are not visited here because they are visited below in `super_visit_with`.
|
||||
match ty.kind {
|
||||
match *ty.kind() {
|
||||
ty::Adt(&ty::AdtDef { did: def_id, .. }, ..)
|
||||
| ty::Foreign(def_id)
|
||||
| ty::FnDef(def_id, ..)
|
||||
|
@ -134,7 +134,7 @@ where
|
|||
// Default type visitor doesn't visit signatures of fn types.
|
||||
// Something like `fn() -> Priv {my_func}` is considered a private type even if
|
||||
// `my_func` is public, so we need to visit signatures.
|
||||
if let ty::FnDef(..) = ty.kind {
|
||||
if let ty::FnDef(..) = ty.kind() {
|
||||
if tcx.fn_sig(def_id).visit_with(self) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue