mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-18 18:53:04 +00:00
Make irrelevant changes to regions-mock-tcx to convince the pretty printer to emit the same thing twice in a row
This commit is contained in:
parent
a15196c53b
commit
f6e8d49a1a
@ -93,7 +93,6 @@ enum AstKind<'ast> {
|
||||
ExprInt,
|
||||
ExprVar(uint),
|
||||
ExprLambda(Ast<'ast>),
|
||||
// ...
|
||||
}
|
||||
|
||||
fn compute_types<'tcx,'ast>(tcx: &mut TypeContext<'tcx,'ast>,
|
||||
@ -104,15 +103,12 @@ fn compute_types<'tcx,'ast>(tcx: &mut TypeContext<'tcx,'ast>,
|
||||
let ty = tcx.add_type(TypeInt);
|
||||
tcx.set_type(ast.id, ty)
|
||||
}
|
||||
|
||||
ExprLambda(ast) => {
|
||||
let arg_ty = tcx.add_type(TypeInt);
|
||||
let body_ty = compute_types(tcx, ast);
|
||||
let lambda_ty = tcx.add_type(TypeFunction(arg_ty, body_ty));
|
||||
tcx.set_type(ast.id, lambda_ty)
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user