aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse-impl.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-28 09:44:04 +0000
committerGitHub <noreply@github.com>2022-04-28 09:44:04 +0000
commit1ada076b9324982fd6f49aea6456e99613e394a8 (patch)
tree811ca2f61e351aeda8be3e5f2e94a93993c1881e /gcc/rust/parse/rust-parse-impl.h
parentaf48e2a3a1554f727e83281cc96071d9b8b3ef91 (diff)
parent471cff253a1c67cf4a85c0a91695e7e6d7803a5e (diff)
downloadgcc-1ada076b9324982fd6f49aea6456e99613e394a8.zip
gcc-1ada076b9324982fd6f49aea6456e99613e394a8.tar.gz
gcc-1ada076b9324982fd6f49aea6456e99613e394a8.tar.bz2
Merge #1189
1189: Add missing `SimplePath`s location r=CohenArthur a=CohenArthur Sorry to new contributors but I think I've taken all the good first issues we opened yesterday... Closes #1179 Closes #1180 Closes #1181 Closes #1182 Necessary for #1172 Addresses #1159 Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 6715a77..23ab32c 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -2136,6 +2136,7 @@ Parser<ManagedTokenSource>::parse_visibility ()
lexer.skip_token ();
const_TokenPtr t = lexer.peek_token ();
+ auto path_loc = t->get_locus ();
switch (t->get_id ())
{
@@ -2144,19 +2145,19 @@ Parser<ManagedTokenSource>::parse_visibility ()
skip_token (RIGHT_PAREN);
- return AST::Visibility::create_crate ();
+ return AST::Visibility::create_crate (path_loc);
case SELF:
lexer.skip_token ();
skip_token (RIGHT_PAREN);
- return AST::Visibility::create_self ();
+ return AST::Visibility::create_self (path_loc);
case SUPER:
lexer.skip_token ();
skip_token (RIGHT_PAREN);
- return AST::Visibility::create_super ();
+ return AST::Visibility::create_super (path_loc);
case IN: {
lexer.skip_token ();