Add GenericArg
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This commit is contained in:
parent
14913159e0
commit
29ed491743
1 changed files with 17 additions and 0 deletions
|
|
@ -3247,6 +3247,23 @@ impl Clean<Path> for hir::Path {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Debug, Hash)]
|
||||
pub enum GenericArg {
|
||||
Lifetime(Lifetime),
|
||||
Type(Type),
|
||||
Const(Constant),
|
||||
}
|
||||
|
||||
impl fmt::Display for GenericArg {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
GenericArg::Lifetime(lt) => lt.fmt(f),
|
||||
GenericArg::Type(ty) => ty.fmt(f),
|
||||
GenericArg::Const(ct) => ct.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Debug, Hash)]
|
||||
pub enum GenericArgs {
|
||||
AngleBracketed {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue