aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-01-21 19:28:24 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-01-21 19:55:24 +0000
commit0f9257baae824948b48e8bcdbebbd7c58f296ea9 (patch)
tree9ae616026a74aab6ebeb8098348b24d95c39f445 /gcc
parenta6c5dbadc3c9023821244bd4af4e78ad9d8f63f2 (diff)
downloadgcc-0f9257baae824948b48e8bcdbebbd7c58f296ea9.zip
gcc-0f9257baae824948b48e8bcdbebbd7c58f296ea9.tar.gz
gcc-0f9257baae824948b48e8bcdbebbd7c58f296ea9.tar.bz2
Covariant types should respect the get_name to pretty print the ir symbols
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-tyty.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h
index bdf85a9..f2c250f 100644
--- a/gcc/rust/typecheck/rust-tyty.h
+++ b/gcc/rust/typecheck/rust-tyty.h
@@ -1930,7 +1930,10 @@ public:
std::string as_string () const override;
- std::string get_name () const override final { return as_string (); }
+ std::string get_name () const override final
+ {
+ return "&" + get_base ()->get_name ();
+ }
BaseType *unify (BaseType *other) override;
bool can_eq (const BaseType *other, bool emit_errors,
@@ -1978,7 +1981,10 @@ public:
std::string as_string () const override;
- std::string get_name () const override final { return as_string (); }
+ std::string get_name () const override final
+ {
+ return "*" + get_base ()->get_name ();
+ }
BaseType *unify (BaseType *other) override;
bool can_eq (const BaseType *other, bool emit_errors,