ran into another type inference problem
This commit is contained in:
@@ -105,6 +105,11 @@ where
|
||||
let comma_sepped_args = allocator.intersperse(args, CommaSep {});
|
||||
call.append(comma_sepped_args.parens())
|
||||
}
|
||||
Expression::Call(_, fun, args) => {
|
||||
let args = args.iter().map(|x| x.pretty(allocator));
|
||||
let comma_sepped_args = allocator.intersperse(args, CommaSep {});
|
||||
fun.pretty(allocator).append(comma_sepped_args.parens())
|
||||
}
|
||||
Expression::Block(_, stmts) => match stmts.split_last() {
|
||||
None => allocator.text("()"),
|
||||
Some((last, &[])) => last.pretty(allocator),
|
||||
@@ -167,7 +172,7 @@ fn type_suffix(x: &Option<ConstantType>) -> &'static str {
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
struct CommaSep {}
|
||||
pub struct CommaSep {}
|
||||
|
||||
impl<'a, D, A> Pretty<'a, D, A> for CommaSep
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user