Skip to content

Commit af86816

Browse files
Remove unused descr methods
1 parent a8bb3f0 commit af86816

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

compiler/rustc_hir/src/hir.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,15 +3141,6 @@ pub enum TraitItemKind<'hir> {
31413141
/// type.
31423142
Type(GenericBounds<'hir>, Option<&'hir Ty<'hir>>),
31433143
}
3144-
impl TraitItemKind<'_> {
3145-
pub fn descr(&self) -> &'static str {
3146-
match self {
3147-
TraitItemKind::Const(..) => "associated constant",
3148-
TraitItemKind::Fn(..) => "function",
3149-
TraitItemKind::Type(..) => "associated type",
3150-
}
3151-
}
3152-
}
31533144

31543145
// The bodies for items are stored "out of line", in a separate
31553146
// hashmap in the `Crate`. Here we just record the hir-id of the item
@@ -3211,15 +3202,6 @@ pub enum ImplItemKind<'hir> {
32113202
/// An associated type.
32123203
Type(&'hir Ty<'hir>),
32133204
}
3214-
impl ImplItemKind<'_> {
3215-
pub fn descr(&self) -> &'static str {
3216-
match self {
3217-
ImplItemKind::Const(..) => "associated constant",
3218-
ImplItemKind::Fn(..) => "function",
3219-
ImplItemKind::Type(..) => "associated type",
3220-
}
3221-
}
3222-
}
32233205

32243206
/// A constraint on an associated item.
32253207
///
@@ -4545,16 +4527,6 @@ pub enum ForeignItemKind<'hir> {
45454527
Type,
45464528
}
45474529

4548-
impl ForeignItemKind<'_> {
4549-
pub fn descr(&self) -> &'static str {
4550-
match self {
4551-
ForeignItemKind::Fn(..) => "function",
4552-
ForeignItemKind::Static(..) => "static variable",
4553-
ForeignItemKind::Type => "type",
4554-
}
4555-
}
4556-
}
4557-
45584530
/// A variable captured by a closure.
45594531
#[derive(Debug, Copy, Clone, HashStable_Generic)]
45604532
pub struct Upvar {

0 commit comments

Comments
 (0)