gcc/rust/ChangeLog:
* hir/tree/rust-hir-item.h (class ExternalTypeItem): New class.
* hir/tree/rust-hir.cc (ExternalTypeItem::as_string): Likewise.
* backend/rust-compile-extern.h: Add base for handling
HIR::ExternalTypeItem
node.
* checks/errors/borrowck/r
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc
(DefaultResolver::visit): Visit inner AST nodes of ClosureExprInner,
ClosureExprInnerTyped, IfExpr, IfExprConseqElse, MatchExpr,
PathInExpression, EnumItemTuple, EnumItemStruct, and
En
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.
From: jjasmine
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add error
emitting
---
gcc/rust/resolve/rust-late-name-resolver-2.0.cc | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/gcc/rust/resolve/rust-late-name-resol
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler):
Construct string to parser properly.
---
gcc/rust/expand/rust-macro-builtins.cc | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/expand/rust-mac
Workaround for Ubuntu 18.04, since we still use it for the GCC 4.8 CI.
The default Rust package is 1.65 (and unlikely to change I assume?),
but the generic format parser library uses `is_some_and` which was
introduced in 1.70. So this is a simple reimplementation, directly taken
from the standard l
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (format_args_maker): New function.
(try_expand_many_expr): Add comment about reworking function.
(MacroBuiltin::format_args_handler): Add newline parameter.
* expand/rust-macro-builtins.h: Likewise.
---
gcc/rust/e
gcc/rust/ChangeLog:
* hir/rust-ast-lower-extern.h: Lower to HIR::ExternalTypeItem nodes.
* hir/tree/rust-hir-item.h (class ExternalTypeItem): Create private
visibility by default as extern types have no visibility - add a comment
about the correctness of this.
---
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Remove
unused deprecated attribute and unused import.
* libformat_parser/src/lib.rs: Remove unused import.
---
libgrust/libformat_parser/generic_format_parser/src/lib.rs | 2 --
libgrust/libformat_par
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-implitem.h: Declare external types as new
types.
---
gcc/rust/resolve/rust-ast-resolve-implitem.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/gcc/rust/resolve/rust-ast-resolve-implitem.h
b/gcc/rust/resolv
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::~Pieces): Call libformat_parser's release
function in destructor.
* ast/rust-fmt.h (struct PieceSlice): Add capacity.
(destroy_pieces): New.
(struct Pieces): Add destructor.
libgrust/ChangeLog:
* libfo
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler):
Transform entire invocation token stream into string for the parser.
---
gcc/rust/expand/rust-macro-builtins.cc | 40 ++
1 file changed, 22 insertions(+), 18 deletions(
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect): Fix signature to take ownership
of the given string.
* ast/rust-fmt.h (struct Pieces): Store parsed string in the struct.
libgrust/ChangeLog:
* libformat_parser/src/lib.rs: Add debug prompt.
---
gcc/rust/as
From: Thomas Schwinge
Addresses #2883.
contrib/
* gcc_update (files_and_dependencies): Update for
'libformat_parser' in libgrust.
gcc/rust/
* Make-lang.in (LIBFORMAT_PARSER): Point to 'libformat_parser'
build in libgrust.
(%.toml:, $(LIBFOR
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Add generic
library.
* libformat_parser/src/lib.rs: Add base for FFI interface.
---
.../generic_format_parser/src/lib.rs | 2 +-
libgrust/libformat_parser/src/lib.rs | 301
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect): Use new Pieces API.
* ast/rust-fmt.h: Update interface with new FFI bindings.
libgrust/ChangeLog:
* libformat_parser/src/lib.rs: Add IntoFFI trait.
* libformat_parser/libformat-parser.h: Removed.
---
gcc/ru
From: Thomas Schwinge
Fixes #2883.
gcc/rust/ChangeLog:
* Make-lang.in (LIBFORMAT_PARSER): Point to the GCC build
directory.
* ($(LIBFORMAT_PARSER)): Build in the GCC build directory.
---
gcc/rust/Make-lang.in | 11 +--
1 file changed, 9 insertions(+), 2 deletions
Compile libformat_parser and link to it.
gcc/rust/ChangeLog:
* Make-lang.in: Compile libformat_parser.
* ast/rust-fmt.cc: New FFI definitions.
* ast/rust-fmt.h: Likewise.
* expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler):
Call
into libfor
libgrust/ChangeLog:
* libformat_parser/cbindgen.toml: New file.
* libformat_parser/libformat-parser.h: New file.
gcc/rust/ChangeLog:
* ast/rust-fmt.h: Add remaining FFI types.
---
gcc/rust/ast/rust-fmt.h | 4 +-
libgrust/libformat_parser/cbindgen.t
From: Thomas Schwinge
gcc/rust/
* Make-lang.in (LIBFORMAT_PARSER): Point to the actual build artifact.
($(LIBFORMAT_PARSER)): Don't cache it.
---
gcc/rust/Make-lang.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/M
From: Thomas Schwinge
... to avoid verbatim repetition.
gcc/rust/
* Make-lang.in (LIBPROC_MACRO_INTERNAL): New.
(RUST_LIBDEPS, crab1$(exeext), rust/libformat_parser.a): Use it.
---
gcc/rust/Make-lang.in | 12
1 file changed, 8 insertions(+), 4 deletions(-)
This commit adds a base class for parsing the various constructs of a
Rust format string, according to the grammar in the reference:
https://doc.rust-lang.org/std/fmt/index.html#syntax
gcc/rust/ChangeLog:
* Make-lang.in: Compile rust-fmt object
* ast/rust-fmt.cc: New file.
From: Marc Poulhiès
gcc/rust/ChangeLog:
* rust-lang.cc (grs_langhook_type_for_mode): simplify code for
xImode. Add missing long_double_type_node.
Signed-off-by: Marc Poulhiès
---
gcc/rust/rust-lang.cc | 39 +++
1 file changed, 15 insertions(
From: Owen Avery
gcc/rust/ChangeLog:
* hir/rust-ast-lower-pattern.cc
(ASTLoweringPattern::visit):
Reset is_let_top_level while visiting GroupedPattern.
gcc/testsuite/ChangeLog:
* rust/compile/let_alt.rs: Check for false positive.
Signed-off-by: Owen Avery
---
From: Thomas Schwinge
'gcc/tree.h':
#define main_identifier_nodeglobal_trees[TI_MAIN_IDENTIFIER]
#define MAIN_NAME_P(NODE) \
(IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node)
..., which is not initialized by default, but has to be set up by every front
end ind
Hi Daniel,
Thanks for patching the Rust frontend as well. Looks great to me.
Best,
Arthur
On 7/10/24 11:43, Daniel Bertalan wrote:
As of Xcode 16 beta 2 with the macOS 15 SDK, each re-inclusion of the
stddef.h header causes the NULL macro in C++ to be re-defined to an
integral constant (__nul
Hi Kewen,
Sorry for not answering earlier - yes, this sounds good to me :) thanks
for taking care of that.
Best,
Arthur
On 6/21/24 12:36, Kewen.Lin wrote:
Hi Arthur,
on 2024/6/21 18:17, Arthur Cohen wrote:
Hi,
Sorry about the delay in my answer! The patch looks good to me :) Will you
Hi,
Sorry about the delay in my answer! The patch looks good to me :) Will
you push it as part of your patchset?
Kindly,
Arthur
On 6/3/24 05:00, Kewen Lin wrote:
Joseph pointed out "floating types should have their mode,
not a poorly defined precision value" in the discussion[1],
as he and
gcc/rust/ChangeLog:
* Make-lang.in: Add proper rust.install-html rule.
---
gcc/rust/Make-lang.in | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index 2395541425f..815a8b315c0 100644
--- a/gcc/rust/Make-
From: Christophe Lyon
rust has the (empty) rust.dvi and rust.html rules, but lacks the
(empty) rust.install-dvi and rust.install-html ones.
2024-04-04 Christophe Lyon
gcc/rust/
* Make-lang.in (rust.install-dvi, rust.install-html): New rules.
---
gcc/rust/Make-lang.in | 2 ++
gcc/rust/ChangeLog:
* Make-lang.in: Add documentation targets.
* gccrs.texi: New file.
---
gcc/rust/Make-lang.in | 25 +++--
gcc/rust/gccrs.texi | 207 ++
2 files changed, 225 insertions(+), 7 deletions(-)
create mode 100644 gcc/rust/gcc
Hi everyone,
This is a quick and simple patchset to our Makefile in order to have proper
documentation rules for the Rust frontend. Let me know if these changes would
be accepted into 14.2, or if we should rather integrate them to trunk for 15.1
as part of our upstreaming process.
If the changes
Hi Collin,
Sorry about the mess. As Sam pointed out, there was already a patch
proposed in the bugzilla PR which I've posted on the ML as well for
review. The only difference with your patch is that it also changes
ac_cv_search_pthread_crate to ac_cv_search_pthread_create, as otherwise
the ch
ChangeLog:
* configure.ac: Add quoting around both variable checks performed, which
will fix the noise reported when libc contains both ldl and lpthread. A
typo around `pthread_create` being typed `pthread_crate` is also fixed.
* configure: Regenerate.
---
configur
Thanks Richi!
Tested again and pushed on trunk.
Best,
Arthur
On 5/31/24 15:02, Richard Biener wrote:
On Fri, May 31, 2024 at 12:24 PM Arthur Cohen wrote:
Hi Richard,
On 4/30/24 09:55, Richard Biener wrote:
On Fri, Apr 19, 2024 at 11:49 AM Arthur Cohen wrote:
Hi everyone,
This patch
Hi Richard,
On 4/30/24 09:55, Richard Biener wrote:
On Fri, Apr 19, 2024 at 11:49 AM Arthur Cohen wrote:
Hi everyone,
This patch checks for the presence of dlopen and pthread_create in libc. If
that is not the
case, we check for the existence of -ldl and -lpthread, as these libraries are
---
htdocs/gcc-14/changes.html | 13 +
1 file changed, 13 insertions(+)
diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 924e045a..dd3fea8d 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -626,6 +626,19 @@ You may also want to chec
On 4/29/24 15:30, Christophe Lyon wrote:
On Mon, 29 Apr 2024 at 15:24, Arthur Cohen wrote:
Thanks Christophe!
I've added your patch as part of a documentation pull-request I'm adding
to our dev repo: https://github.com/Rust-GCC/gccrs/pull/2966
It'll be upstreamed with th
Thanks Christophe!
I've added your patch as part of a documentation pull-request I'm adding
to our dev repo: https://github.com/Rust-GCC/gccrs/pull/2966
It'll be upstreamed with the next batch of commits we send, as soon as
trunk reopens fully for 15.1.
Best,
Arthur
On 4/4/24 18:27, Chris
Hey Guillaume :)
On 4/20/24 01:05, Guillaume Gomez wrote:
Hi,
I just encountered the need to retrieve the name of an `rvalue` (if
there is one) while working on the Rust GCC backend.
This patch adds a getter to retrieve the information.
Cordially.
virtual bool get_wide_int (wide_int *)
Hi everyone,
This patch checks for the presence of dlopen and pthread_create in libc. If
that is not the
case, we check for the existence of -ldl and -lpthread, as these libraries are
required to
link the Rust runtime to our Rust frontend.
If these libs are not present on the system, then we di
Hi Rainer!
On 4/17/24 10:13, Rainer Orth wrote:
Andrew Pinski writes:
On Mon, Apr 8, 2024 at 9:39 AM wrote:
From: Pierre-Emmanuel Patry
Hello,
The rust frontend requires cargo to build some of it's components,
it's presence was not checked during configuration.
WHY did this go in righ
Morning Thomas,
On 4/15/24 13:07, Thomas Schwinge wrote:
Hi!
On 2024-01-16T17:43:10+, Arthur Cohen via Gcc-cvs
wrote:
https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3
commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3
Author: Pierre-Emmanuel Patry
Date: Wed Apr
Hi Thomas,
On 4/15/24 14:44, Thomas Schwinge wrote:
Hi!
On 2024-04-15T13:14:42+0200, I wrote:
On 2024-04-08T18:33:38+0200, pierre-emmanuel.pa...@embecosm.com wrote:
The rust frontend requires cargo to build some of it's components,
In GCC upstream still: 's%requires%is going to require'. ;
Hi Andrew,
On 4/9/24 16:12, Andrew Pinski wrote:
On Mon, Apr 8, 2024 at 9:39 AM wrote:
From: Pierre-Emmanuel Patry
Hello,
The rust frontend requires cargo to build some of it's components,
it's presence was not checked during configuration.
NOTE cargo itself is a huge security hole. If a
On 4/9/24 12:09, Iain Sandoe wrote:
Hi Arthur,
On 9 Apr 2024, at 13:01, Arthur Cohen wrote:
On 4/9/24 10:55, Iain Sandoe wrote:
Hi Arthur,
On 9 Apr 2024, at 11:40, Arthur Cohen wrote:
On 4/9/24 09:47, John Paul Adrian Glaubitz wrote:
Hello,
On Mon, 2024-04-08 at 18:33 +0200, pierre
Hi Iain!
On 4/9/24 10:55, Iain Sandoe wrote:
Hi Arthur,
On 9 Apr 2024, at 11:40, Arthur Cohen wrote:
On 4/9/24 09:47, John Paul Adrian Glaubitz wrote:
Hello,
On Mon, 2024-04-08 at 18:33 +0200, pierre-emmanuel.pa...@embecosm.com wrote:
The rust frontend requires cargo to build some of
Morning all,
On 4/9/24 09:47, John Paul Adrian Glaubitz wrote:
Hello,
On Mon, 2024-04-08 at 18:33 +0200, pierre-emmanuel.pa...@embecosm.com wrote:
The rust frontend requires cargo to build some of it's components,
it's presence was not checked during configuration.
Isn't this creating a hen-
Hi,
On 3/5/24 16:09, David Malcolm wrote:
On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote:
Hi.
See answers below.
On Thu, 2023-11-09 at 18:04 -0500, David Malcolm wrote:
On Thu, 2023-11-09 at 17:27 -0500, Antoni Boucher wrote:
Hi.
This patch adds support for getting the CPU features
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-expand.h (struct MacroExpander): Nitpick: fix
formatting of emitted error.
---
gcc/rust/expand/rust-macro-expand.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/rust/expand/rust-macro
From: Sahil Yeole
Signed-off-by: Sahil Yeole
---
gcc/rust/ast/rust-ast-builder.cc | 2 +-
gcc/rust/ast/rust-ast-builder.h | 2 +-
gcc/rust/ast/rust-ast-collector.cc| 2 +-
gcc/rust/ast/rust-ast-collector.h
From: Arthur Cohen
To ensure we don't introduce regressions back to issue #2314
gcc/testsuite/ChangeLog:
* rust/compile/rustc_const_stable.rs: New test.
---
gcc/testsuite/rust/compile/rustc_const_stable.rs | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 gcc/testsuite
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-pattern.cc
(CompilePatternLet::visit):
Lookup type of sub-pattern, not tuple pattern itself.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2847-b.rs: New test.
Signed-off-by: Owen Avery
---
gcc/rust/
From: Arthur Cohen
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-implitem.h: Fix typo in field
(region_costraints -> region_constraints).
---
gcc/rust/typecheck/rust-hir-type-check-implitem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/r
From: 0xn4utilus
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit):
Add variadic check on all parameters.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2850.rs: New test.
Signed-off-by: 0xn4utilus
---
gcc/rust/checks/errors/rust-ast-va
From: Marc Poulhiès
gcc/rust/ChangeLog:
* backend/rust-builtins.cc
(BuiltinsContext::register_rust_mappings): Add powi and reformat.
* backend/rust-builtins.h: Add missing copyright header.
gcc/testsuite/ChangeLog:
* rust/compile/torture/intrinsics-math.rs: Adju
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-item.cc
(flatten_glob): Use Import class.
(flatten_rebind): Likewise.
(flatten_list): Likewise.
(flatten): Likewise.
(flatten_use_dec_to_paths): Likewise.
(flatten_use_dec_to_i
From: Arthur Cohen
This adds a testcase for issue #2129.
gcc/testsuite/ChangeLog:
* rust/execute/torture/matches_macro.rs: New test.
---
.../rust/execute/torture/matches_macro.rs | 30 +++
1 file changed, 30 insertions(+)
create mode 100644 gcc/testsuite/rust
Hey everyone,
Here is the latest patchset of the Rust frontend, taken directly from our
development branch.
The patches have been built, tested and bootstrapped on x86-64.
[COMMITTED 1/9] gccrs: Fix typo in RegionConstraints instance
[COMMITTED 2/9] gccrs: Add testcase for matches!() macro
[COM
Hi Jakub,
On 2/15/24 10:10, Jakub Jelinek wrote:
On Fri, Feb 09, 2024 at 11:03:38AM +0100, Jakub Jelinek wrote:
On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.co...@embecosm.com wrote:
From: Philip Herron
This patch introduces one regression because generics are getting better
understood o
On 2/7/24 16:26, Bernhard Reutner-Fischer wrote:
On Wed, 7 Feb 2024 12:43:53 +0100
arthur.co...@embecosm.com wrote:
diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h
b/gcc/rust/typecheck/rust-hir-type-check-implitem.h
index 067465ec77a..4d178440775 100644
--- a/gcc/rust/typecheck
From: Kushal Pal
To use AST::Function for trait functions, we can parse trait functions
using available parse_function().
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_trait_item):
Use parse_function() to parse trait functions.
Signed-off-by: Kushal Pal
---
gcc
From: Kushal Pal
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_trait_item):
Handle macros in trait items similar to how its handled for trait
implementation items.
Signed-off-by: Kushal Pal
---
gcc/rust/parse/rust-parse-impl.h | 37 --
From: Kushal Pal
Since we want to use AST::Function class for trait functions as well, we
need to check against specific conditions in ASTValidation phase.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit):
Add checks for Trait functions.
Signed-
From: Kushal Pal
Trait functions now use AST::Function class, so classes
AST::TraitItemFunc, AST::TraitItemMethod, AST::TraitFunctionDecl,
AST::TraitMethodDecl and their related functions can be removed.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Re
From: Kushal Pal
gcc/rust/ChangeLog:
* ast/rust-ast.h: Replace TraitItem with AssociatedItem.
* ast/rust-item.h (class Trait): Likewise.
* expand/rust-expand-visitor.cc (ExpandVisitor::visit):
Likewise.
* parse/rust-parse-impl.h (Parser::parse_trait): Like
From: Philip Herron
This keeps the resolution code in line with paths.
Addresses #2723
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc: remove hack
---
gcc/rust/typecheck/rust-hir-type-check-type.cc | 16
1 file changed, 16 deletions(-)
diff --git a/gcc/r
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-tyty.cc (BaseType::BaseType): Store orig ref.
(BaseType::get_orig_ref): Add getter.
* typecheck/rust-tyty.h: Store orig ref.
Signed-off-by: Jakub Dupak
---
gcc/rust/typecheck/rust-tyty.cc | 10 --
gcc/rust/
From: Philip Herron
This patch introduces one regression because generics are getting better
understood over time. The code here used to apply generics with the same
symbol from previous segments which was a bit of a hack with out limited
inference variable support. The regression looks like it w
From: Jakub Dupak
gcc/rust/ChangeLog:
* hir/tree/rust-hir-item.h: Add missing getter
Signed-off-by: Jakub Dupak
---
gcc/rust/hir/tree/rust-hir-item.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/gcc/rust/hir/tree/rust-hir-item.h
b/gcc/rust/hir/tree/rust-hir-item.h
index 7
From: Philip Herron
Fixes #1483
gcc/testsuite/ChangeLog:
* rust/compile/issue-1483.rs: New test.
---
gcc/testsuite/rust/compile/issue-1483.rs | 28
1 file changed, 28 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/issue-1483.rs
diff --git a/gcc/t
From: Nobel Singh
This patch moves the implementation of the implitem lowering
from rust-ast-lower-implitem.h into the rust-ast-lower-implitem.cc
file.
gcc/rust/ChangeLog:
* Make-lang.in: Add rust-ast-lower-implitem.cc to list of objects.
* hir/rust-ast-lower-implitem.h (RUST_AS
From: Kushal Pal
gcc/testsuite/ChangeLog:
* rust/compile/issue-2040.rs:
Enclose 'const' in single quotes.
Signed-off-by: Kushal Pal
---
gcc/testsuite/rust/compile/issue-2040.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/rust/compile/issue
From: Kushal Pal
To use AST::Function instead of AST::TraitItemFunc and
AST::TraitItemMethod, we need to provide similar visitors during
lowering and resolving phase.
gcc/rust/ChangeLog:
* hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit):
Provide visitor for AST::Functi
From: Nobel Singh
Previously, the default ABI was set to Rust, which is not correct for
extern blocks and extern functions. This patch changes the default
ABI to C for these cases.
gcc/rust/ChangeLog:
* hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_qualifiers):
Change defau
From: Philip Herron
We can point to generic parent types which means we need to do the shallow
resolve thing that rustc does. We have destructure which is similar to get
what the parameter type points to.
Fixes #2775
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-pattern.cc (TypeC
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-tyty-region.h: New file.
Signed-off-by: Jakub Dupak
---
gcc/rust/typecheck/rust-tyty-region.h | 110 ++
1 file changed, 110 insertions(+)
create mode 100644 gcc/rust/typecheck/rust-tyty-region.h
diff --gi
From: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): refactor
* typecheck/rust-hir-type-check.h: new prototype
* typecheck/rust-typecheck-context.cc
(TypeCheckContext::compute_inference_variables): x
---
gcc/rust/typechec
From: Philip Herron
Fixes #2782
gcc/testsuite/ChangeLog:
* rust/compile/issue-2782.rs: New test.
Signed-off-by: Philip Herron
---
gcc/testsuite/rust/compile/issue-2782.rs | 12
1 file changed, 12 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/issue-2782.rs
From: Philip Herron
Fixes #2772
gcc/testsuite/ChangeLog:
* rust/compile/issue-2772-1.rs: New test.
* rust/compile/issue-2772-2.rs: New test.
---
gcc/testsuite/rust/compile/issue-2772-1.rs | 20
gcc/testsuite/rust/compile/issue-2772-2.rs | 20 +++
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-resolve.cc: add regions
* typecheck/rust-hir-type-check-base.cc
(TypeCheckBase::resolve_literal):
add regions, resolve generic lifetimes
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check.h (class Lifetime): add interned
lifetime class
* typecheck/rust-typecheck-context.cc
(TypeCheckContext::TypeCheckContext): add
resolution tool
(TypeCheckContext::intern_lifetime): add method
From: Philip Herron
Fixes #2747
gcc/rust/ChangeLog:
* typecheck/rust-tyty-subst.cc
(SubstitutionRef::get_mappings_from_generic_args): fix
gcc/testsuite/ChangeLog:
* rust/compile/issue-2747.rs: New test.
---
gcc/rust/typecheck/rust-tyty-subst.cc| 3 ++-
gcc/testsuite/rus
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-implitem.cc
(TypeCheckTopLevelExternItem::visit):
Add region constraints.
(TypeCheckImplItem::visit): Add region constraints.
* typecheck/rust-hir-type-check-implitem.h: Add region constraints.
From: Raiki Tamura
gcc/rust/ChangeLog:
* rust-lang.cc (run_rust_tests): Add test.
* rust-system.h: Add .
* util/make-rust-unicode.py: Output NFC_Quick_Check table.
* util/rust-codepoint.h (struct Codepoint): Add is_supplementary
method.
* util/rust
From: Kushal Pal
Fixes #2812
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_function):
Skip token if its a COMMA.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2812.rs: New test.
Signed-off-by: Kushal Pal
---
gcc/rust/parse/rust-parse-impl.h |
From: Jakub Dupak
gcc/rust/ChangeLog:
* hir/rust-ast-lower-type.cc (ASTLoweringTypeBounds::visit): fix for
lifetimes
(ASTLowerWhereClauseItem::visit): fix for lifetimes
Signed-off-by: Jakub Dupak
---
gcc/rust/hir/rust-ast-lower-type.cc | 21 +
1 file chang
From: Nirmal Patel
If newline strings are encountered while lexing, the lexer now handles
newline characters by incrementing current line number. This provides
correct line number when displaying errors. If the lexer encounters end
of file before string end, then it will use the start of the stri
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit):
Enclose const in single quotes.
gcc/testsuite/ChangeLog:
* rust/compile/const_trait_fn.rs:
Enclose const in single quotes.
Signed-off-by: Kushal Pal
---
gcc/ru
From: Kushal Pal
Fixes #2785
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit):
Added check for `async` functions inside trait.
* parse/rust-parse-impl.h (Parser::parse_trait_item):
Added switch-case for ASYNC token.
gcc/testsuite
From: Kushal Pal
Fixes #2767
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit):
Added check for `async` function inside trait.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2767.rs: New test.
Signed-off-by: Kushal Pal
---
gcc/rust/che
From: Jakub Dupak
gcc/testsuite/ChangeLog:
* rust/compile/for_lifetimes.rs: New test.
Signed-off-by: Jakub Dupak
---
gcc/testsuite/rust/compile/for_lifetimes.rs | 19 +++
1 file changed, 19 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/for_lifetimes.rs
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-internal.h: Replace nodiscard.
* checks/errors/borrowck/rust-bir-place.h: Replace nodiscard.
Signed-off-by: Jakub Dupak
---
gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h | 4 ++--
gcc
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc
(TypeCheckType::resolve_root_path): Refactor.
Signed-off-by: Jakub Dupak
---
gcc/rust/typecheck/rust-hir-type-check-type.cc | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/gc
From: Jakub Dupak
gcc/rust/ChangeLog:
* hir/tree/rust-hir-item.h: Ad lifetime getter.
* hir/tree/rust-hir-path.h: Make getter const ref.
* hir/tree/rust-hir.h: Const ref and new getter.
Signed-off-by: Jakub Dupak
---
gcc/rust/hir/tree/rust-hir-item.h | 2 ++
gcc/rust/h
From: Jakub Dupak
(probably incomplete propagation)
gcc/rust/ChangeLog:
* hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_lifetime):
Propagate static
requirement.
* hir/rust-ast-lower-base.h: Propagate static requirement.
* hir/rust-ast-lower-implitem.h: Prop
From: Jakub Dupak
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_where_clause): fix parsing
(Parser::parse_where_clause_item): fix parsing
(Parser::parse_type_bound_where_clause_item): fix parsing
(Parser::parse_trait_bound): fix parsing
* pa
From: Pierre-Emmanuel Patry
Add checks in the ast validation pass to error out with functions
(either free or associated) without a definition.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
a validation check and emit an error depending o
From: Arthur Cohen
This commit performs builtin initialization in a more "GCC-y" way,
similarly to what the D frontend is doing. This way, we no longer have
to worry about invalid attributes or types when initializing them by
hand.
Also add attributes suppo
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-ast-fragment.cc
(Fragment::assert_single_fragment): Update.
* ast/rust-ast.h
(class TraitImplItem): Move definition before that of TraitItem.
(class TraitItem):
Inherit from TraitImplItem instead of
101 - 200 of 668 matches
Mail list logo