1
Fork 0

address review comments

This commit is contained in:
Esteban Küber 2020-10-09 16:51:54 -07:00
parent fdbe4ce5c1
commit 4ae8f6ec7c
4 changed files with 97 additions and 9 deletions

View file

@ -1884,6 +1884,16 @@ impl Clone for Ty {
}
}
impl Ty {
pub fn peel_refs(&self) -> &Self {
let mut final_ty = self;
while let TyKind::Rptr(_, MutTy { ty, .. }) = &final_ty.kind {
final_ty = &ty;
}
final_ty
}
}
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct BareFnTy {
pub unsafety: Unsafe,