From: Arthur Cohen <arthur.cohen@embecosm.com>
To: gcc-patches@gcc.gnu.org
Cc: gcc-rust@gcc.gnu.org, Arthur Cohen <arthur.cohen@embecosm.com>
Subject: [PATCH 028/125] gccrs: ast: Add base nodes for FormatArgs
Date: Thu, 1 Aug 2024 16:56:24 +0200 [thread overview]
Message-ID: <20240801145809.366388-30-arthur.cohen@embecosm.com> (raw)
In-Reply-To: <20240801145809.366388-2-arthur.cohen@embecosm.com>
This commit adds a base for creating AST FormatArgs nodes after expanding
invocations of `format_args!()`. These nodes will then be expanded to
the proper runtime function calls (to core::fmt::rt) during the AST
lowering.
gcc/rust/ChangeLog:
* ast/rust-builtin-ast-nodes.h: New file.
* ast/rust-ast-full-decls.h (class FormatArgs): Declare new class.
* ast/rust-ast-collector.cc: Handle FormatArgs nodes properly.
* ast/rust-ast-collector.h: Likewise.
* ast/rust-ast-full.h: Likewise.
* ast/rust-ast-visitor.cc: Likewise.
* ast/rust-ast-visitor.h: Likewise.
* ast/rust-ast.cc: Likewise.
* ast/rust-ast.h: Likewise.
* expand/rust-derive.h: Likewise.
* hir/rust-ast-lower-base.cc: Likewise.
* hir/rust-ast-lower-base.h: Likewise.
* hir/rust-ast-lower-expr.cc: Likewise.
* hir/rust-ast-lower-expr.h: Likewise.
* resolve/rust-ast-resolve-base.cc: Likewise.
* resolve/rust-ast-resolve-base.h: Likewise.
---
gcc/rust/ast/rust-ast-collector.cc | 8 ++
gcc/rust/ast/rust-ast-collector.h | 2 +
gcc/rust/ast/rust-ast-full-decls.h | 3 +
gcc/rust/ast/rust-ast-full.h | 1 +
gcc/rust/ast/rust-ast-visitor.cc | 6 +
gcc/rust/ast/rust-ast-visitor.h | 5 +
gcc/rust/ast/rust-ast.cc | 6 +
gcc/rust/ast/rust-ast.h | 1 +
gcc/rust/ast/rust-builtin-ast-nodes.h | 129 ++++++++++++++++++++++
gcc/rust/expand/rust-derive.h | 1 +
gcc/rust/hir/rust-ast-lower-base.cc | 5 +
gcc/rust/hir/rust-ast-lower-base.h | 3 +
gcc/rust/hir/rust-ast-lower-expr.cc | 8 ++
gcc/rust/hir/rust-ast-lower-expr.h | 4 +
gcc/rust/resolve/rust-ast-resolve-base.cc | 6 +
gcc/rust/resolve/rust-ast-resolve-base.h | 3 +
16 files changed, 191 insertions(+)
create mode 100644 gcc/rust/ast/rust-builtin-ast-nodes.h
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index 181f1b100be..b8ec62367bc 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -16,6 +16,8 @@
// along with GCC; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include "rust-ast-collector.h"
+#include "rust-ast.h"
+#include "rust-diagnostics.h"
#include "rust-item.h"
#include "rust-keyword-values.h"
@@ -2805,5 +2807,11 @@ TokenCollector::visit (BareFunctionType &type)
}
}
+void
+TokenCollector::visit (AST::FormatArgs &fmt)
+{
+ rust_sorry_at (0, "unimplemented format_args!() visitor");
+}
+
} // namespace AST
} // namespace Rust
diff --git a/gcc/rust/ast/rust-ast-collector.h b/gcc/rust/ast/rust-ast-collector.h
index cf97c185a26..ec695ef5b31 100644
--- a/gcc/rust/ast/rust-ast-collector.h
+++ b/gcc/rust/ast/rust-ast-collector.h
@@ -398,6 +398,8 @@ public:
void visit (SliceType &type);
void visit (InferredType &type);
void visit (BareFunctionType &type);
+
+ void visit (FormatArgs &fmt);
};
} // namespace AST
diff --git a/gcc/rust/ast/rust-ast-full-decls.h b/gcc/rust/ast/rust-ast-full-decls.h
index c96bbfb07d9..8d5c8dbc821 100644
--- a/gcc/rust/ast/rust-ast-full-decls.h
+++ b/gcc/rust/ast/rust-ast-full-decls.h
@@ -267,6 +267,9 @@ class SliceType;
class InferredType;
struct MaybeNamedParam;
class BareFunctionType;
+
+// rust-builtin-ast-nodes.h
+class FormatArgs;
} // namespace AST
} // namespace Rust
diff --git a/gcc/rust/ast/rust-ast-full.h b/gcc/rust/ast/rust-ast-full.h
index f2152193a13..ebd38f2520c 100644
--- a/gcc/rust/ast/rust-ast-full.h
+++ b/gcc/rust/ast/rust-ast-full.h
@@ -28,5 +28,6 @@
#include "rust-stmt.h"
#include "rust-type.h"
#include "rust-macro.h"
+#include "rust-builtin-ast-nodes.h"
#endif
diff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc
index 27b9aa47d99..c72e2d72f6d 100644
--- a/gcc/rust/ast/rust-ast-visitor.cc
+++ b/gcc/rust/ast/rust-ast-visitor.cc
@@ -1395,6 +1395,12 @@ DefaultASTVisitor::visit (AST::BareFunctionType &type)
visit (type.get_return_type ());
}
+void
+DefaultASTVisitor::visit (AST::FormatArgs &)
+{
+ // FIXME: Do we have anything to do? any subnodes to visit? Probably, right?
+}
+
void
DefaultASTVisitor::visit (AST::VariadicParam ¶m)
{
diff --git a/gcc/rust/ast/rust-ast-visitor.h b/gcc/rust/ast/rust-ast-visitor.h
index 6c9715eb077..c5c9a025ba6 100644
--- a/gcc/rust/ast/rust-ast-visitor.h
+++ b/gcc/rust/ast/rust-ast-visitor.h
@@ -229,6 +229,9 @@ public:
virtual void visit (InferredType &type) = 0;
virtual void visit (BareFunctionType &type) = 0;
+ // special AST nodes for certain builtin macros such as `asm!()`
+ virtual void visit (FormatArgs &fmt) = 0;
+
// TODO: rust-cond-compilation.h visiting? not currently used
};
@@ -390,6 +393,7 @@ protected:
virtual void visit (AST::SelfParam &self) override;
virtual void visit (AST::FunctionParam ¶m) override;
virtual void visit (AST::VariadicParam ¶m) override;
+ virtual void visit (AST::FormatArgs &fmt) override;
template <typename T> void visit (T &node) { node.accept_vis (*this); }
@@ -422,6 +426,7 @@ protected:
virtual void visit (AST::MacroTranscriber &transcriber);
virtual void visit (AST::StructPatternElements &spe);
virtual void visit (AST::MaybeNamedParam ¶m);
+
void visit (AST::Attribute &attribute) {}
template <typename T> void visit_outer_attrs (T &node)
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc
index 90fe9269404..5d571b46622 100644
--- a/gcc/rust/ast/rust-ast.cc
+++ b/gcc/rust/ast/rust-ast.cc
@@ -5048,6 +5048,12 @@ MetaWord::accept_vis (ASTVisitor &vis)
vis.visit (*this);
}
+void
+FormatArgs::accept_vis (ASTVisitor &vis)
+{
+ vis.visit (*this);
+}
+
} // namespace AST
std::ostream &
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 1422d77eade..c4d5858dd63 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -2029,6 +2029,7 @@ public:
class PathExpr : public ExprWithoutBlock
{
};
+
} // namespace AST
} // namespace Rust
diff --git a/gcc/rust/ast/rust-builtin-ast-nodes.h b/gcc/rust/ast/rust-builtin-ast-nodes.h
new file mode 100644
index 00000000000..3998fbfb4a7
--- /dev/null
+++ b/gcc/rust/ast/rust-builtin-ast-nodes.h
@@ -0,0 +1,129 @@
+// Copyright (C) 2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_AST_BUILTIN_NODES_H
+#define RUST_AST_BUILTIN_NODES_H
+
+#include "rust-system.h"
+#include "line-map.h"
+#include "optional.h"
+#include "rust-ast.h"
+#include "rust-fmt.h"
+
+namespace Rust {
+namespace AST {
+
+// Definitions, from rustc's `FormatArgs` AST struct
+// https://github.com/rust-lang/rust/blob/1be468815c/compiler/rustc_ast/src/format.rs
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └──────────────────────────────────────────────┘
+// FormatArgs
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └─────────┘
+// argument
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └───────────────────┘
+// template
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └────┘└─────────┘└┘
+// pieces
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └────┘ └┘
+// literal pieces
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └─────────┘
+// placeholder
+//
+// format_args!("hello {abc:.xyz$}!!", abc="world");
+// └─┘ └─┘
+// positions (could be names, numbers, empty, or `*`)
+
+class FormatArgumentKind
+{
+public:
+ Identifier &get_ident ()
+ {
+ rust_assert (kind == Kind::Captured || kind == Kind::Named);
+
+ return ident.value ();
+ }
+
+private:
+ enum class Kind
+ {
+ Normal,
+ Named,
+ Captured,
+ } kind;
+
+ tl::optional<Identifier> ident;
+};
+
+class FormatArgument
+{
+ FormatArgumentKind kind;
+ std::unique_ptr<Expr> expr;
+};
+
+class FormatArguments
+{
+ std::vector<FormatArgument> args;
+};
+
+// TODO: Format documentation better
+// Having a separate AST node for `format_args!()` expansion allows some
+// important optimizations which help reduce generated code a lot. For example,
+// turning `format_args!("a {} {} {}", 15, "hey", 'a')` directly into
+// `format_args!("a 15 hey a")`, since all arguments are literals. Or,
+// flattening imbricated `format_args!()` calls: `format_args!("heyo {}",
+// format_args!("result: {}", some_result))` -> `format_args!("heyo result: {}",
+// some_result)`
+// FIXME: Move to rust-macro.h
+class FormatArgs : public Visitable
+{
+public:
+ enum class Newline
+ {
+ Yes,
+ No
+ };
+
+ FormatArgs (location_t loc, Fmt::PieceSlice template_str,
+ FormatArguments arguments)
+ : loc (loc), template_str (std::move (template_str)),
+ arguments (std::move (arguments))
+ {}
+
+ void accept_vis (AST::ASTVisitor &vis);
+
+private:
+ location_t loc;
+ Fmt::PieceSlice template_str;
+ FormatArguments arguments;
+};
+
+} // namespace AST
+} // namespace Rust
+
+#endif // ! RUST_AST_BUILTIN_NODES_H
diff --git a/gcc/rust/expand/rust-derive.h b/gcc/rust/expand/rust-derive.h
index 8fe29c0db75..f953c3decbf 100644
--- a/gcc/rust/expand/rust-derive.h
+++ b/gcc/rust/expand/rust-derive.h
@@ -221,6 +221,7 @@ private:
virtual void visit (SelfParam ¶m) override final{};
virtual void visit (FunctionParam ¶m) override final{};
virtual void visit (VariadicParam ¶m) override final{};
+ virtual void visit (FormatArgs ¶m) override final{};
};
} // namespace AST
diff --git a/gcc/rust/hir/rust-ast-lower-base.cc b/gcc/rust/hir/rust-ast-lower-base.cc
index bcc4797df77..fa37d62d026 100644
--- a/gcc/rust/hir/rust-ast-lower-base.cc
+++ b/gcc/rust/hir/rust-ast-lower-base.cc
@@ -20,6 +20,7 @@
#include "rust-ast-lower-type.h"
#include "rust-ast-lower-pattern.h"
#include "rust-ast-lower-extern.h"
+#include "rust-ast.h"
#include "rust-attribute-values.h"
#include "rust-item.h"
#include "rust-system.h"
@@ -523,6 +524,10 @@ void
ASTLoweringBase::visit (AST::SelfParam ¶m)
{}
+void
+ASTLoweringBase::visit (AST::FormatArgs &fmt)
+{}
+
HIR::Lifetime
ASTLoweringBase::lower_lifetime (AST::Lifetime &lifetime,
bool default_to_static_lifetime)
diff --git a/gcc/rust/hir/rust-ast-lower-base.h b/gcc/rust/hir/rust-ast-lower-base.h
index d7b94ac8a70..7b0ce375f83 100644
--- a/gcc/rust/hir/rust-ast-lower-base.h
+++ b/gcc/rust/hir/rust-ast-lower-base.h
@@ -19,6 +19,7 @@
#ifndef RUST_AST_LOWER_BASE
#define RUST_AST_LOWER_BASE
+#include "rust-ast.h"
#include "rust-system.h"
#include "rust-ast-full.h"
#include "rust-ast-visitor.h"
@@ -253,6 +254,8 @@ public:
virtual void visit (AST::VariadicParam ¶m);
virtual void visit (AST::SelfParam ¶m);
+ virtual void visit (AST::FormatArgs &fmt);
+
protected:
ASTLoweringBase ()
: mappings (Analysis::Mappings::get ()),
diff --git a/gcc/rust/hir/rust-ast-lower-expr.cc b/gcc/rust/hir/rust-ast-lower-expr.cc
index 35deb57abe6..8e07b19df4c 100644
--- a/gcc/rust/hir/rust-ast-lower-expr.cc
+++ b/gcc/rust/hir/rust-ast-lower-expr.cc
@@ -22,6 +22,8 @@
#include "rust-ast-lower-struct-field-expr.h"
#include "rust-ast-lower-pattern.h"
#include "rust-ast-lower-type.h"
+#include "rust-ast.h"
+#include "rust-diagnostics.h"
namespace Rust {
namespace HIR {
@@ -828,5 +830,11 @@ ASTLoweringExpr::visit (AST::ClosureExprInnerTyped &expr)
expr.get_locus ());
}
+void
+ASTLoweringExpr::visit (AST::FormatArgs &fmt)
+{
+ rust_sorry_at (0, "unimplemented format_args!() visitor");
+}
+
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/rust-ast-lower-expr.h b/gcc/rust/hir/rust-ast-lower-expr.h
index 56da9d1ab88..168dd014002 100644
--- a/gcc/rust/hir/rust-ast-lower-expr.h
+++ b/gcc/rust/hir/rust-ast-lower-expr.h
@@ -20,6 +20,7 @@
#define RUST_AST_LOWER_EXPR
#include "rust-ast-lower-base.h"
+#include "rust-ast.h"
namespace Rust {
namespace HIR {
@@ -121,6 +122,9 @@ public:
void visit (AST::ClosureExprInner &expr) override;
void visit (AST::ClosureExprInnerTyped &expr) override;
+ // Extra visitor for FormatArgs nodes
+ void visit (AST::FormatArgs &fmt) override;
+
private:
ASTLoweringExpr ();
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.cc b/gcc/rust/resolve/rust-ast-resolve-base.cc
index c88bd58860a..04a0bb65ec2 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-base.cc
@@ -650,5 +650,11 @@ void
ResolverBase::visit (AST::FunctionParam &)
{}
+void
+ResolverBase::visit (AST::FormatArgs &fmt)
+{
+ rust_sorry_at (0, "unimplemented format_args!() visitor");
+}
+
} // namespace Resolver
} // namespace Rust
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.h b/gcc/rust/resolve/rust-ast-resolve-base.h
index 9bc64331f5a..3b4d28618e4 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.h
+++ b/gcc/rust/resolve/rust-ast-resolve-base.h
@@ -20,6 +20,7 @@
#define RUST_AST_RESOLVE_BASE_H
#include "rust-ast-visitor.h"
+#include "rust-ast.h"
#include "rust-name-resolver.h"
#include "rust-diagnostics.h"
#include "rust-location.h"
@@ -198,6 +199,8 @@ public:
void visit (AST::VariadicParam ¶m);
void visit (AST::SelfParam ¶m);
+ void visit (AST::FormatArgs &fmt);
+
protected:
ResolverBase ()
: resolver (Resolver::get ()), mappings (Analysis::Mappings::get ()),
--
2.45.2
next prev parent reply other threads:[~2024-08-01 14:58 UTC|newest]
Thread overview: 130+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 14:55 [PATCH 001/125] Rust: Make 'tree'-level 'MAIN_NAME_P' work Arthur Cohen
2024-08-01 14:55 ` [PATCH 002/125] gccrs: Fix false positive for top-level AltPattern Arthur Cohen
2024-08-01 14:55 ` [PATCH 003/125] gccrs: minor cleanup in langhook.type_for_mode Arthur Cohen
2024-08-01 14:56 ` [PATCH 004/125] gccrs: fmt: Start working on format_args!() parser Arthur Cohen
2024-08-01 14:56 ` [PATCH 005/125] gccrs: libgrust: Add format_parser library Arthur Cohen
2024-08-05 8:18 ` Don't override 'LIBS' if '--enable-languages=rust'; use 'CRAB1_LIBS' (was: [PATCH 005/125] gccrs: libgrust: Add format_parser library) Thomas Schwinge
2024-11-23 20:09 ` Rust: Work around 'error[E0658]: `let...else` statements are unstable' " Thomas Schwinge
2024-11-25 10:24 ` Rust: Work around 'error[E0658]: `let...else` statements are unstable' Arthur Cohen
2024-08-01 14:56 ` [PATCH 006/125] gccrs: Add 'gcc/rust/Make-lang.in:LIBFORMAT_PARSER' Arthur Cohen
2024-08-05 8:45 ` Inline 'gcc/rust/Make-lang.in:RUST_LIBDEPS' (was: [PATCH 006/125] gccrs: Add 'gcc/rust/Make-lang.in:LIBFORMAT_PARSER') Thomas Schwinge
2024-08-01 14:56 ` [PATCH 007/125] gccrs: libgrust: Vendor Rust dependencies Arthur Cohen
2024-08-01 14:56 ` [PATCH 008/125] Rust: Don't cache 'libformat_parser.a' Arthur Cohen
2024-08-01 14:56 ` [PATCH 009/125] Rust: Move 'libformat_parser' build into the GCC build directory Arthur Cohen
2024-08-01 14:56 ` [PATCH 010/125] Rust: Move 'libformat_parser' build into libgrust Arthur Cohen
2024-08-01 14:56 ` [PATCH 011/125] gccrs: libformat_parser: Add FFI safe interface Arthur Cohen
2024-08-01 14:56 ` [PATCH 012/125] gccrs: libformat_parser: Start experimenting with cbindgen Arthur Cohen
2024-08-01 14:56 ` [PATCH 013/125] gccrs: libformat_parser: Update header and remove old interface Arthur Cohen
2024-08-01 14:56 ` [PATCH 014/125] gccrs: libformat_parser: Send boxed values across FFI properly Arthur Cohen
2024-08-01 14:56 ` [PATCH 015/125] gccrs: format_args: Parse format string properly Arthur Cohen
2024-08-01 14:56 ` [PATCH 016/125] gccrs: format_args: Parse entire token invocation Arthur Cohen
2024-08-01 14:56 ` [PATCH 017/125] gccrs: rust-fmt: Store parsed string in Pieces struct Arthur Cohen
2024-08-01 14:56 ` [PATCH 018/125] gccrs: libformat_parser: Fix Rust warnings Arthur Cohen
2024-08-01 14:56 ` [PATCH 019/125] gccrs: format-parser: Add `is_some_and` method for Option<T> Arthur Cohen
2024-08-01 14:56 ` [PATCH 020/125] gccrs: Adjust error checks to match name resolution 2.0 Arthur Cohen
2024-08-01 14:56 ` [PATCH 021/125] gccrs: Fix small FixMe task in rust macro builtins Arthur Cohen
2024-08-01 14:56 ` [PATCH 022/125] gccrs: lang-items: Cleanup parsing and lookups of lang items Arthur Cohen
2024-08-01 14:56 ` [PATCH 023/125] gccrs: lang-items: Make lang items enum stronger, rename class, cleanup ns Arthur Cohen
2024-08-01 14:56 ` [PATCH 024/125] gccrs: extern-types: Declare external types in name resolver Arthur Cohen
2024-08-01 14:56 ` [PATCH 025/125] gccrs: hir: Add ExternalTypeItem node Arthur Cohen
2024-08-01 14:56 ` [PATCH 026/125] gccrs: extern-types: Lower to HIR::ExternalTypeItem properly Arthur Cohen
2024-08-01 14:56 ` [PATCH 027/125] gccrs: Make DefaultResolver visit more of the AST Arthur Cohen
2024-08-01 14:56 ` Arthur Cohen [this message]
2024-08-01 14:56 ` [PATCH 029/125] gccrs: macro-builtins: Add newline generic format_args!() handler Arthur Cohen
2024-08-01 14:56 ` [PATCH 030/125] gccrs: parser: Add peek(n) method to parser Arthur Cohen
2024-08-01 14:56 ` [PATCH 031/125] gccrs: format-args: Fix Rust interface and add input parsing Arthur Cohen
2024-08-01 14:56 ` [PATCH 032/125] gccrs: lower: Add base for lowering FormatArgs nodes Arthur Cohen
2024-08-01 14:56 ` [PATCH 033/125] gccrs: format-args: Add documentation for future expansion of function Arthur Cohen
2024-08-01 14:56 ` [PATCH 034/125] gccrs: Add error emitting when we can't resolve id expr Arthur Cohen
2024-08-01 14:56 ` [PATCH 035/125] gccrs: Add curly brackets, formatted clang Arthur Cohen
2024-08-01 14:56 ` [PATCH 036/125] gccrs: Ensure TupleStructPattern and TuplePattern have items Arthur Cohen
2024-08-01 14:56 ` [PATCH 037/125] gccrs: Clean BiMap to use tl::optional for lookups Arthur Cohen
2024-08-01 14:56 ` [PATCH 038/125] gccrs: Add support for external functions Arthur Cohen
2024-08-01 14:56 ` [PATCH 039/125] gccrs: Add get_pattern_kind to Pattern Arthur Cohen
2024-08-01 14:56 ` [PATCH 040/125] gccrs: Unify ASTValidation::visit for ExternalFunctionItem and Function Arthur Cohen
2024-08-01 14:56 ` [PATCH 041/125] gccrs: Update resolver to use `AST::Function` instead of `AST::ExternalFunctionItem` Arthur Cohen
2024-08-01 14:56 ` [PATCH 042/125] gccrs: Remove dead code associated with `AST::ExternalFunctionItem` Arthur Cohen
2024-08-01 14:56 ` [PATCH 043/125] gccrs: Placate clang-format re 'gcc/rust/backend/rust-tree.cc' Arthur Cohen
2024-08-01 14:56 ` [PATCH 044/125] gccrs: Replace reference to unique pointer with reference Arthur Cohen
2024-08-01 14:56 ` [PATCH 045/125] gccrs: Replace unique_ptr references with references Arthur Cohen
2024-08-01 14:56 ` [PATCH 046/125] gccrs: macro: Use MacroInvocation's node_id in ExternalItem constructor Arthur Cohen
2024-08-01 14:56 ` [PATCH 047/125] gccrs: format-args: Add base for expanding FormatArgs nodes Arthur Cohen
2024-08-01 14:56 ` [PATCH 048/125] gccrs: format-args: Start storing string in Rust memory Arthur Cohen
2024-11-23 20:17 ` Rust: Work around 'error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope' (was: [PATCH 048/125] gccrs: format-args: Start storing string in Rust memory) Thomas Schwinge
2024-08-01 14:56 ` [PATCH 049/125] gccrs: format-args: Add basic expansion of unnamed Display::fmt arguments Arthur Cohen
2024-08-01 14:56 ` [PATCH 050/125] gccrs: format-args: Add basic test case Arthur Cohen
2024-08-01 14:56 ` [PATCH 051/125] gccrs: format-args: Only pass the format string to the parser Arthur Cohen
2024-08-01 14:56 ` [PATCH 052/125] gccrs: TyTy: add common SubstitutionRef API Arthur Cohen
2024-08-01 14:56 ` [PATCH 053/125] gccrs: TyTy: Variance analysis module Arthur Cohen
2024-08-01 14:56 ` [PATCH 054/125] gccrs: TyTy: Collect variance info from types Arthur Cohen
2024-08-01 14:56 ` [PATCH 055/125] gccrs: Store visibility properly in ExternalTypeItem Arthur Cohen
2024-08-01 14:56 ` [PATCH 056/125] gccrs: Fix typo Arthur Cohen
2024-08-01 14:56 ` [PATCH 057/125] gccrs: Split up rust-macro-builtins.cc Arthur Cohen
2024-08-01 14:56 ` [PATCH 058/125] gccrs: Placate clang-format re 'gcc/rust/lex/rust-lex.cc' Arthur Cohen
2024-08-01 14:56 ` [PATCH 059/125] gccrs: nr2.0: Add new ImmutableNameResolutionCtx class Arthur Cohen
2024-08-01 14:56 ` [PATCH 060/125] gccrs: sesh: Add late name resolution 2.0 Arthur Cohen
2024-08-01 14:56 ` [PATCH 061/125] gccrs: session-manager: Dump name resolution pass Arthur Cohen
2024-08-01 14:56 ` [PATCH 062/125] gccrs: session manager: Init Immutable name resolver Arthur Cohen
2024-08-01 14:56 ` [PATCH 063/125] gccrs: nr2.0: Add lookup of resolved nodes Arthur Cohen
2024-08-01 14:57 ` [PATCH 064/125] gccrs: typecheck: Start using nr2.0 properly Arthur Cohen
2024-08-01 14:57 ` [PATCH 065/125] gccrs: backend: Use new name resolver where necessary Arthur Cohen
2024-08-01 14:57 ` [PATCH 066/125] gccrs: nr2.0: Start using newtype pattern for Usage and Declaration Arthur Cohen
2024-08-01 14:57 ` [PATCH 067/125] gccrs: late: Setup builtin types properly, change Rib API Arthur Cohen
2024-08-01 14:57 ` [PATCH 068/125] gccrs: Fix duplicate detection Arthur Cohen
2024-08-01 14:57 ` [PATCH 069/125] gccrs: Emit error on identical use declarations Arthur Cohen
2024-08-01 14:57 ` [PATCH 070/125] gccrs: Change error message on unresolved import Arthur Cohen
2024-08-01 14:57 ` [PATCH 071/125] gccrs: Prevent error emission on resolver reentry Arthur Cohen
2024-08-01 14:57 ` [PATCH 072/125] gccrs: late: Add bool builtin type Arthur Cohen
2024-08-01 14:57 ` [PATCH 073/125] gccrs: Add modules to type namespace Arthur Cohen
2024-08-01 14:57 ` [PATCH 074/125] gccrs: Add name resolution for on globbing use decl Arthur Cohen
2024-08-01 14:57 ` [PATCH 075/125] gccrs: Shape up name resolver for normal direct calls Arthur Cohen
2024-08-01 14:57 ` [PATCH 076/125] gccrs: Add call to globbing visitor Arthur Cohen
2024-08-01 14:57 ` [PATCH 077/125] gccrs: Make globbing definition shadowable by default Arthur Cohen
2024-08-01 14:57 ` [PATCH 078/125] gccrs: Add support for ambiguous use declarations Arthur Cohen
2024-08-01 14:57 ` [PATCH 079/125] gccrs: Add tuple struct constructor to value namespace Arthur Cohen
2024-08-01 14:57 ` [PATCH 080/125] gccrs: Change error message to match test Arthur Cohen
2024-08-01 14:57 ` [PATCH 081/125] gccrs: Visit function return type in default resolver Arthur Cohen
2024-08-01 14:57 ` [PATCH 082/125] gccrs: Visit constant item " Arthur Cohen
2024-08-01 14:57 ` [PATCH 083/125] gccrs: Raw pointer type visitor didn't require overload Arthur Cohen
2024-08-01 14:57 ` [PATCH 084/125] gccrs: Values shall be inserted in the value namespace Arthur Cohen
2024-08-01 14:57 ` [PATCH 085/125] gccrs: Unit struct constructor shall be resolved Arthur Cohen
2024-08-01 14:57 ` [PATCH 086/125] gccrs: Add tuple struct to the type namespace Arthur Cohen
2024-08-01 14:57 ` [PATCH 087/125] gccrs: Change enum namespace from value to type Arthur Cohen
2024-08-01 14:57 ` [PATCH 088/125] gccrs: Struct are types, not values Arthur Cohen
2024-08-01 14:57 ` [PATCH 089/125] gccrs: Add constant identifiers to the value namespace Arthur Cohen
2024-08-01 14:57 ` [PATCH 090/125] gccrs: Remove extern block scoping Arthur Cohen
2024-08-01 14:57 ` [PATCH 091/125] gccrs: Remove unsafe block empty visit function Arthur Cohen
2024-08-01 14:57 ` [PATCH 092/125] gccrs: Use new name resolver to compile constant items Arthur Cohen
2024-08-01 14:57 ` [PATCH 093/125] gccrs: Reinject Self parameter in new resolver Arthur Cohen
2024-08-01 14:57 ` [PATCH 094/125] gccrs: Update assignment operator with cratenum Arthur Cohen
2024-08-01 14:57 ` [PATCH 095/125] gccrs: Prevent getting immutable context with classic nr Arthur Cohen
2024-08-01 14:57 ` [PATCH 096/125] gccrs: Fix quoted string format Arthur Cohen
2024-08-01 14:57 ` [PATCH 097/125] gccrs: Add mappings for struct base and struct fields Arthur Cohen
2024-08-01 14:57 ` [PATCH 098/125] gccrs: Fix use rebind name resolution Arthur Cohen
2024-08-01 14:57 ` [PATCH 099/125] gccrs: compile: resolve-path-ref: properly resolve nodeId with nr2.0 Arthur Cohen
2024-08-01 14:57 ` [PATCH 100/125] gccrs: nr2.0: Add new test cases Arthur Cohen
2024-08-01 14:57 ` [PATCH 101/125] gccrs: Add globbing name resolution 2.0 test Arthur Cohen
2024-08-01 14:57 ` [PATCH 102/125] gccrs: Change dfs function return type to support gcc 4.8 Arthur Cohen
2024-08-01 14:57 ` [PATCH 103/125] gccrs: Improve parsing of raw byte string literals Arthur Cohen
2024-08-01 14:57 ` [PATCH 104/125] gccrs: Recognize rustc_deprecated as a builtin attribute Arthur Cohen
2024-08-01 14:57 ` [PATCH 105/125] gccrs: Recognize unstable " Arthur Cohen
2024-08-01 14:57 ` [PATCH 106/125] gccrs: Avoid parsing const unsafe/extern functions as async Arthur Cohen
2024-08-01 14:57 ` [PATCH 107/125] gccrs: Improve parsing of raw string literals Arthur Cohen
2024-08-01 14:57 ` [PATCH 108/125] gccrs: raw-strings: Remove dg-excess-error directive Arthur Cohen
2024-08-01 14:57 ` [PATCH 109/125] gccrs: unify: Always coerce `!` to the target type Arthur Cohen
2024-08-01 14:57 ` [PATCH 110/125] gccrs: borrowck: Use rust-system.h Arthur Cohen
2024-08-01 14:57 ` [PATCH 111/125] gccrs: borrowck: Unify BIR terminilogy (node->statement) Arthur Cohen
2024-08-01 14:57 ` [PATCH 112/125] gccrs: borrowck: BIR: use callable API Arthur Cohen
2024-08-01 14:57 ` [PATCH 113/125] gccrs: borrowck: BIR: Place tree traverse API Arthur Cohen
2024-08-01 14:57 ` [PATCH 114/125] gccrs: borrowck: BIR: scope handling Arthur Cohen
2024-08-01 14:57 ` [PATCH 115/125] gccrs: borrowck: BIR: emit moves Arthur Cohen
2024-08-01 14:57 ` [PATCH 116/125] gccrs: borrowck: BIR: make BIR visitor const Arthur Cohen
2024-08-01 14:57 ` [PATCH 117/125] gccrs: borrowck: Polonius FFI Arthur Cohen
2024-08-01 14:57 ` [PATCH 118/125] gccrs: borrowck: Free region representation Arthur Cohen
2024-08-01 14:57 ` [PATCH 119/125] gccrs: borrowck: extract regions from types using VA Arthur Cohen
2024-08-01 14:57 ` [PATCH 120/125] gccrs: borrowck: Regions in BIR Arthur Cohen
2024-08-01 14:57 ` [PATCH 121/125] gccrs: borrowck: Fact collector Arthur Cohen
2024-08-01 14:57 ` [PATCH 122/125] gccrs: borrowck: Remove block braces to satisfy GNU style Arthur Cohen
2024-08-01 14:57 ` [PATCH 123/125] gccrs: borrowck: Bump copyright notice Arthur Cohen
2024-08-01 14:58 ` [PATCH 124/125] gccrs: Visit type during resolution of inherent impl Arthur Cohen
2024-08-01 14:58 ` [PATCH 125/125] gccrs: Add a test for inherent impl type name resolve 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=20240801145809.366388-30-arthur.cohen@embecosm.com \
--to=arthur.cohen@embecosm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-rust@gcc.gnu.org \
/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).