Using unsafe blocks in let expressions
Philip Herron
philip.herron@embecosm.com
Fri Jul 23 11:23:38 GMT 2021
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.wildebeest.org/git/user/mjw/gccrs/commit/?h=let-unsafe
>
>
>
This was merged yesterday https://github.com/Rust-GCC/gccrs/pull/582
I also merged a simple test case to show the parser is working
https://github.com/Rust-GCC/gccrs/pull/587
The final PR relating to this was:
https://github.com/Rust-GCC/gccrs/pull/589 in the type checker assumed
all dereference expressions were going to be for ReferenceTypes but this
extended it to support pointers. Some work is needed to ensure
derferences and union access outside of match expressions will emit an
error but this is a fairly simple change to make I will update a guide
on how to do this later.
Thanks again
--Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 665 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc-rust/attachments/20210723/eeb199ec/attachment.sig>
More information about the Gcc-rust
mailing list