Skip to content

Commit 6c16ecb

Browse files
committed
Formatting librustc_trans/save
1 parent 72d57cf commit 6c16ecb

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;
@@ -406,8 +408,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
406408
id);
407409
}
408410

409-
fn process_trait_ref(&mut self,
410-
trait_ref: &ast::TraitRef) {
411+
fn process_trait_ref(&mut self, trait_ref: &ast::TraitRef) {
411412
match self.lookup_type_ref(trait_ref.ref_id) {
412413
Some(id) => {
413414
let sub_span = self.span.sub_span_for_type_name(trait_ref.path.span);
@@ -453,7 +454,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
453454

454455
// Dump generic params bindings, then visit_generics
455456
fn process_generic_params(&mut self,
456-
generics:&ast::Generics,
457+
generics: &ast::Generics,
457458
full_span: Span,
458459
prefix: &str,
459460
id: NodeId) {
@@ -513,8 +514,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
513514
item: &ast::Item,
514515
typ: &ast::Ty,
515516
mt: ast::Mutability,
516-
expr: &ast::Expr)
517-
{
517+
expr: &ast::Expr) {
518518
let qualname = format!("::{}", self.analysis.ty_cx.map.path_to_string(item.id));
519519

520520
// If the variable is immutable, save the initialising expression.
@@ -543,8 +543,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
543543
ident: &ast::Ident,
544544
span: Span,
545545
typ: &ast::Ty,
546-
expr: &ast::Expr)
547-
{
546+
expr: &ast::Expr) {
548547
let qualname = format!("::{}", self.analysis.ty_cx.map.path_to_string(id));
549548

550549
let sub_span = self.span.sub_span_after_keyword(span,
@@ -760,7 +759,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
760759
}
761760

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

@@ -943,9 +942,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
943942
visit::walk_expr_opt(self, base)
944943
}
945944

946-
fn process_method_call(&mut self,
947-
ex: &ast::Expr,
948-
args: &Vec<P<ast::Expr>>) {
945+
fn process_method_call(&mut self, ex: &ast::Expr, args: &Vec<P<ast::Expr>>) {
949946
let method_map = self.analysis.ty_cx.method_map.borrow();
950947
let method_callee = method_map.get(&ty::MethodCall::expr(ex.id)).unwrap();
951948
let (def_id, decl_id) = match method_callee.origin {
@@ -1000,7 +997,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
1000997
visit::walk_exprs(self, &args[..]);
1001998
}
1002999

1003-
fn process_pat(&mut self, p:&ast::Pat) {
1000+
fn process_pat(&mut self, p: &ast::Pat) {
10041001
if generated_code(p.span) {
10051002
return
10061003
}

0 commit comments

Comments
 (0)