about summary refs log tree commit diff
path: root/src/comp/front
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-06-25 12:16:48 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-06-25 21:15:11 +0200
commitf6753be655770cc6fd02db9e5c63131a4536f95e (patch)
treeb081eb92d19a3f68d554c4d2f9d9e6ef1f4901f8 /src/comp/front
parent61fc12d0d0d1b8acb7472bfc6223882b32acd3d2 (diff)
Allow moving out of temporary values
This will probably need more work, as moving doesn't appear to do
quite the right thing yet in general, and we should also check
somewhere that we're not, for example, moving out the content out of
an immutable field (probably moving out of fields is not okay in
general).
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/ast.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index bfe7d576cfd..c601d799214 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -301,6 +301,13 @@ tag lit_ {
     lit_bool(bool);
 }
 
+fn is_path(&@expr e) -> bool {
+    ret alt (e.node) {
+        case (expr_path(_)) { true }
+        case (_) { false }
+    };
+}
+
 
 // NB: If you change this, you'll probably want to change the corresponding
 // type structure in middle/ty.rs as well.