You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are the code examples I used in the March 9 talk at OSC. They are intended to show how the Rust compiler rejects memory-related bugs that are typically uncaught in other languages. Here is a breakdown of the examples:
4
+
5
+
*`lifetime.cpp` demonstrates a perfectly valid C++ program that uses an invalid pointer. `lifetime.rs` is the equivalent Rust code that is rejected by the compiler.
6
+
*`ownership.cpp` demonstrates a perfectly valid C++ program that makes use of deallocated memory. `ownership.rs` is the equivalent Rust code that is rejected by the compiler.
7
+
*`concurrency.cpp` demonstrates a perfectly valid C++ program that contains a data race. `concurrency.rs` is the equivalent Rust code that is rejected by the compiler. A valid version of the Rust code is commented out in `concurrency.rs`
0 commit comments