Skip to content

Commit ed66492

Browse files
author
David Haig
committed
Block indent formatting
1 parent 65c3996 commit ed66492

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

src/librustc_mir/shim.rs

+22-19
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,14 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
196196
block(&mut blocks, TerminatorKind::Goto { target: return_block });
197197
block(&mut blocks, TerminatorKind::Return);
198198

199-
let mut body = new_body(blocks,
200-
IndexVec::from_elem_n(
201-
SourceScopeData { span, parent_scope: None }, 1
202-
),
203-
local_decls_for_sig(&sig, span),
204-
sig.inputs().len(),
205-
span);
199+
let mut body = new_body(
200+
blocks,
201+
IndexVec::from_elem_n(
202+
SourceScopeData { span, parent_scope: None }, 1
203+
),
204+
local_decls_for_sig(&sig, span),
205+
sig.inputs().len(),
206+
span);
206207

207208
if let Some(..) = ty {
208209
// 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>>)
241242
body
242243
}
243244

244-
fn new_body<'tcx>(basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
245-
source_scopes: IndexVec<SourceScope, SourceScopeData>,
246-
local_decls: IndexVec<Local, LocalDecl<'tcx>>,
247-
arg_count: usize,
248-
span: Span,
245+
fn new_body<'tcx>(
246+
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
247+
source_scopes: IndexVec<SourceScope, SourceScopeData>,
248+
local_decls: IndexVec<Local, LocalDecl<'tcx>>,
249+
arg_count: usize,
250+
span: Span,
249251
) -> Body<'tcx> {
250252
Body::new(
251253
basic_blocks,
@@ -377,13 +379,14 @@ impl CloneShimBuilder<'tcx> {
377379
}
378380

379381
fn into_mir(self) -> Body<'tcx> {
380-
new_body(self.blocks,
381-
IndexVec::from_elem_n(
382-
SourceScopeData { span: self.span, parent_scope: None }, 1
383-
),
384-
self.local_decls,
385-
self.sig.inputs().len(),
386-
self.span,
382+
new_body(
383+
self.blocks,
384+
IndexVec::from_elem_n(
385+
SourceScopeData { span: self.span, parent_scope: None }, 1
386+
),
387+
self.local_decls,
388+
self.sig.inputs().len(),
389+
self.span,
387390
)
388391
}
389392

0 commit comments

Comments
 (0)