allow duplicate idents in format_args_f (#515)

This commit is contained in:
Demonthos authored and GitHub committed 2022-08-10 22:45:56 -07:00
1 parent c801d4402e
commit baf1807338
2 files changed
+26 -12

No files matched your search

+6
View File
@@ -23,4 +23,10 @@ fn formatting_compiles() {
format_args_f!("{x.borrow():?}").to_string(),
format!("{:?}", x.borrow())
);
// allows duplicate format args
assert_eq!(
format_args_f!("{x:?} {x:?}").to_string(),
format!("{:?} {:?}", x, x)
);
}