[committed,034/103] gccrs: dump: Emit visibility when dumping items

Message ID 20230221120230.596966-35-arthur.cohen@embecosm.com
State Unresolved
Headers
Series [committed,001/103] gccrs: Fix missing dead code analysis ICE on local enum definition |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Arthur Cohen Feb. 21, 2023, 12:01 p.m. UTC
  From: Arthur Cohen <arthur.cohen@embecosm.com>

gcc/rust/ChangeLog:

	* ast/rust-ast-dump.cc: Emit visibility when dumping items.
---
 gcc/rust/ast/rust-ast-dump.cc | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Gerald Pfeifer Feb. 23, 2023, 1:01 a.m. UTC | #1
Just noticed this by chance: 

How does this patch constitute a functional change (that matches the 
ChangeLog)? It looks it only adds an empty line to the source code?

Gerald

On Tue, 21 Feb 2023, arthur.cohen@embecosm.com wrote:
> From: Arthur Cohen <arthur.cohen@embecosm.com>
> 
> gcc/rust/ChangeLog:
> 
> 	* ast/rust-ast-dump.cc: Emit visibility when dumping items.
> ---
>  gcc/rust/ast/rust-ast-dump.cc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
> index fdcd97561bb..b7557bdee0c 100644
> --- a/gcc/rust/ast/rust-ast-dump.cc
> +++ b/gcc/rust/ast/rust-ast-dump.cc
> @@ -835,6 +835,7 @@ void
>  Dump::visit (Function &function)
>  {
>    emit_visibility (function.get_visibility ());
> +
>    stream << "fn " << function.get_function_name ();
>    if (function.has_generics ())
>      emit_generic_params (function.get_generic_params ());
  
Arthur Cohen Feb. 23, 2023, 10:53 a.m. UTC | #2
On 2/23/23 02:01, Gerald Pfeifer wrote:
> Just noticed this by chance:
> 
> How does this patch constitute a functional change (that matches the
> ChangeLog)? It looks it only adds an empty line to the source code?

Huh. That is weird. Sorry about that!

This range of commits on our AST dump contained commits that did not 
pass the testsuite or bootstrap properly. When trying to get them in 
shape for upstreaming (adding Changelog entries and ensuring that they 
build and pass our tests), I added some of the Changelogs before merging 
invalid commits into valid ones.

I must have made a mistake and should have squashed this commit into 
another one. Sorry about that.

As I mentioned above in the thread, this is the last time that such 
mistakes will happen as we are now enforcing proper Changelogs for all 
commits, and are putting together even more testing.

Kindly,

Arthur

> 
> Gerald
> 
> On Tue, 21 Feb 2023, arthur.cohen@embecosm.com wrote:
>> From: Arthur Cohen <arthur.cohen@embecosm.com>
>>
>> gcc/rust/ChangeLog:
>>
>> 	* ast/rust-ast-dump.cc: Emit visibility when dumping items.
>> ---
>>   gcc/rust/ast/rust-ast-dump.cc | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
>> index fdcd97561bb..b7557bdee0c 100644
>> --- a/gcc/rust/ast/rust-ast-dump.cc
>> +++ b/gcc/rust/ast/rust-ast-dump.cc
>> @@ -835,6 +835,7 @@ void
>>   Dump::visit (Function &function)
>>   {
>>     emit_visibility (function.get_visibility ());
>> +
>>     stream << "fn " << function.get_function_name ();
>>     if (function.has_generics ())
>>       emit_generic_params (function.get_generic_params ());
>
  

Patch

diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index fdcd97561bb..b7557bdee0c 100644
--- a/gcc/rust/ast/rust-ast-dump.cc
+++ b/gcc/rust/ast/rust-ast-dump.cc
@@ -835,6 +835,7 @@  void
 Dump::visit (Function &function)
 {
   emit_visibility (function.get_visibility ());
+
   stream << "fn " << function.get_function_name ();
   if (function.has_generics ())
     emit_generic_params (function.get_generic_params ());