mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
no_niche to represent lack of captures niche
This commit is contained in:
parent
a5ea4f8c11
commit
71d612078a
6 changed files with 31 additions and 35 deletions
|
@ -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: &[],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue