aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-11-22 13:22:50 -0800
committerGraydon Hoare <[email protected]>2010-11-22 13:24:53 -0800
commit1090c5e69cc10f8d7e57c4790461046de068f7aa (patch)
treeb413a97270f62a7bf7849d22d7be56defbdbc797 /src/comp
parentResolve the easy case of type paths. (diff)
downloadrust-1090c5e69cc10f8d7e57c4790461046de068f7aa.tar.xz
rust-1090c5e69cc10f8d7e57c4790461046de068f7aa.zip
Check for structural equality rather than structural-and-cname equality.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/typeck.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 55a43acb..e6c7a9da 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -463,7 +463,7 @@ fn unify(&@crate_ctxt ccx, @ty expected, @ty actual) -> unify_result {
// Simple structural type comparison.
fn struct_cmp(@ty expected, @ty actual) -> unify_result {
- if (expected == actual) {
+ if (expected.struct == actual.struct) {
ret ures_ok(expected);
}