aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-03-09 17:17:25 +0000
committerGitHub <noreply@github.com>2022-03-09 17:17:25 +0000
commit77a49507446b67a6c207b4e4fec3639f536b9eca (patch)
tree52943494a01142af6b28be1dc46ee6cc29929d81 /gcc/rust/parse
parent39c04258300be68a36b80f2f23929a97e8af1865 (diff)
parent749a419a2e92bab004b7be7addbfab0cae5357e0 (diff)
downloadgcc-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.h4
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));
}