public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1116
@ 2022-06-08 12:32 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d17e0aa7695ddb383e0a4fc43185e2ab42c81703

commit d17e0aa7695ddb383e0a4fc43185e2ab42c81703
Merge: d36a3c5752c a9c0649503f
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Fri Apr 15 08:54:55 2022 +0000

    Merge #1116
    
    1116: Move `cfg!()` macro to builtins. Fixes #1039 r=CohenArthur a=antego
    
    Fixes #1039
    
    Hey team, I need help understanding why the test fails.
    
    Compilation succeeds, all the existing tests pass. However the test that I've added fails with the error:
    ```
    FAIL: rust/compile/cfg_macro.rs (test for excess errors)
    Excess errors:
    /Users/anton/Documents/projects/gcc2/gccrs/gcc/testsuite/rust/compile/cfg_macro.rs:17:8: fatal error: Failed to lower expr: [MacroInvocation:
     outer attributes: none
     cfg!((A))
     has semicolon: false]
    compilation terminated.
    ```
    I tried to understand what's happening using a debugger. The only thing that I understood is that the `MacroBuiltin::cfg` function runs.
    
    Appreciate any feedback.
    
    Thank you.
    
    Co-authored-by: antego <antego@users.noreply.github.com>

Diff:

 gcc/rust/expand/rust-macro-builtins.cc | 36 ++++++++++++++++++++++++++++
 gcc/rust/expand/rust-macro-builtins.h  |  3 +++
 gcc/rust/expand/rust-macro-expand.cc   | 44 ----------------------------------
 gcc/rust/expand/rust-macro-expand.h    |  5 ----
 gcc/rust/util/rust-hir-map.cc          |  1 +
 5 files changed, 40 insertions(+), 49 deletions(-)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 12:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:32 [gcc/devel/rust/master] Merge #1116 Thomas Schwinge

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).