From 9657c328d0cdda49b7985c3ee727781a387e128b Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Thu, 10 Nov 2022 11:27:52 +0100 Subject: rust: Remove unused variables and fix dangling references --- gcc/rust/lex/rust-lex.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/rust/lex/rust-lex.cc') diff --git a/gcc/rust/lex/rust-lex.cc b/gcc/rust/lex/rust-lex.cc index 82949f5..692af5d 100644 --- a/gcc/rust/lex/rust-lex.cc +++ b/gcc/rust/lex/rust-lex.cc @@ -1323,7 +1323,7 @@ Lexer::parse_escape (char opening_char) /* Parses an escape (or string continue) in a string or character. Supports * unicode escapes. */ std::tuple -Lexer::parse_utf8_escape (char opening_char) +Lexer::parse_utf8_escape () { Codepoint output_char; int additional_length_offset = 0; @@ -1923,7 +1923,7 @@ Lexer::parse_string (Location loc) if (current_char32.value == '\\') { // parse escape - auto utf8_escape_pair = parse_utf8_escape ('\''); + auto utf8_escape_pair = parse_utf8_escape (); current_char32 = std::get<0> (utf8_escape_pair); if (current_char32 == Codepoint (0) && std::get<2> (utf8_escape_pair)) @@ -2324,7 +2324,7 @@ Lexer::parse_char_or_lifetime (Location loc) if (current_char32.value == '\\') { // parse escape - auto utf8_escape_pair = parse_utf8_escape ('\''); + auto utf8_escape_pair = parse_utf8_escape (); current_char32 = std::get<0> (utf8_escape_pair); length += std::get<1> (utf8_escape_pair); -- cgit v1.1