diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-11-02 17:10:24 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-11-03 13:59:44 +0000 |
commit | 3dccdb1d6c57e983bed7135b4bc9ba7e1ae20fab (patch) | |
tree | 15f2996d46e49fb0982918629b98843f2f5af0a3 /gcc/rust/parse | |
parent | 5f0df4812c37fc428b5508e019e9fb7f8a7b77b1 (diff) | |
download | gcc-3dccdb1d6c57e983bed7135b4bc9ba7e1ae20fab.zip gcc-3dccdb1d6c57e983bed7135b4bc9ba7e1ae20fab.tar.gz gcc-3dccdb1d6c57e983bed7135b4bc9ba7e1ae20fab.tar.bz2 |
Desugar AST::TraitObjectTypeOneBound
We have two ways to represent TraitObjectType's:
- AST::TraitObjectType
- AST::TraitObjectTypeOneBound
This desugars this within HIR into a single HIR::TraitObjectType which
contains a list of bounds.
Addresses #786
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 52aba4f..316933e 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -9061,7 +9061,8 @@ Parser<ManagedTokenSource>::parse_type () = parse_type_param_bounds (); return std::unique_ptr<AST::TraitObjectType> ( - new AST::TraitObjectType (std::move (bounds), t->get_locus ())); + new AST::TraitObjectType (std::move (bounds), t->get_locus (), + false)); } case IDENTIFIER: case SUPER: @@ -9148,7 +9149,7 @@ Parser<ManagedTokenSource>::parse_type () } return std::unique_ptr<AST::TraitObjectType> ( - new AST::TraitObjectType (std::move (bounds), locus)); + new AST::TraitObjectType (std::move (bounds), locus, false)); } default: // assume that this is a type path and not an error @@ -9418,7 +9419,8 @@ Parser<ManagedTokenSource>::parse_paren_prefixed_type () } return std::unique_ptr<AST::TraitObjectType> ( - new AST::TraitObjectType (std::move (bounds), left_delim_locus)); + new AST::TraitObjectType (std::move (bounds), left_delim_locus, + false)); } else { @@ -9528,7 +9530,7 @@ Parser<ManagedTokenSource>::parse_for_prefixed_type () } return std::unique_ptr<AST::TraitObjectType> ( - new AST::TraitObjectType (std::move (bounds), for_locus)); + new AST::TraitObjectType (std::move (bounds), for_locus, false)); } default: // error |