Block indent formatting
This commit is contained in:
parent
65c399613c
commit
ed66492a6a
1 changed files with 22 additions and 19 deletions
|
@ -196,13 +196,14 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
|
||||||
block(&mut blocks, TerminatorKind::Goto { target: return_block });
|
block(&mut blocks, TerminatorKind::Goto { target: return_block });
|
||||||
block(&mut blocks, TerminatorKind::Return);
|
block(&mut blocks, TerminatorKind::Return);
|
||||||
|
|
||||||
let mut body = new_body(blocks,
|
let mut body = new_body(
|
||||||
IndexVec::from_elem_n(
|
blocks,
|
||||||
SourceScopeData { span, parent_scope: None }, 1
|
IndexVec::from_elem_n(
|
||||||
),
|
SourceScopeData { span, parent_scope: None }, 1
|
||||||
local_decls_for_sig(&sig, span),
|
),
|
||||||
sig.inputs().len(),
|
local_decls_for_sig(&sig, span),
|
||||||
span);
|
sig.inputs().len(),
|
||||||
|
span);
|
||||||
|
|
||||||
if let Some(..) = ty {
|
if let Some(..) = ty {
|
||||||
// The first argument (index 0), but add 1 for the return value.
|
// The first argument (index 0), but add 1 for the return value.
|
||||||
|
@ -241,11 +242,12 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
|
||||||
body
|
body
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_body<'tcx>(basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
|
fn new_body<'tcx>(
|
||||||
source_scopes: IndexVec<SourceScope, SourceScopeData>,
|
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
|
||||||
local_decls: IndexVec<Local, LocalDecl<'tcx>>,
|
source_scopes: IndexVec<SourceScope, SourceScopeData>,
|
||||||
arg_count: usize,
|
local_decls: IndexVec<Local, LocalDecl<'tcx>>,
|
||||||
span: Span,
|
arg_count: usize,
|
||||||
|
span: Span,
|
||||||
) -> Body<'tcx> {
|
) -> Body<'tcx> {
|
||||||
Body::new(
|
Body::new(
|
||||||
basic_blocks,
|
basic_blocks,
|
||||||
|
@ -377,13 +379,14 @@ impl CloneShimBuilder<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn into_mir(self) -> Body<'tcx> {
|
fn into_mir(self) -> Body<'tcx> {
|
||||||
new_body(self.blocks,
|
new_body(
|
||||||
IndexVec::from_elem_n(
|
self.blocks,
|
||||||
SourceScopeData { span: self.span, parent_scope: None }, 1
|
IndexVec::from_elem_n(
|
||||||
),
|
SourceScopeData { span: self.span, parent_scope: None }, 1
|
||||||
self.local_decls,
|
),
|
||||||
self.sig.inputs().len(),
|
self.local_decls,
|
||||||
self.span,
|
self.sig.inputs().len(),
|
||||||
|
self.span,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue