aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-11-05 10:47:48 +0000
committerPhilip Herron <philip.herron@embecosm.com>2021-11-05 11:12:51 +0000
commitd308ce83b9bb543849f474fcee8cad1c73bea6c1 (patch)
tree05c127cf2d370b225f26576f4dc0f06109d47888
parent52ef760176a26107c29be30d08d3c9bcf636ae2b (diff)
downloadgcc-d308ce83b9bb543849f474fcee8cad1c73bea6c1.zip
gcc-d308ce83b9bb543849f474fcee8cad1c73bea6c1.tar.gz
gcc-d308ce83b9bb543849f474fcee8cad1c73bea6c1.tar.bz2
Add generic-arguments to predicate as_string
-rw-r--r--gcc/rust/typecheck/rust-tyty-bounds.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-tyty-bounds.cc b/gcc/rust/typecheck/rust-tyty-bounds.cc
index 88c94d2..c2c5e2e 100644
--- a/gcc/rust/typecheck/rust-tyty-bounds.cc
+++ b/gcc/rust/typecheck/rust-tyty-bounds.cc
@@ -70,7 +70,10 @@ namespace TyTy {
std::string
TypeBoundPredicate::as_string () const
{
- return get ()->as_string ();
+ return get ()->as_string ()
+ + (has_generic_args ()
+ ? std::string ("<") + args->as_string () + std::string (">")
+ : "");
}
const Resolver::TraitReference *