Add hint for missing lifetime bound on trait object when type alias is used
This commit is contained in:
parent
c8e6a9e8b6
commit
62a1e76d2b
6 changed files with 176 additions and 19 deletions
|
@ -3524,6 +3524,13 @@ impl<'hir> Node<'hir> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn alias_ty(self) -> Option<&'hir Ty<'hir>> {
|
||||
match self {
|
||||
Node::Item(Item { kind: ItemKind::TyAlias(ty, ..), .. }) => Some(ty),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn body_id(&self) -> Option<BodyId> {
|
||||
match self {
|
||||
Node::TraitItem(TraitItem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue