[gcc/devel/rust/master] Merge #1527 #1529 #1530 #1534

Thomas Schwinge tschwinge@gcc.gnu.org
Mon Sep 26 11:04:46 GMT 2022


https://gcc.gnu.org/g:6d98713a7b9cc58573be3e209a27a6c4ce682166

commit 6d98713a7b9cc58573be3e209a27a6c4ce682166
Merge: cfd2938f069 138a6260124 5a019b1e71a 7ebe6693360 d4da06f7215
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Mon Sep 26 07:36:56 2022 +0000

    Merge #1527 #1529 #1530 #1534
    
    1527: rust: Add -frust-compile-until option r=CohenArthur a=CohenArthur
    
    This option helps ensure that we do not introduce regressions on various
    parts of the compilation pipeline. For example, a testcase (or testsuite
    from the `testing` project) might pass attribute checking, expansion and
    lowering, but fail during typechecking. Should a change suddenly make
    that testcase fail expansion, we would not be able to notice it. By
    generating tests that run up until expansion, typechecking, compilation
    and so forth we ensure that no regressions are added accidentally to
    already failing tests/testsuites.
    
    
    1529: const generics: Make sure const generic types are visited properly in all contexts r=CohenArthur a=CohenArthur
    
    Closes #1360
    
    1530: const generics: Forbid default values in Functions, Traits and Impls r=CohenArthur a=CohenArthur
    
    Fixes #1310
    
    1534: module lowering: Do not append null pointers as items r=CohenArthur a=CohenArthur
    
    Some module items do not need to get lowered to HIR such as `macro_rules!` definitions. Hence, module lowering should act the same as crate lowering: Only emplace back the lowered item if it is a valid pointer
    
    Fixes #1533
    
    Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>

Diff:

 gcc/rust/checks/errors/rust-const-checker.cc      | 97 +++++++++++++++++++++--
 gcc/rust/checks/errors/rust-const-checker.h       | 25 ++++++
 gcc/rust/hir/rust-ast-lower-item.cc               |  5 +-
 gcc/rust/lang.opt                                 | 42 ++++++++++
 gcc/rust/rust-session-manager.cc                  | 36 ++++++++-
 gcc/rust/rust-session-manager.h                   | 25 +++++-
 gcc/testsuite/rust/compile/const_generics_7.rs    | 17 ++++
 gcc/testsuite/rust/compile/const_generics_8.rs    | 12 +++
 gcc/testsuite/rust/compile/frust-compile-until.rs |  7 ++
 gcc/testsuite/rust/compile/macro44.rs             | 34 ++++++++
 10 files changed, 290 insertions(+), 10 deletions(-)


More information about the Gcc-cvs mailing list