Exercise building erased function

This commit is contained in:
Ayaz Hafiz 2023-06-25 20:54:49 -05:00
parent a1eb641bb6
commit d17d8c72ad
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 51 additions and 17 deletions

View file

@ -1357,6 +1357,13 @@ pub struct LambdaName<'a> {
}
impl<'a> LambdaName<'a> {
pub(crate) fn from_captures(symbol: Symbol, captures: &'a [InLayout<'a>]) -> Self {
Self {
name: symbol,
niche: Niche(NichePriv::Captures(captures)),
}
}
#[inline(always)]
pub fn name(&self) -> Symbol {
self.name