improve error message for const ty param mismatch

This commit is contained in:
Bastian Kauschke 2020-11-13 20:23:37 +01:00
parent 06c9c599ed
commit 69b43c209c
25 changed files with 194 additions and 275 deletions

View file

@ -282,6 +282,14 @@ impl GenericArg<'_> {
GenericArg::Const(_) => "constant",
}
}
pub fn short_descr(&self) -> &'static str {
match self {
GenericArg::Lifetime(_) => "lifetime",
GenericArg::Type(_) => "type",
GenericArg::Const(_) => "const",
}
}
}
#[derive(Debug, HashStable_Generic)]