diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-05-12 21:31:28 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-05-12 21:31:28 +0800 |
commit | b42b112a3917536de023a8ff49ef045d79066363 (patch) | |
tree | 880fef35dac1073aa060d8e89670794ff19c82ca /Notes/BorrowChecker.md | |
parent | e49eca13f3a4757c4a51eb57879bf57ad7513c9e (diff) | |
download | mrust-b42b112a3917536de023a8ff49ef045d79066363.tar.gz |
Notes - Add some random notes
Diffstat (limited to 'Notes/BorrowChecker.md')
-rw-r--r-- | Notes/BorrowChecker.md | 7 |
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 |