Merge branch 'main' into drop_specialization

Signed-off-by: J Teeuwissen <jelleteeuwissen@hotmail.nl>
This commit is contained in:
J Teeuwissen 2023-04-26 20:26:37 +02:00 committed by GitHub
commit 7439ee0c8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
229 changed files with 3602 additions and 2412 deletions

View file

@ -282,8 +282,9 @@ impl AbilityAliases {
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum CapturedSymbols<'a> {
#[default]
None,
Captured(&'a [(Symbol, Variable)]),
}
@ -297,12 +298,6 @@ impl<'a> CapturedSymbols<'a> {
}
}
impl<'a> Default for CapturedSymbols<'a> {
fn default() -> Self {
CapturedSymbols::None
}
}
#[derive(Clone, Debug, PartialEq)]
pub struct Proc<'a> {
pub name: LambdaName<'a>,
@ -2725,8 +2720,8 @@ fn patterns_to_when<'a>(
/// { x } -> body
///
/// conversion of one-pattern when expressions will do the most optimal thing
fn pattern_to_when<'a>(
env: &mut Env<'a, '_>,
fn pattern_to_when(
env: &mut Env<'_, '_>,
pattern_var: Variable,
pattern: Loc<roc_can::pattern::Pattern>,
body_var: Variable,
@ -5743,8 +5738,8 @@ fn compile_struct_like<'a, L, UnusedLayout>(
}
#[inline(always)]
fn late_resolve_ability_specialization<'a>(
env: &mut Env<'a, '_>,
fn late_resolve_ability_specialization(
env: &mut Env<'_, '_>,
member: Symbol,
specialization_id: Option<SpecializationId>,
specialization_var: Variable,