make error emitted on impl &Trait
nicer
This commit is contained in:
parent
ca5d92d789
commit
e590b93499
4 changed files with 154 additions and 5 deletions
|
@ -2032,7 +2032,8 @@ impl Clone for Ty {
|
|||
impl Ty {
|
||||
pub fn peel_refs(&self) -> &Self {
|
||||
let mut final_ty = self;
|
||||
while let TyKind::Ref(_, MutTy { ty, .. }) = &final_ty.kind {
|
||||
while let TyKind::Ref(_, MutTy { ty, .. }) | TyKind::Ptr(MutTy { ty, .. }) = &final_ty.kind
|
||||
{
|
||||
final_ty = ty;
|
||||
}
|
||||
final_ty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue