summaryrefslogtreecommitdiff
path: root/Notes/BorrowChecker.md
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-05-12 21:31:28 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-05-12 21:31:28 +0800
commitb42b112a3917536de023a8ff49ef045d79066363 (patch)
tree880fef35dac1073aa060d8e89670794ff19c82ca /Notes/BorrowChecker.md
parente49eca13f3a4757c4a51eb57879bf57ad7513c9e (diff)
downloadmrust-b42b112a3917536de023a8ff49ef045d79066363.tar.gz
Notes - Add some random notes
Diffstat (limited to 'Notes/BorrowChecker.md')
-rw-r--r--Notes/BorrowChecker.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/Notes/BorrowChecker.md b/Notes/BorrowChecker.md
new file mode 100644
index 00000000..78b46ff5
--- /dev/null
+++ b/Notes/BorrowChecker.md
@@ -0,0 +1,7 @@
+- On borrow, calculate lifetime of asignment (using existing lifetime code)
+ - Ignore reborrows?
+- Visit all statements in that lifetime and locate places where the borrow is propagated/stored
+ - Requires lifetime parameters on functions/&-ptrs to be present
+- Assignment of the source value during the lifetime of the borrow is an error
+- Dropping of the source value is an error
+- Returning the borrow is an error