]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: lex: Fix lifetime string representation
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 17 Apr 2023 13:59:03 +0000 (15:59 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:09 +0000 (18:34 +0100)
Lifetime string representation used two single quotes instead of one.

gcc/rust/ChangeLog:

* lex/rust-token.cc (Token::as_string): Fix lifetime string
representation.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/lex/rust-token.cc

index e5397067b8ad16657fcbfd6f436a98e79a6a526b..8b7cdc0951e047ce073f9e52e76d340ecacf94ed 100644 (file)
@@ -148,7 +148,7 @@ Token::as_string () const
        case BYTE_CHAR_LITERAL:
          return "b'" + get_str () + "'";
        case LIFETIME:
-         return "''" + get_str ();
+         return "'" + get_str ();
        case INT_LITERAL:
          if (get_type_hint () == CORETYPE_UNKNOWN)
            return get_str ();