Skip to content

Commit 8ab684e

Browse files
committed
Formatting librustc_trans/save
1 parent aa1f9e8 commit 8ab684e

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/librustc_trans/save/mod.rs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ struct DxrVisitor<'l, 'tcx: 'l> {
8080
}
8181

8282
impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
83-
fn nest<F>(&mut self, scope_id: NodeId, f: F) where
84-
F: FnOnce(&mut DxrVisitor<'l, 'tcx>),
83+
fn nest<F>(&mut self, scope_id: NodeId, f: F)
84+
where F: FnOnce(&mut DxrVisitor<'l, 'tcx>)
8585
{
8686
let parent_scope = self.cur_scope;
8787
self.cur_scope = scope_id;
@@ -287,9 +287,11 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
287287
}
288288
}
289289

290-
fn process_method(&mut self, sig: &ast::MethodSig,
290+
fn process_method(&mut self,
291+
sig: &ast::MethodSig,
291292
body: Option<&ast::Block>,
292-
id: ast::NodeId, name: ast::Name,
293+
id: ast::NodeId,
294+
name: ast::Name,
293295
span: Span) {
294296
if generated_code(span) {
295297
return;
@@ -408,8 +410,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
408410
id);
409411
}
410412

411-
fn process_trait_ref(&mut self,
412-
trait_ref: &ast::TraitRef) {
413+
fn process_trait_ref(&mut self, trait_ref: &ast::TraitRef) {
413414
match self.lookup_type_ref(trait_ref.ref_id) {
414415
Some(id) => {
415416
let sub_span = self.span.sub_span_for_type_name(trait_ref.path.span);
@@ -455,7 +456,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
455456

456457
// Dump generic params bindings, then visit_generics
457458
fn process_generic_params(&mut self,
458-
generics:&ast::Generics,
459+
generics: &ast::Generics,
459460
full_span: Span,
460461
prefix: &str,
461462
id: NodeId) {
@@ -515,8 +516,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
515516
item: &ast::Item,
516517
typ: &ast::Ty,
517518
mt: ast::Mutability,
518-
expr: &ast::Expr)
519-
{
519+
expr: &ast::Expr) {
520520
let qualname = format!("::{}", self.analysis.ty_cx.map.path_to_string(item.id));
521521

522522
// If the variable is immutable, save the initialising expression.
@@ -545,8 +545,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
545545
ident: &ast::Ident,
546546
span: Span,
547547
typ: &ast::Ty,
548-
expr: &ast::Expr)
549-
{
548+
expr: &ast::Expr) {
550549
let qualname = format!("::{}", self.analysis.ty_cx.map.path_to_string(id));
551550

552551
let sub_span = self.span.sub_span_after_keyword(span,
@@ -762,7 +761,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
762761
}
763762

764763
fn process_mod(&mut self,
765-
item: &ast::Item, // The module in question, represented as an item.
764+
item: &ast::Item, // The module in question, represented as an item.
766765
m: &ast::Mod) {
767766
let qualname = format!("::{}", self.analysis.ty_cx.map.path_to_string(item.id));
768767

@@ -945,9 +944,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
945944
visit::walk_expr_opt(self, base)
946945
}
947946

948-
fn process_method_call(&mut self,
949-
ex: &ast::Expr,
950-
args: &Vec<P<ast::Expr>>) {
947+
fn process_method_call(&mut self, ex: &ast::Expr, args: &Vec<P<ast::Expr>>) {
951948
let method_map = self.analysis.ty_cx.method_map.borrow();
952949
let method_callee = method_map.get(&ty::MethodCall::expr(ex.id)).unwrap();
953950
let (def_id, decl_id) = match method_callee.origin {
@@ -1002,7 +999,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
1002999
visit::walk_exprs(self, &args[..]);
10031000
}
10041001

1005-
fn process_pat(&mut self, p:&ast::Pat) {
1002+
fn process_pat(&mut self, p: &ast::Pat) {
10061003
if generated_code(p.span) {
10071004
return
10081005
}

0 commit comments

Comments
 (0)