100 exercises to learn Rust
This commit is contained in:
commit
5edebf6cf2
309 files changed
+13173
No files matched your search
@@ -0,0 +1,4 @@
|
||||
[package]
|
||||
name = "orphan"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
@@ -0,0 +1,11 @@
|
||||
// TODO: this is an example of an orphan rule violation.
|
||||
// We're implementing a foreign trait (`PartialEq`, from `std`) on
|
||||
// a foreign type (`u32`, from `std`).
|
||||
// Look at the compiler error to get familiar with what it looks like.
|
||||
// Then delete the code below and move on to the next exercise.
|
||||
|
||||
impl PartialEq for u32 {
|
||||
fn eq(&self, _other: &Self) -> bool {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user