Bug 23427 - implement raw identifiers
Summary: implement raw identifiers
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: rust (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 11.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-18 15:14 UTC by Tom Tromey
Modified: 2021-06-11 14:25 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2018-07-18 15:14:27 UTC
Rust is adding raw identifiers in the 2018 edition:

https://rust-lang-nursery.github.io/edition-guide/2018/transitioning/raw-identifiers.html

The gdb lexer should implement this as well.
Comment 1 Sourceware Commits 2021-06-11 14:24:58 UTC
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48ec4c05c68bfec4b79e95807bd82e0df4634a6c

commit 48ec4c05c68bfec4b79e95807bd82e0df4634a6c
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Jun 11 08:14:09 2021 -0600

    Implement Rust raw identifiers
    
    This patch implements Rust raw identifiers in the lexer in gdb.  There
    was an earlier patch to do this, but the contributor didn't reply to
    my email asking whether he had sorted out his copyright assignment.
    
    This is relatively straightforward, but a small test suite addition
    was needd to ensure that the new test is skipped on older versions of
    rustc -- ones that predate the introduction of raw identifiers.
    
    gdb/ChangeLog
    2021-06-11  Tom Tromey  <tom@tromey.com>
    
            PR rust/23427
            * rust-parse.c (rust_parser::lex_identifier): Handle raw
            identifiers.
            (rust_lex_tests): Add raw identifier tests.
    
    gdb/testsuite/ChangeLog
    2021-06-11  Tom Tromey  <tom@tromey.com>
    
            PR rust/23427
            * lib/rust-support.exp (rust_compiler_version): New caching proc.
            * gdb.rust/rawids.exp: New file.
            * gdb.rust/rawids.rs: New file.
Comment 2 Tom Tromey 2021-06-11 14:25:41 UTC
Fixed.