Skip to main content

oxilean_codegen/pipeline/
passid_traits.rs

1//! # PassId - Trait Implementations
2//!
3//! This module contains trait implementations for `PassId`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use crate::lcnf::*;
12
13use super::types::PassId;
14use std::fmt;
15
16impl fmt::Display for PassId {
17    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18        match self {
19            PassId::JoinPoints => write!(f, "join-points"),
20            PassId::Specialize => write!(f, "specialize"),
21            PassId::Reuse => write!(f, "reuse"),
22            PassId::Dce => write!(f, "dce"),
23            PassId::ClosureConvert => write!(f, "closure-convert"),
24            PassId::Custom(name) => write!(f, "custom:{}", name),
25        }
26    }
27}