Re: tuple indexes

2021-06-23 Thread Philip Herron
On 22/06/2021 23:51, Mark Wielaard wrote: > Hi, > > I was looking into https://github.com/Rust-GCC/gccrs/issues/511 "rust > has two kinds of integer literal" Which explains that integer literals > used for a tuple index are not general integer literals. > > First I wanted to write some tests, and s

Re: tuple indexes

2021-06-23 Thread Philip Herron
On 23/06/2021 10:47, Philip Herron wrote: > On 22/06/2021 23:51, Mark Wielaard wrote: >> Hi, >> >> I was looking into https://github.com/Rust-GCC/gccrs/issues/511 "rust >> has two kinds of integer literal" Which explains that integer literals >> used for a tuple index are not general integer litera

Re: tuple indexes

2021-06-23 Thread Mark Wielaard
Hi Philip, On Wed, 2021-06-23 at 10:55 +0100, Philip Herron wrote: > Small update, I think part of this issue is that the support for > unit-structs is not there yet in the compiler, so if you remove the unit > tuple struct and move the other struct definitions outside of the block > the test case

Re: tuple indexes

2021-06-23 Thread Philip Herron
On 23/06/2021 17:06, Mark Wielaard wrote: > Hi Philip, > > On Wed, 2021-06-23 at 10:55 +0100, Philip Herron wrote: >> Small update, I think part of this issue is that the support for >> unit-structs is not there yet in the compiler, so if you remove the unit >> tuple struct and move the other struc

Re: tuple indexes

2021-06-23 Thread Mark Wielaard
On Wed, Jun 23, 2021 at 12:51:34AM +0200, Mark Wielaard wrote: > Finally, the The Rust Reference says "A tuple index is used to refer > to the fields of tuples, tuple structs, and tuple variants." I don't > understand how this would work for tuple variants. Does anybody have > an example of how to