This repository has been archived on 2025-11-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rustex/exercises/04_traits/02_orphan_rule/src/lib.rs

12 lines
409 B
XML

// 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!()
// }
// }