public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] clang-format
@ 2022-11-16 11:49 Thomas Schwinge
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Schwinge @ 2022-11-16 11:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f726b12ca106307d739f1bb483a532a911985441
commit f726b12ca106307d739f1bb483a532a911985441
Author: Raiki Tamura <tamaron1203@gmail.com>
Date: Wed Nov 9 19:58:31 2022 +0900
clang-format
Diff:
---
gcc/rust/util/rust-lang-item.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index a9751218930..1aa5794df4e 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -227,7 +227,7 @@ public:
}
else if (item.compare ("phantom_data") == 0)
{
- return ItemType::PHANTOM_DATA;
+ return ItemType::PHANTOM_DATA;
}
else if (item.compare ("fn_once") == 0)
{
@@ -316,7 +316,7 @@ public:
case CONST_SLICE_PTR:
return "const_slice_ptr";
case PHANTOM_DATA:
- return "phantom_data";
+ return "phantom_data";
case FN_ONCE:
return "fn_once";
case FN_ONCE_OUTPUT:
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc/devel/rust/master] clang-format
@ 2022-11-18 23:33 Thomas Schwinge
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Schwinge @ 2022-11-18 23:33 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ec62fce8e89a67b2f67d8c42a34e8b12f4765c08
commit ec62fce8e89a67b2f67d8c42a34e8b12f4765c08
Author: Dave <dme2223@gmail.com>
Date: Thu Nov 10 19:28:57 2022 -0600
clang-format
Diff:
---
gcc/rust/ast/rust-item.h | 27 +++++++++++++++------------
gcc/rust/hir/rust-ast-lower.cc | 6 +++---
gcc/rust/hir/tree/rust-hir-item.h | 9 +++++----
3 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index e9826bd0e15..2ba3cf5ef47 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;
diff --git a/gcc/rust/hir/rust-ast-lower.cc b/gcc/rust/hir/rust-ast-lower.cc
index 9ac3674faa7..bffef4c361c 100644
--- a/gcc/rust/hir/rust-ast-lower.cc
+++ b/gcc/rust/hir/rust-ast-lower.cc
@@ -49,9 +49,9 @@ translate_visibility (const AST::Visibility &vis)
case AST::Visibility::PUB_CRATE:
case AST::Visibility::PUB_SUPER:
case AST::Visibility::PUB_IN_PATH:
- return Visibility(Visibility::VisType::RESTRICTED,
- ASTLoweringSimplePath::translate(vis.get_path()),
- vis.get_locus());
+ return Visibility (Visibility::VisType::RESTRICTED,
+ ASTLoweringSimplePath::translate (vis.get_path ()),
+ vis.get_locus ());
break;
}
diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h
index 0a8e688d391..4420a0de076 100644
--- a/gcc/rust/hir/tree/rust-hir-item.h
+++ b/gcc/rust/hir/tree/rust-hir-item.h
@@ -576,10 +576,11 @@ private:
// should this store location info?
public:
- Visibility(VisType vis_type,
- HIR::SimplePath path = HIR::SimplePath::create_empty(),
- Location locus = Location())
- : vis_type(vis_type), path(std::move(path)), locus(locus) {}
+ Visibility (VisType vis_type,
+ HIR::SimplePath path = HIR::SimplePath::create_empty (),
+ Location locus = Location ())
+ : vis_type (vis_type), path (std::move (path)), locus (locus)
+ {}
// Returns whether visibility is in an error state.
bool is_error () const { return vis_type == ERROR; }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-18 23:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 11:49 [gcc/devel/rust/master] clang-format Thomas Schwinge
2022-11-18 23:33 Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).