fix TraitItemKind::expect_type
docs
This commit is contained in:
parent
b2ef837b6c
commit
883145f75d
1 changed files with 1 additions and 1 deletions
|
@ -2288,7 +2288,7 @@ impl<'hir> TraitItem<'hir> {
|
|||
(ty, trfn)
|
||||
}
|
||||
|
||||
/// Expect an [`TraitItemKind::ExternCrate`] or panic.
|
||||
/// Expect an [`TraitItemKind::Type`] or panic.
|
||||
#[track_caller]
|
||||
pub fn expect_type(&self) -> (GenericBounds<'hir>, Option<&'hir Ty<'hir>>) {
|
||||
let TraitItemKind::Type(bounds, ty) = self.kind else { self.expect_failed("a type") };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue