public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8606] gccrs: ast: Fix lifetime type parsing
@ 2024-01-30 12:01 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 12:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c936a63cb7540d0248df645c56d6237553b06991

commit r14-8606-gc936a63cb7540d0248df645c56d6237553b06991
Author: Jakub Dupak <dev@jakubdupak.com>
Date:   Sun Dec 3 12:23:17 2023 +0100

    gccrs: ast: Fix lifetime type parsing
    
    There was a mismatch whether lifetime 'static is parsed as "static"
    or "'static".
    
    gcc/rust/ChangeLog:
    
            * parse/rust-parse-impl.h (Parser::lifetime_from_token): Fix matched pattern.
    
    Signed-off-by: Jakub Dupak <dev@jakubdupak.com>

Diff:
---
 gcc/rust/parse/rust-parse-impl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 378b9ada5ed1..90bc2e214e47 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -4158,11 +4158,11 @@ Parser<ManagedTokenSource>::lifetime_from_token (const_TokenPtr tok)
   location_t locus = tok->get_locus ();
   std::string lifetime_ident = tok->get_str ();
 
-  if (lifetime_ident == "'static")
+  if (lifetime_ident == "static")
     {
       return AST::Lifetime (AST::Lifetime::STATIC, "", locus);
     }
-  else if (lifetime_ident == "'_")
+  else if (lifetime_ident == "_")
     {
       return AST::Lifetime (AST::Lifetime::WILDCARD, "", locus);
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-30 12:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 12:01 [gcc r14-8606] gccrs: ast: Fix lifetime type parsing Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).