mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
fix TraitItemKind::expect_type
docs
This commit is contained in:
parent
b2ef837b6c
commit
883145f75d
@ -2288,7 +2288,7 @@ impl<'hir> TraitItem<'hir> {
|
|||||||
(ty, trfn)
|
(ty, trfn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Expect an [`TraitItemKind::ExternCrate`] or panic.
|
/// Expect an [`TraitItemKind::Type`] or panic.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn expect_type(&self) -> (GenericBounds<'hir>, Option<&'hir Ty<'hir>>) {
|
pub fn expect_type(&self) -> (GenericBounds<'hir>, Option<&'hir Ty<'hir>>) {
|
||||||
let TraitItemKind::Type(bounds, ty) = self.kind else { self.expect_failed("a type") };
|
let TraitItemKind::Type(bounds, ty) = self.kind else { self.expect_failed("a type") };
|
||||||
|
Loading…
Reference in New Issue
Block a user