Skip to content

Commit

Permalink
prettyplease: add workaround for variadic ellipsis
Browse files Browse the repository at this point in the history
possibly we aren't handling this right on the c2rust-transpile side, but it isn't clear how to encode named variadic arguments otherwise
  • Loading branch information
fw-immunant committed Mar 31, 2022
1 parent 793b799 commit 853f9b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prettyplease/src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ impl Printer {
}

fn type_verbatim(&mut self, ty: &TokenStream) {
unimplemented!("Type::Verbatim `{}`", ty);
if ty.to_string() == "..." {
self.word("...")
} else {
unimplemented!("Type::Verbatim `{}`", ty);
}
}

pub fn return_type(&mut self, ty: &ReturnType) {
Expand Down

0 comments on commit 853f9b5

Please sign in to comment.