diff options
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 |