diff options
Diffstat (limited to 'gcc/rust/ast/rust-ast.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast.cc | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index 1d52352..ab82303 100644 --- a/gcc/rust/ast/rust-ast.cc +++ b/gcc/rust/ast/rust-ast.cc @@ -272,8 +272,8 @@ Attribute::get_traits_to_derive () case AST::MetaItem::ItemKind::Word: { auto word = static_cast<AST::MetaWord *> (meta_item); // Convert current word to path - current - = make_unique<AST::MetaItemPath> (AST::MetaItemPath ( + current = std::make_unique<AST::MetaItemPath> ( + AST::MetaItemPath ( AST::SimplePath (word->get_ident ()))); auto path = static_cast<AST::MetaItemPath *> (current.get ()); @@ -2998,22 +2998,6 @@ ExternalStaticItem::as_string () const } std::string -NamedFunctionParam::as_string () const -{ - std::string str = append_attributes (outer_attrs, OUTER); - - if (has_name ()) - str += "\n" + name; - - if (is_variadic ()) - str += "..."; - else - str += "\n Type: " + param_type->as_string (); - - return str; -} - -std::string TraitItemConst::as_string () const { // TODO: rewrite to work with non-linearisable exprs @@ -4286,7 +4270,7 @@ BlockExpr::normalize_tail_expr () if (!stmt.is_semicolon_followed ()) { - expr = std::move (stmt.take_expr ()); + expr = stmt.take_expr (); statements.pop_back (); } } |