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:
* 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
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
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: 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 #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: 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: 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: 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: 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: 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: 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: 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: 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
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/rust-hir-type-check-implitem.h
> +++ b/gcc/
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
27 matches
Mail list logo