Re: [PATCH 2/2] WIP union hir-lowering and type support

2021-07-23 Thread Philip Herron
On 23/07/2021 00:19, Mark Wielaard wrote: > Treat a union as a Struct variant like a tuple struct. Add an > iterator and get_identifier functions to the AST Union class. Same > for the HIR Union class, plus a get_generics_params method. Add a > get_is_union method tot the ADTType. > --- > gcc/ru

Re: [PATCH 1/2] Better union support in the parser

2021-07-23 Thread Philip Herron
On 23/07/2021 00:19, Mark Wielaard wrote: > union is a weak keyword which means it isn't reserved and can be used > as a generic identifier. When we see an identifier where a union could > be declared we check whether the identifier is "union", but only when > the next token is also an identifier.

Re: Using unsafe blocks in let expressions

2021-07-23 Thread Philip Herron
On 22/07/2021 00:09, Mark Wielaard wrote: > On Wed, Jul 21, 2021 at 11:09:38PM +0200, Mark Wielaard wrote: >> + Location locus; >> + if (!pratt_parse) >> +{ >> + Location locus = lexer.peek_token ()->get_locus (); > Oops, shadowed locus. Fixed patch attached, and also at > https://code

Re: rust frontend and UTF-8/unicode processing/properties

2021-07-23 Thread Philip Herron
On 18/07/2021 23:23, Jason Merrill via Gcc-rust wrote: > On Sun, Jul 18, 2021 at 1:13 PM Ian Lance Taylor via Gcc > mailto:g...@gcc.gnu.org>> wrote: > > On Sun, Jul 18, 2021 at 6:23 AM Mark Wielaard > wrote: > > > > For the gcc rust frontend I was thinking of