oxilean_codegen/cranelift_backend/
memflags_traits.rs1use super::types::MemFlags;
13use std::fmt;
14
15impl Default for MemFlags {
16 fn default() -> Self {
17 Self::new()
18 }
19}
20
21impl fmt::Display for MemFlags {
22 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23 let mut parts = vec![];
24 if self.aligned {
25 parts.push("aligned");
26 }
27 if self.notrap {
28 parts.push("notrap");
29 }
30 if self.readonly {
31 parts.push("readonly");
32 }
33 write!(f, "{}", parts.join(" "))
34 }
35}