diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-11-04 09:43:18 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-11-04 09:43:18 +0800 |
commit | 18e28965af113e16fe2eedd8545f57e4771492d7 (patch) | |
tree | 228cfe05cddb4bd927196ad8e6c150d32c0dc786 /src/expand/derive.cpp | |
parent | 301cb9cba5f2e5ba236f1a1e8b4737b5862d1113 (diff) | |
download | mrust-18e28965af113e16fe2eedd8545f57e4771492d7.tar.gz |
Expand/derive - Deref in PartialOrd calls (slight optimisation of typecheck)
Diffstat (limited to 'src/expand/derive.cpp')
-rw-r--r-- | src/expand/derive.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expand/derive.cpp b/src/expand/derive.cpp index 564f3b0e..ac9842a7 100644 --- a/src/expand/derive.cpp +++ b/src/expand/derive.cpp @@ -772,8 +772,8 @@ public: pats_b.push_back( ::AST::Pattern(::AST::Pattern::TagBind(), name_b, ::AST::PatternBinding::Type::REF) ); nodes.push_back(this->make_compare_and_ret( sp, core_name, - NEWNODE(NamedValue, AST::Path(name_a)), - NEWNODE(NamedValue, AST::Path(name_b)) + NEWNODE(Deref, NEWNODE(NamedValue, AST::Path(name_a))), + NEWNODE(Deref, NEWNODE(NamedValue, AST::Path(name_b))) )); } @@ -795,8 +795,8 @@ public: pats_b.push_back( ::std::make_pair(fld.m_name, ::AST::Pattern(::AST::Pattern::TagBind(), name_b, ::AST::PatternBinding::Type::REF)) ); nodes.push_back(this->make_compare_and_ret( sp, core_name, - NEWNODE(NamedValue, AST::Path(name_a)), - NEWNODE(NamedValue, AST::Path(name_b)) + NEWNODE(Deref, NEWNODE(NamedValue, AST::Path(name_a))), + NEWNODE(Deref, NEWNODE(NamedValue, AST::Path(name_b))) )); } |