[gcc r14-8035] gccrs: Fix type param bound parsing with opening scope

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:12:58 GMT 2024


https://gcc.gnu.org/g:12650695701ff4bbcc64f2bf0e661480a20d5483

commit r14-8035-g12650695701ff4bbcc64f2bf0e661480a20d5483
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Mon Oct 9 14:46:55 2023 +0200

    gccrs: Fix type param bound parsing with opening scope
    
    The function parsing type param bounds had a problem with scope
    resolution opening token.
    
    gcc/rust/ChangeLog:
    
            * parse/rust-parse-impl.h (Parser::parse_type_param_bound): Add missing
            case for lifetime switch.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/parse/rust-parse-impl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 7f4708543cb..07f95a61ec2 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -3886,6 +3886,7 @@ Parser<ManagedTokenSource>::parse_type_param_bound ()
     case SELF_ALIAS:
     case CRATE:
     case DOLLAR_SIGN:
+    case SCOPE_RESOLUTION:
       return parse_trait_bound ();
     default:
       // don't error - assume this is fine TODO


More information about the Gcc-cvs mailing list