diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-03-09 17:17:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 17:17:25 +0000 |
commit | 77a49507446b67a6c207b4e4fec3639f536b9eca (patch) | |
tree | 52943494a01142af6b28be1dc46ee6cc29929d81 /gcc/rust/parse | |
parent | 39c04258300be68a36b80f2f23929a97e8af1865 (diff) | |
parent | 749a419a2e92bab004b7be7addbfab0cae5357e0 (diff) | |
download | gcc-77a49507446b67a6c207b4e4fec3639f536b9eca.zip gcc-77a49507446b67a6c207b4e4fec3639f536b9eca.tar.gz gcc-77a49507446b67a6c207b4e4fec3639f536b9eca.tar.bz2 |
Merge #999
999: Refactor ABI options as part of HIR function qualifiers r=philberty a=philberty
This is a refactor to cleanup HIR::ExternBlock and HIR::FunctionQualifiers
to have an enum of ABI options to improve the error handling.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 8559c3b..db73828 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -2620,13 +2620,13 @@ AST::FunctionQualifiers Parser<ManagedTokenSource>::parse_function_qualifiers () { AsyncConstStatus const_status = NONE; - // bool has_const = false; bool has_unsafe = false; bool has_extern = false; std::string abi; // Check in order of const, unsafe, then extern const_TokenPtr t = lexer.peek_token (); + Location locus = t->get_locus (); switch (t->get_id ()) { case CONST: @@ -2662,7 +2662,7 @@ Parser<ManagedTokenSource>::parse_function_qualifiers () } } - return AST::FunctionQualifiers (const_status, has_unsafe, has_extern, + return AST::FunctionQualifiers (locus, const_status, has_unsafe, has_extern, std::move (abi)); } |