Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
Add not builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Feb 28, 2019
1 parent a133664 commit 22cd9e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rustfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ pub fn format(w: &mut Write, f: &[Node]) -> Result<()> {
write!(w, "\tprintln!(\"{{}}\", s);\n")?;
write!(w, "}}\n\n")?;

write!(w, "fn not(b: bool) -> bool {{\n")?;
write!(w, "\treturn !b;\n")?;
write!(w, "}}\n\n")?;

// Create one memory per node, if needed
let mut mems = HashMap::new();
for n in f {
Expand Down

0 comments on commit 22cd9e1

Please sign in to comment.