From: arthur.cohen@embecosm.com
To: gcc-patches@gcc.gnu.org
Cc: gcc-rust@gcc.gnu.org,
Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Subject: [COMMITTED 062/101] gccrs: Make function bodies truly optional
Date: Tue, 30 Jan 2024 13:07:18 +0100 [thread overview]
Message-ID: <20240130121026.807464-65-arthur.cohen@embecosm.com> (raw)
In-Reply-To: <20240130121026.807464-2-arthur.cohen@embecosm.com>
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Missing body on a function should be rejected at a later stage in the
compiler, not during parsing.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Adapt defintion
getter.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
* expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise.
* expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
* hir/rust-ast-lower-implitem.h: Likewise.
* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise.
* resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise.
* resolve/rust-ast-resolve-stmt.h: Likewise.
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Likewise.
* util/rust-attributes.cc (AttributeChecker::visit): Likewise.
* parse/rust-parse-impl.h: Allow empty function body during parsing.
* ast/rust-ast.cc (Function::Function): Constructor now take an
optional for the body.
(Function::operator=): Adapt to new optional member.
(Function::as_string): Likewise.
* ast/rust-item.h (class Function): Make body optional and do not
rely on nullptr anymore.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
gcc/rust/ast/rust-ast-collector.cc | 7 +-
gcc/rust/ast/rust-ast-visitor.cc | 3 +-
gcc/rust/ast/rust-ast.cc | 24 +++--
gcc/rust/ast/rust-item.h | 13 +--
gcc/rust/expand/rust-cfg-strip.cc | 16 ++--
gcc/rust/expand/rust-expand-visitor.cc | 8 +-
gcc/rust/hir/rust-ast-lower-implitem.h | 2 +-
gcc/rust/hir/rust-ast-lower-item.cc | 2 +-
gcc/rust/parse/rust-parse-impl.h | 105 ++++++++++------------
gcc/rust/resolve/rust-ast-resolve-item.cc | 2 +-
gcc/rust/resolve/rust-ast-resolve-stmt.h | 2 +-
gcc/rust/resolve/rust-default-resolver.cc | 3 +-
gcc/rust/util/rust-attributes.cc | 3 +-
13 files changed, 92 insertions(+), 98 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index 647724bec11..d5a98f1ccc7 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -1730,11 +1730,10 @@ TokenCollector::visit (Function &function)
if (function.has_where_clause ())
visit (function.get_where_clause ());
- auto &block = function.get_definition ();
- if (!block)
- push (Rust::Token::make (SEMICOLON, UNDEF_LOCATION));
+ if (function.has_body ())
+ visit (*function.get_definition ());
else
- visit (block);
+ push (Rust::Token::make (SEMICOLON, UNDEF_LOCATION));
newline ();
}
diff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc
index 4ec5c7cf1d0..230a152b05b 100644
--- a/gcc/rust/ast/rust-ast-visitor.cc
+++ b/gcc/rust/ast/rust-ast-visitor.cc
@@ -777,7 +777,8 @@ DefaultASTVisitor::visit (AST::Function &function)
if (function.has_return_type ())
visit (function.get_return_type ());
visit (function.get_where_clause ());
- visit (function.get_definition ());
+ if (function.has_body ())
+ visit (*function.get_definition ());
}
void
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc
index 607f07955d4..b9096032d41 100644
--- a/gcc/rust/ast/rust-ast.cc
+++ b/gcc/rust/ast/rust-ast.cc
@@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "rust-ast.h"
+#include "optional.h"
#include "rust-system.h"
#include "rust-ast-full.h"
#include "rust-diagnostics.h"
@@ -1100,8 +1101,10 @@ Function::Function (Function const &other)
return_type = other.return_type->clone_type ();
// guard to prevent null dereference (only required if error state)
- if (other.function_body != nullptr)
- function_body = other.function_body->clone_block_expr ();
+ if (other.has_body ())
+ function_body = other.function_body.value ()->clone_block_expr ();
+ else
+ function_body = tl::nullopt;
generic_params.reserve (other.generic_params.size ());
for (const auto &e : other.generic_params)
@@ -1131,10 +1134,10 @@ Function::operator= (Function const &other)
return_type = nullptr;
// guard to prevent null dereference (only required if error state)
- if (other.function_body != nullptr)
- function_body = other.function_body->clone_block_expr ();
+ if (other.has_body ())
+ function_body = other.function_body.value ()->clone_block_expr ();
else
- function_body = nullptr;
+ function_body = tl::nullopt;
generic_params.reserve (other.generic_params.size ());
for (const auto &e : other.generic_params)
@@ -1221,15 +1224,8 @@ Function::as_string () const
str += "\n";
- // DEBUG: null pointer check
- if (function_body == nullptr)
- {
- rust_debug (
- "something really terrible has gone wrong - null pointer function "
- "body in function.");
- return "NULL_POINTER_MARK";
- }
- str += function_body->as_string () + "\n";
+ if (has_body ())
+ str += function_body.value ()->as_string () + "\n";
return str;
}
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index 9a83f3d5981..a995273de12 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -1299,7 +1299,7 @@ class Function : public VisItem,
std::vector<std::unique_ptr<Param>> function_params;
std::unique_ptr<Type> return_type;
WhereClause where_clause;
- std::unique_ptr<BlockExpr> function_body;
+ tl::optional<std::unique_ptr<BlockExpr>> function_body;
location_t locus;
bool is_default;
@@ -1323,14 +1323,16 @@ public:
return function_params.size () > 0 && function_params[0]->is_self ();
}
+ bool has_body () const { return function_body.has_value (); }
+
// Mega-constructor with all possible fields
Function (Identifier function_name, FunctionQualifiers qualifiers,
std::vector<std::unique_ptr<GenericParam>> generic_params,
std::vector<std::unique_ptr<Param>> function_params,
std::unique_ptr<Type> return_type, WhereClause where_clause,
- std::unique_ptr<BlockExpr> function_body, Visibility vis,
- std::vector<Attribute> outer_attrs, location_t locus,
- bool is_default = false)
+ tl::optional<std::unique_ptr<BlockExpr>> function_body,
+ Visibility vis, std::vector<Attribute> outer_attrs,
+ location_t locus, bool is_default = false)
: VisItem (std::move (vis), std::move (outer_attrs)),
qualifiers (std::move (qualifiers)),
function_name (std::move (function_name)),
@@ -1390,9 +1392,8 @@ public:
}
// TODO: is this better? Or is a "vis_block" better?
- std::unique_ptr<BlockExpr> &get_definition ()
+ tl::optional<std::unique_ptr<BlockExpr>> &get_definition ()
{
- rust_assert (function_body != nullptr);
return function_body;
}
diff --git a/gcc/rust/expand/rust-cfg-strip.cc b/gcc/rust/expand/rust-cfg-strip.cc
index fd115654618..089520182ac 100644
--- a/gcc/rust/expand/rust-cfg-strip.cc
+++ b/gcc/rust/expand/rust-cfg-strip.cc
@@ -2031,13 +2031,17 @@ CfgStrip::visit (AST::Function &function)
/* body should always exist - if error state, should have returned
* before now */
// can't strip block itself, but can strip sub-expressions
- auto &block_expr = function.get_definition ();
- block_expr->accept_vis (*this);
- if (block_expr->is_marked_for_strip ())
- rust_error_at (block_expr->get_locus (),
- "cannot strip block expression in this position - outer "
- "attributes not allowed");
+ if (function.has_body ())
+ {
+ auto &block_expr = function.get_definition ().value ();
+ block_expr->accept_vis (*this);
+ if (block_expr->is_marked_for_strip ())
+ rust_error_at (block_expr->get_locus (),
+ "cannot strip block expression in this position - outer "
+ "attributes not allowed");
+ }
}
+
void
CfgStrip::visit (AST::TypeAlias &type_alias)
{
diff --git a/gcc/rust/expand/rust-expand-visitor.cc b/gcc/rust/expand/rust-expand-visitor.cc
index 1745af06174..ad473c2dcb0 100644
--- a/gcc/rust/expand/rust-expand-visitor.cc
+++ b/gcc/rust/expand/rust-expand-visitor.cc
@@ -1001,8 +1001,9 @@ ExpandVisitor::visit (AST::UseDeclaration &use_decl)
void
ExpandVisitor::visit (AST::Function &function)
{
- visit_inner_using_attrs (function,
- function.get_definition ()->get_inner_attrs ());
+ if (function.has_body ())
+ visit_inner_using_attrs (
+ function, function.get_definition ().value ()->get_inner_attrs ());
for (auto ¶m : function.get_generic_params ())
visit (param);
@@ -1014,7 +1015,8 @@ ExpandVisitor::visit (AST::Function &function)
if (function.has_where_clause ())
expand_where_clause (function.get_where_clause ());
- visit (function.get_definition ());
+ if (function.has_body ())
+ visit (*function.get_definition ());
}
void
diff --git a/gcc/rust/hir/rust-ast-lower-implitem.h b/gcc/rust/hir/rust-ast-lower-implitem.h
index 096a30e1e42..6f904dde19f 100644
--- a/gcc/rust/hir/rust-ast-lower-implitem.h
+++ b/gcc/rust/hir/rust-ast-lower-implitem.h
@@ -168,7 +168,7 @@ public:
bool terminated = false;
std::unique_ptr<HIR::BlockExpr> function_body
= std::unique_ptr<HIR::BlockExpr> (
- ASTLoweringBlock::translate (function.get_definition ().get (),
+ ASTLoweringBlock::translate (function.get_definition ()->get (),
&terminated));
auto crate_num = mappings->get_current_crate ();
diff --git a/gcc/rust/hir/rust-ast-lower-item.cc b/gcc/rust/hir/rust-ast-lower-item.cc
index 8d6ab7cd350..2895872f336 100644
--- a/gcc/rust/hir/rust-ast-lower-item.cc
+++ b/gcc/rust/hir/rust-ast-lower-item.cc
@@ -446,7 +446,7 @@ ASTLoweringItem::visit (AST::Function &function)
bool terminated = false;
std::unique_ptr<HIR::BlockExpr> function_body
= std::unique_ptr<HIR::BlockExpr> (
- ASTLoweringBlock::translate (function.get_definition ().get (),
+ ASTLoweringBlock::translate (function.get_definition ()->get (),
&terminated));
auto crate_num = mappings->get_current_crate ();
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index acceec302a2..52766afd9c4 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -23,6 +23,7 @@
* This is also the reason why there are no include guards. */
#include "rust-common.h"
+#include "rust-expr.h"
#include "rust-item.h"
#include "rust-common.h"
#include "rust-token.h"
@@ -2976,14 +2977,21 @@ Parser<ManagedTokenSource>::parse_function (AST::Visibility vis,
// parse where clause - if exists
AST::WhereClause where_clause = parse_where_clause ();
- // parse block expression
- std::unique_ptr<AST::BlockExpr> block_expr = parse_block_expr ();
+ tl::optional<std::unique_ptr<AST::BlockExpr>> body = tl::nullopt;
+ if (lexer.peek_token ()->get_id () == SEMICOLON)
+ lexer.skip_token ();
+ else
+ {
+ std::unique_ptr<AST::BlockExpr> block_expr = parse_block_expr ();
+ if (block_expr != nullptr)
+ body = std::move (block_expr);
+ }
return std::unique_ptr<AST::Function> (
new AST::Function (std::move (function_name), std::move (qualifiers),
std::move (generic_params), std::move (function_params),
std::move (return_type), std::move (where_clause),
- std::move (block_expr), std::move (vis),
+ std::move (body), std::move (vis),
std::move (outer_attrs), locus));
}
@@ -5710,49 +5718,33 @@ Parser<ManagedTokenSource>::parse_inherent_impl_function_or_method (
// parse where clause (optional)
AST::WhereClause where_clause = parse_where_clause ();
- // parse function definition (in block) - semicolon not allowed
+ tl::optional<std::unique_ptr<AST::BlockExpr>> body = tl::nullopt;
if (lexer.peek_token ()->get_id () == SEMICOLON)
+ lexer.skip_token ();
+ else
{
- Error error (lexer.peek_token ()->get_locus (),
- "%s declaration in inherent impl not allowed - must have "
- "a definition",
- is_method ? "method" : "function");
- add_error (std::move (error));
+ auto result = parse_block_expr ();
- lexer.skip_token ();
- return nullptr;
- }
- std::unique_ptr<AST::BlockExpr> body = parse_block_expr ();
- if (body == nullptr)
- {
- Error error (lexer.peek_token ()->get_locus (),
- "could not parse definition in inherent impl %s definition",
- is_method ? "method" : "function");
- add_error (std::move (error));
+ if (result == nullptr)
+ {
+ Error error (
+ lexer.peek_token ()->get_locus (),
+ "could not parse definition in inherent impl %s definition",
+ is_method ? "method" : "function");
+ add_error (std::move (error));
- skip_after_end_block ();
- return nullptr;
+ skip_after_end_block ();
+ return nullptr;
+ }
+ body = std::move (result);
}
- // do actual if instead of ternary for return value optimisation
- if (is_method)
- {
- return std::unique_ptr<AST::Function> (
- new AST::Function (std::move (ident), std::move (qualifiers),
- std::move (generic_params),
- std::move (function_params), std::move (return_type),
- std::move (where_clause), std::move (body),
- std::move (vis), std::move (outer_attrs), locus));
- }
- else
- {
- return std::unique_ptr<AST::Function> (
- new AST::Function (std::move (ident), std::move (qualifiers),
- std::move (generic_params),
- std::move (function_params), std::move (return_type),
- std::move (where_clause), std::move (body),
- std::move (vis), std::move (outer_attrs), locus));
- }
+ return std::unique_ptr<AST::Function> (
+ new AST::Function (std::move (ident), std::move (qualifiers),
+ std::move (generic_params), std::move (function_params),
+ std::move (return_type), std::move (where_clause),
+ std::move (body), std::move (vis),
+ std::move (outer_attrs), locus));
}
// Parses a single trait impl item (item inside a trait impl block).
@@ -5960,27 +5952,24 @@ Parser<ManagedTokenSource>::parse_trait_impl_function_or_method (
"successfully parsed where clause in function or method trait impl item");
// parse function definition (in block) - semicolon not allowed
- if (lexer.peek_token ()->get_id () == SEMICOLON)
- {
- Error error (
- lexer.peek_token ()->get_locus (),
- "%s declaration in trait impl not allowed - must have a definition",
- is_method ? "method" : "function");
- add_error (std::move (error));
+ tl::optional<std::unique_ptr<AST::BlockExpr>> body = tl::nullopt;
- lexer.skip_token ();
- return nullptr;
- }
- std::unique_ptr<AST::BlockExpr> body = parse_block_expr ();
- if (body == nullptr)
+ if (lexer.peek_token ()->get_id () == SEMICOLON)
+ lexer.skip_token ();
+ else
{
- Error error (lexer.peek_token ()->get_locus (),
- "could not parse definition in trait impl %s definition",
- is_method ? "method" : "function");
- add_error (std::move (error));
+ auto result = parse_block_expr ();
+ if (result == nullptr)
+ {
+ Error error (lexer.peek_token ()->get_locus (),
+ "could not parse definition in trait impl %s definition",
+ is_method ? "method" : "function");
+ add_error (std::move (error));
- skip_after_end_block ();
- return nullptr;
+ skip_after_end_block ();
+ return nullptr;
+ }
+ body = std::move (result);
}
return std::unique_ptr<AST::Function> (
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.cc b/gcc/rust/resolve/rust-ast-resolve-item.cc
index eaee5bc8606..60eca5b13c7 100644
--- a/gcc/rust/resolve/rust-ast-resolve-item.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-item.cc
@@ -616,7 +616,7 @@ ResolveItem::visit (AST::Function &function)
}
// resolve the function body
- ResolveExpr::go (function.get_definition ().get (), path, cpath);
+ ResolveExpr::go (function.get_definition ()->get (), path, cpath);
resolver->get_name_scope ().pop ();
resolver->get_type_scope ().pop ();
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.h b/gcc/rust/resolve/rust-ast-resolve-stmt.h
index 293c98fd6f2..f9aa93ba7c4 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.h
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.h
@@ -378,7 +378,7 @@ public:
}
// resolve the function body
- ResolveExpr::go (function.get_definition ().get (), path, cpath);
+ ResolveExpr::go (function.get_definition ()->get (), path, cpath);
resolver->get_name_scope ().pop ();
resolver->get_type_scope ().pop ();
diff --git a/gcc/rust/resolve/rust-default-resolver.cc b/gcc/rust/resolve/rust-default-resolver.cc
index 1ab174b6caa..c1ed3cea113 100644
--- a/gcc/rust/resolve/rust-default-resolver.cc
+++ b/gcc/rust/resolve/rust-default-resolver.cc
@@ -77,7 +77,8 @@ DefaultResolver::visit (AST::Function &function)
}
}
- function.get_definition ()->accept_vis (*this);
+ if (function.has_body ())
+ function.get_definition ().value ()->accept_vis (*this);
};
ctx.scoped (Rib::Kind::Function, function.get_node_id (), def_fn);
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index a1e23082e88..3c296b565f5 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -667,7 +667,8 @@ AttributeChecker::visit (AST::Function &fun)
else if (result.name == "no_mangle")
check_no_mangle_function (attribute, fun);
}
- fun.get_definition ()->accept_vis (*this);
+ if (fun.has_body ())
+ fun.get_definition ().value ()->accept_vis (*this);
}
void
--
2.42.1
next prev parent reply other threads:[~2024-01-30 12:11 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 12:06 [PATCHSET] Update Rust frontend January 2024 arthur.cohen
2024-01-30 12:06 ` [COMMITTED 001/101] gccrs: Add visibility to trait item arthur.cohen
2024-01-30 12:06 ` [COMMITTED 002/101] gccrs: Add a test to highlight public trait type parsing arthur.cohen
2024-01-30 12:06 ` [COMMITTED 003/101] gccrs: Fix error emission for self pointers arthur.cohen
2024-01-30 12:06 ` [COMMITTED 004/101] gccrs: Report self parameter parsing error kind arthur.cohen
2024-01-30 12:06 ` [COMMITTED 005/101] gccrs: Add new test for parsing errors on self pointers arthur.cohen
2024-01-30 12:06 ` [COMMITTED 006/101] gccrs: ast: Change *Path nodes API arthur.cohen
2024-01-30 12:06 ` [COMMITTED 007/101] gccrs: rib: Add Namespace enum arthur.cohen
2024-01-30 12:06 ` [COMMITTED 008/101] gccrs: forever-stack: Fix basic get logic arthur.cohen
2024-01-30 12:06 ` [COMMITTED 009/101] gccrs: foreverstack: Specialize `get` for Namespace::Labels arthur.cohen
2024-01-30 12:06 ` [COMMITTED 010/101] gccrs: forever stack: Fix resolve_path signature arthur.cohen
2024-01-30 12:06 ` [COMMITTED 011/101] gccrs: forever stack: Improve resolve_path implementation arthur.cohen
2024-01-30 12:06 ` [COMMITTED 012/101] gccrs: foreverstack: Add `to_canonical_path` method arthur.cohen
2024-01-30 12:06 ` [COMMITTED 013/101] gccrs: foreverstack: Add `to_rib` method arthur.cohen
2024-01-30 12:06 ` [COMMITTED 014/101] gccrs: resolve: Format if properly arthur.cohen
2024-01-30 12:06 ` [COMMITTED 015/101] gccrs: forever stack: Remove development debug info arthur.cohen
2024-01-30 12:06 ` [COMMITTED 016/101] gccrs: Reject auto traits with generic parameters arthur.cohen
2024-01-30 12:06 ` [COMMITTED 017/101] gccrs: Add regression test for generic auto traits arthur.cohen
2024-01-30 12:06 ` [COMMITTED 018/101] gccrs: Reject auto traits with super trait arthur.cohen
2024-01-30 12:06 ` [COMMITTED 019/101] gccrs: Add a regression test for super trait on auto trait arthur.cohen
2024-01-30 12:06 ` [COMMITTED 020/101] gccrs: Add check for associated items on auto traits arthur.cohen
2024-01-30 12:06 ` [COMMITTED 021/101] gccrs: Emit an error on variadic non extern functions arthur.cohen
2024-01-30 12:06 ` [COMMITTED 022/101] gccrs: Add a test regular variadic functions errors arthur.cohen
2024-01-30 12:06 ` [COMMITTED 023/101] gccrs: Add ast validation check on union variant number arthur.cohen
2024-01-30 12:06 ` [COMMITTED 024/101] gccrs: Replace TOK suffix with KW arthur.cohen
2024-01-30 12:06 ` [COMMITTED 025/101] gccrs: Add edition separation for keywords arthur.cohen
2024-01-30 12:06 ` [COMMITTED 026/101] gccrs: Treat underscore as a keyword arthur.cohen
2024-01-30 12:06 ` [COMMITTED 027/101] gccrs: Add await keyword arthur.cohen
2024-01-30 12:06 ` [COMMITTED 028/101] gccrs: Replace some keyword raw values arthur.cohen
2024-01-30 12:06 ` [COMMITTED 029/101] gccrs: Add a list of weak keyword arthur.cohen
2024-01-30 12:06 ` [COMMITTED 030/101] gccrs: Replace some weak keyword raw value with constexpr arthur.cohen
2024-01-30 12:06 ` [COMMITTED 031/101] gccrs: Introduce a proper keyword list arthur.cohen
2024-01-30 12:06 ` [COMMITTED 032/101] gccrs: Added support to Parse ASYNC function arthur.cohen
2024-01-30 12:06 ` [COMMITTED 033/101] gccrs: ctx: Add Labels ForeverStack to the resolver arthur.cohen
2024-01-30 12:06 ` [COMMITTED 034/101] gccrs: nr2.0: Add base for late name resolution arthur.cohen
2024-01-30 12:06 ` [COMMITTED 035/101] gccrs: toplevel: Use DefaultResolver for Function arthur.cohen
2024-01-30 12:06 ` [COMMITTED 036/101] gccrs: nr2.0: Store mappings in NameResolutionContext arthur.cohen
2024-01-30 12:06 ` [COMMITTED 037/101] gccrs: late: Start setting up builtin types arthur.cohen
2024-01-30 12:06 ` [COMMITTED 038/101] gccrs: late: Start storing mappings properly in the resolver arthur.cohen
2024-01-30 12:06 ` [COMMITTED 039/101] gccrs: early: Resolve paths properly arthur.cohen
2024-01-30 12:06 ` [COMMITTED 040/101] gccrs: toplevel: Add comment about running the collector twice arthur.cohen
2024-01-30 12:06 ` [COMMITTED 041/101] gccrs: ast: Add NodeId to UseTree base class arthur.cohen
2024-01-30 12:06 ` [COMMITTED 042/101] gccrs: early: Move `use` declaration resolving to TopLevel arthur.cohen
2024-01-30 12:06 ` [COMMITTED 043/101] gccrs: toplevel: Resolve `use` declarations arthur.cohen
2024-01-30 12:07 ` [COMMITTED 044/101] gccrs: Create base class for TupleStructItems and TuplePatternItems arthur.cohen
2024-01-30 12:07 ` [COMMITTED 045/101] gccrs: Add unsafety member to modules arthur.cohen
2024-01-30 12:07 ` [COMMITTED 046/101] gccrs: Parse module safety arthur.cohen
2024-01-30 12:07 ` [COMMITTED 047/101] gccrs: Emit an error on unsafe modules arthur.cohen
2024-01-30 12:07 ` [COMMITTED 048/101] gccrs: Add a regression test for unsafe module validation arthur.cohen
2024-01-30 12:07 ` [COMMITTED 049/101] gccrs: Remove backend dependancy on resolution rib information arthur.cohen
2024-01-30 12:07 ` [COMMITTED 050/101] gccrs: Remove class AST::InherentImplItem arthur.cohen
2024-01-30 12:07 ` [COMMITTED 051/101] gccrs: Split async and const function qualifiers arthur.cohen
2024-01-30 12:07 ` [COMMITTED 052/101] gccrs: Allow const and async specifiers in functions arthur.cohen
2024-01-30 12:07 ` [COMMITTED 053/101] gccrs: Add async const function ast validation pass arthur.cohen
2024-01-30 12:07 ` [COMMITTED 054/101] gccrs: Add a regression test for async const functions arthur.cohen
2024-01-30 12:07 ` [COMMITTED 055/101] gccrs: Add AST validation check for const in trait arthur.cohen
2024-01-30 12:07 ` [COMMITTED 056/101] gccrs: Add regression test for const fn " arthur.cohen
2024-01-30 12:07 ` [COMMITTED 057/101] gccrs: Make feature gate visitor inherit from default one arthur.cohen
2024-01-30 12:07 ` [COMMITTED 058/101] gccrs: Change the attribute checker visitor to " arthur.cohen
2024-01-30 12:07 ` [COMMITTED 059/101] gccrs: Make early name resolver inherit from " arthur.cohen
2024-01-30 12:07 ` [COMMITTED 060/101] gccrs: Add multiple regression test in name resolution arthur.cohen
2024-01-30 12:07 ` [COMMITTED 061/101] gccrs: Add execution test for name resolution 2.0 arthur.cohen
2024-01-30 12:07 ` arthur.cohen [this message]
2024-01-30 12:07 ` [COMMITTED 063/101] gccrs: Add validation for functions without body arthur.cohen
2024-01-30 12:07 ` [COMMITTED 064/101] gccrs: Add a regression test for function body check arthur.cohen
2024-01-30 12:07 ` [COMMITTED 065/101] gccrs: Generate error for const trait functions arthur.cohen
2024-01-30 12:07 ` [COMMITTED 066/101] gccrs: Renamed `WIN64` to `WIN_64` arthur.cohen
2024-01-30 12:07 ` [COMMITTED 067/101] gccrs: Allow enabling lang_items and no_core features arthur.cohen
2024-01-30 12:07 ` [COMMITTED 068/101] gccrs: Make default resolver inherit from default visitor arthur.cohen
2024-01-30 12:07 ` [COMMITTED 069/101] gccrs: Make expand visitor " arthur.cohen
2024-01-30 12:07 ` [COMMITTED 070/101] gccrs: Change cfg stripper to use " arthur.cohen
2024-01-30 12:07 ` [COMMITTED 071/101] gccrs: refactor builtins initialization and attributes arthur.cohen
2024-01-30 12:07 ` [COMMITTED 072/101] gccrs: HIR: add missing getters arthur.cohen
2024-01-30 12:07 ` [COMMITTED 073/101] gccrs: TyTy: Fix missed nodiscard arthur.cohen
2024-01-30 12:07 ` [COMMITTED 074/101] gccrs: BIR: " arthur.cohen
2024-01-30 12:07 ` [COMMITTED 075/101] gccrs: TyTy: refactor to new API arthur.cohen
2024-01-30 12:07 ` [COMMITTED 076/101] gccrs: TyTy: Common interface for fucntion-like types arthur.cohen
2024-01-30 12:07 ` [COMMITTED 077/101] gccrs: TyTy: SubstitutionRef cast specialization arthur.cohen
2024-01-30 12:07 ` [COMMITTED 078/101] gccrs: BIR: Cleanup arthur.cohen
2024-01-30 12:07 ` [COMMITTED 079/101] gccrs: split rust-mangle.cc into two files arthur.cohen
2024-01-30 12:07 ` [COMMITTED 080/101] gccrs: Handle `async` qualifier inside trait arthur.cohen
2024-01-30 12:07 ` [COMMITTED 081/101] gccrs: Generate error for `async` trait fucntions arthur.cohen
2024-01-30 12:07 ` [COMMITTED 082/101] gccrs: ast: Fix lifetime type parsing arthur.cohen
2024-01-30 12:07 ` [COMMITTED 083/101] gccrs: ast: Unify explicitly and implicitly elided lifettimes arthur.cohen
2024-01-30 12:07 ` [COMMITTED 084/101] gccrs: ast: Full lifetime elision handling arthur.cohen
2024-01-30 12:07 ` [COMMITTED 085/101] gccrs: ast: Infer static lifetime for const and static items arthur.cohen
2024-01-30 12:07 ` [COMMITTED 086/101] gccrs: ast: Lower 'for' lifetimes arthur.cohen
2024-01-30 12:07 ` [COMMITTED 087/101] gccrs: TyTy: Refactor FnType deprecated API arthur.cohen
2024-01-30 12:07 ` [COMMITTED 088/101] gccrs: Handle newlines during string parsing while lexing arthur.cohen
2024-01-30 12:07 ` [COMMITTED 089/101] gccrs: Handle `async` functions in traits arthur.cohen
2024-01-30 12:07 ` [COMMITTED 090/101] gccrs: Fix inconsistent formatting arthur.cohen
2024-01-30 12:07 ` [COMMITTED 091/101] gccrs: Handle `async` keyword for regular implementations arthur.cohen
2024-01-30 12:07 ` [COMMITTED 092/101] gccrs: Add improved error when a field is redefined in a struct constructor arthur.cohen
2024-01-30 12:07 ` [COMMITTED 093/101] gccrs: Unify storage of associated items in SingleASTNode arthur.cohen
2024-01-30 12:07 ` [COMMITTED 094/101] gccrs: Added newline to get more readable lexdump arthur.cohen
2024-01-30 12:07 ` [COMMITTED 095/101] gccrs: Test: fix missing lifetime in a test arthur.cohen
2024-01-30 12:07 ` [COMMITTED 096/101] gccrs: AST: Fix for lifetime parsing arthur.cohen
2024-01-30 12:07 ` [COMMITTED 097/101] gccrs: AST: Fix for lifetime lowering arthur.cohen
2024-01-30 12:07 ` [COMMITTED 098/101] gccrs: Test: check implemented for lifetime handling arthur.cohen
2024-01-30 12:07 ` [COMMITTED 099/101] gccrs: Add improved error when no fields in initializer arthur.cohen
2024-01-30 12:07 ` [COMMITTED 100/101] gccrs: Remove TraitImplItem arthur.cohen
2024-01-30 12:07 ` [COMMITTED 101/101] gccrs: Fix output line ending patterns arthur.cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240130121026.807464-65-arthur.cohen@embecosm.com \
--to=arthur.cohen@embecosm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-rust@gcc.gnu.org \
--cc=pierre-emmanuel.patry@embecosm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).