mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Add Into instance for OptLevel
This commit is contained in:
parent
b4377d4d67
commit
d0a9db06f5
1 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,15 @@ pub enum OptLevel {
|
||||||
Optimize,
|
Optimize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Into<OptimizationLevel> for OptLevel {
|
||||||
|
fn into(self) -> OptimizationLevel {
|
||||||
|
match self {
|
||||||
|
OptLevel::Normal => OptimizationLevel::None,
|
||||||
|
OptLevel::Optimize => OptimizationLevel::Aggressive,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug, Clone, PartialEq)]
|
#[derive(Default, Debug, Clone, PartialEq)]
|
||||||
pub struct Scope<'a, 'ctx> {
|
pub struct Scope<'a, 'ctx> {
|
||||||
symbols: ImMap<Symbol, (Layout<'a>, PointerValue<'ctx>)>,
|
symbols: ImMap<Symbol, (Layout<'a>, PointerValue<'ctx>)>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue