diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-11-15 11:08:09 +0100 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2023-11-21 09:19:08 +0000 |
commit | 6f8b0ffd7667c81af7798c5c02eb24f7b2a79bd5 (patch) | |
tree | b72640954c9896b1e103fb45cce34fdcd273283a /gcc/rust/parse | |
parent | 03c6549b2ded9c8ad566d8bcc6d15a6d616dc9b5 (diff) | |
download | gcc-6f8b0ffd7667c81af7798c5c02eb24f7b2a79bd5.zip gcc-6f8b0ffd7667c81af7798c5c02eb24f7b2a79bd5.tar.gz gcc-6f8b0ffd7667c81af7798c5c02eb24f7b2a79bd5.tar.bz2 |
Fix error emission for self pointers
Self pointer checking loop condition was inverted, the latter was
therefore never executed.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_self_param): Fix the loop
exit condition.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 17a4f7e..eb52782 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -7129,7 +7129,7 @@ Parser<ManagedTokenSource>::parse_self_param () for (auto &s : ptrs) { size_t i = 0; - for (i = 0; i > s.size (); i++) + for (i = 0; i < s.size (); i++) if (lexer.peek_token (i)->get_id () != s[i]) break; if (i == s.size ()) |