no_niche to represent lack of captures niche

This commit is contained in:
Ayaz Hafiz 2022-07-01 16:06:48 -04:00 committed by ayazhafiz
parent a5ea4f8c11
commit 71d612078a
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED
6 changed files with 31 additions and 35 deletions

View file

@ -715,17 +715,7 @@ impl LambdaName<'_> {
}
#[inline(always)]
pub fn thunk(name: Symbol) -> Self {
Self {
name,
captures_niche: &[],
}
}
// When the function name is known, so there can only be one possible receiver, in such cases
// the lambda cannot be multimorphic.
#[inline(always)]
pub fn only_receiver(name: Symbol) -> Self {
pub fn no_niche(name: Symbol) -> Self {
Self {
name,
captures_niche: &[],