Skip to content

Commit 42e17c1

Browse files
committed
Run clang-format.
gcc/rust/ChangeLog: * ast/rust-item.h: Fix formatting to satisfy clang-format. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise. * hir/rust-ast-lower-implitem.h: Likewise. * resolve/rust-ast-resolve-implitem.h (visit): Likewise. Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
1 parent a8caebc commit 42e17c1

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

gcc/rust/ast/rust-item.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2765,9 +2765,9 @@ class Trait : public VisItem
27652765
std::vector<std::unique_ptr<GenericParam>> generic_params,
27662766
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
27672767
WhereClause where_clause,
2768-
std::vector<std::unique_ptr<AssociatedItem>> trait_items, Visibility vis,
2769-
std::vector<Attribute> outer_attrs, std::vector<Attribute> inner_attrs,
2770-
location_t locus)
2768+
std::vector<std::unique_ptr<AssociatedItem>> trait_items,
2769+
Visibility vis, std::vector<Attribute> outer_attrs,
2770+
std::vector<Attribute> inner_attrs, location_t locus)
27712771
: VisItem (std::move (vis), std::move (outer_attrs)),
27722772
has_unsafe (is_unsafe), has_auto (is_auto), name (std::move (name)),
27732773
generic_params (std::move (generic_params)),

gcc/rust/expand/rust-expand-visitor.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,8 @@ ExpandVisitor::visit (AST::Trait &trait)
849849

850850
expander.push_context (MacroExpander::ContextType::TRAIT);
851851

852-
std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)> extractor
852+
std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)>
853+
extractor
853854
= [] (AST::SingleASTNode node) { return node.take_trait_item (); };
854855

855856
expand_macro_children (MacroExpander::ContextType::TRAIT,

gcc/rust/hir/rust-ast-lower-implitem.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,8 @@ class ASTLowerTraitItem : public ASTLoweringBase
317317
{
318318
// insert mappings for self
319319
mappings->insert_hir_self_param (&self_param);
320-
mappings->insert_location (
321-
self_param.get_mappings ().get_hirid (),
322-
self_param.get_locus ());
320+
mappings->insert_location (self_param.get_mappings ().get_hirid (),
321+
self_param.get_locus ());
323322
}
324323

325324
// add the mappings for the function params at the end

gcc/rust/resolve/rust-ast-resolve-implitem.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ class ResolveTopLevelTraitItems : public ResolverBase
110110
item->accept_vis (resolver);
111111
};
112112

113-
void visit (AST::Function &function) override
113+
void visit (AST::Function &function) override
114114
{
115-
auto decl = CanonicalPath::new_seg (
116-
function.get_node_id (),
117-
function.get_function_name ().as_string ());
115+
auto decl
116+
= CanonicalPath::new_seg (function.get_node_id (),
117+
function.get_function_name ().as_string ());
118118
auto path = prefix.append (decl);
119119
auto cpath = canonical_prefix.append (decl);
120120

0 commit comments

Comments
 (0)