Implement new formatter for 'int'.

This is used for constants and patterns, which can carry negative
   values.
This commit is contained in:
KtorZ
2023-07-06 19:14:45 +02:00
committed by Lucas
parent 78d34f7f76
commit 126f2ab004
2 changed files with 22 additions and 1 deletions

View File

@@ -887,3 +887,21 @@ fn first_class_binop() {
assert_fmt(src, src);
}
#[test]
fn int_uint() {
let src = indoc! { r#"
const i = 42
const j = -14
fn foo() {
when y is {
14 -> -14
-42 -> 42
}
}
"#};
assert_fmt(src, src);
}