aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorDave <dme2223@gmail.com>2022-11-10 19:28:57 -0600
committerDave <dme2223@gmail.com>2022-11-10 19:28:57 -0600
commitec62fce8e89a67b2f67d8c42a34e8b12f4765c08 (patch)
tree7b6e1a5c85a4c8bd4df6310faedea8cdac254112 /gcc/rust/ast
parent1531256aa661c8007c9bc6a496f5224bed55fe3a (diff)
downloadgcc-ec62fce8e89a67b2f67d8c42a34e8b12f4765c08.zip
gcc-ec62fce8e89a67b2f67d8c42a34e8b12f4765c08.tar.gz
gcc-ec62fce8e89a67b2f67d8c42a34e8b12f4765c08.tar.bz2
clang-format
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-item.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index e9826bd..2ba3cf5 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -631,8 +631,10 @@ private:
public:
// Creates a Visibility - TODO make constructor protected or private?
- Visibility(VisType vis_type, SimplePath in_path, Location locus = Location())
- : vis_type(vis_type), in_path(std::move(in_path)), locus(locus) {}
+ Visibility (VisType vis_type, SimplePath in_path,
+ Location locus = Location ())
+ : vis_type (vis_type), in_path (std::move (in_path)), locus (locus)
+ {}
VisType get_vis_type () const { return vis_type; }
@@ -648,7 +650,7 @@ public:
// Returns whether visibility is public or not.
bool is_public () const { return vis_type != PRIV && !is_error (); }
- Location get_locus() const { return locus; }
+ Location get_locus () const { return locus; }
// Creates an error visibility.
static Visibility create_error ()
@@ -673,24 +675,25 @@ public:
// Creates a public visibility with crate-relative paths
static Visibility create_crate (Location crate_tok_location)
{
- return Visibility(PUB_CRATE,
- SimplePath::from_str("crate", crate_tok_location),
- crate_tok_location);
+ return Visibility (PUB_CRATE,
+ SimplePath::from_str ("crate", crate_tok_location),
+ crate_tok_location);
}
// Creates a public visibility with self-relative paths
static Visibility create_self (Location self_tok_location)
{
- return Visibility(PUB_SELF, SimplePath::from_str("self", self_tok_location),
- self_tok_location);
+ return Visibility (PUB_SELF,
+ SimplePath::from_str ("self", self_tok_location),
+ self_tok_location);
}
// Creates a public visibility with parent module-relative paths
static Visibility create_super (Location super_tok_location)
{
- return Visibility(PUB_SUPER,
- SimplePath::from_str("super", super_tok_location),
- super_tok_location);
+ return Visibility (PUB_SUPER,
+ SimplePath::from_str ("super", super_tok_location),
+ super_tok_location);
}
// Creates a private visibility
@@ -702,7 +705,7 @@ public:
// Creates a public visibility with a given path or whatever.
static Visibility create_in_path (SimplePath in_path)
{
- return Visibility(PUB_IN_PATH, std::move(in_path), in_path.get_locus());
+ return Visibility (PUB_IN_PATH, std::move (in_path), in_path.get_locus ());
}
std::string as_string () const;