address review comments
This commit is contained in:
parent
fdbe4ce5c1
commit
4ae8f6ec7c
4 changed files with 97 additions and 9 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue