File tree 3 files changed +1
-29
lines changed
3 files changed +1
-29
lines changed Original file line number Diff line number Diff line change 28
28
namespace Rust {
29
29
namespace TyTy {
30
30
31
- // we need to fix this properly by implementing the match for assembling
32
- // candidates
33
- extern bool autoderef_cmp_flag;
34
-
35
31
class BaseCmp : public TyConstVisitor
36
32
{
37
33
public:
@@ -1271,9 +1267,6 @@ class ReferenceCmp : public BaseCmp
1271
1267
auto other_base_type = type.get_base ();
1272
1268
1273
1269
bool mutability_ok = base->is_mutable () ? type.is_mutable () : true ;
1274
- if (autoderef_cmp_flag)
1275
- mutability_ok = base->mutability () == type.mutability ();
1276
-
1277
1270
if (!mutability_ok)
1278
1271
{
1279
1272
BaseCmp::visit (type);
@@ -1320,9 +1313,6 @@ class PointerCmp : public BaseCmp
1320
1313
auto other_base_type = type.get_base ();
1321
1314
1322
1315
bool mutability_ok = base->is_mutable () ? type.is_mutable () : true ;
1323
- if (autoderef_cmp_flag)
1324
- mutability_ok = base->mutability () == type.mutability ();
1325
-
1326
1316
if (!mutability_ok)
1327
1317
{
1328
1318
BaseCmp::visit (type);
@@ -1401,7 +1391,7 @@ class ParamCmp : public BaseCmp
1401
1391
1402
1392
void visit (const ArrayType &) override { ok = true ; }
1403
1393
1404
- void visit (const SliceType &) override { ok = !autoderef_cmp_flag ; }
1394
+ void visit (const SliceType &) override { ok = true ; }
1405
1395
1406
1396
void visit (const BoolType &) override { ok = true ; }
1407
1397
Original file line number Diff line number Diff line change 38
38
namespace Rust {
39
39
namespace TyTy {
40
40
41
- bool autoderef_cmp_flag = false ;
42
-
43
- void
44
- set_cmp_autoderef_mode ()
45
- {
46
- autoderef_cmp_flag = true ;
47
- }
48
- void
49
- reset_cmp_autoderef_mode ()
50
- {
51
- autoderef_cmp_flag = false ;
52
- }
53
-
54
41
std::string
55
42
TypeKindFormat::to_string (TypeKind kind)
56
43
{
Original file line number Diff line number Diff line change @@ -77,11 +77,6 @@ class TypeKindFormat
77
77
static std::string to_string (TypeKind kind);
78
78
};
79
79
80
- extern void
81
- set_cmp_autoderef_mode ();
82
- extern void
83
- reset_cmp_autoderef_mode ();
84
-
85
80
class TyVisitor ;
86
81
class TyConstVisitor ;
87
82
class BaseType : public TypeBoundsMappings
You can’t perform that action at this time.
0 commit comments