1
Fork 0

reviews ish

This commit is contained in:
Ellen 2022-01-14 13:44:52 +00:00
parent b3d71d9001
commit 61c07a9a23
3 changed files with 19 additions and 6 deletions

View file

@ -314,6 +314,13 @@ impl GenericArg<'_> {
GenericArg::Infer(_) => ast::ParamKindOrd::Infer,
}
}
pub fn is_ty_or_const(&self) -> bool {
match self {
GenericArg::Lifetime(_) => false,
GenericArg::Type(_) | GenericArg::Const(_) | GenericArg::Infer(_) => true,
}
}
}
#[derive(Debug, HashStable_Generic)]