Rust (programming language): Difference between revisions

No edit summary
 
Line 48: Line 48:


===Borrowing===
===Borrowing===
This is like references in C++.
This is like references or <code>unique_ptr</code> in C++.
<syntaxhighlight lang="rust">
<syntaxhighlight lang="rust">
let x = 5;
let x = 5;