-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait system
Milestone
Description
The code below compiles and executes fine:
use cmp::Eq;
trait Hahaha: Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq,
Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq,
Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq,
Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq,
Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq,
Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq, Eq {}
enum Lol = int;
pub impl Lol: Hahaha {
pure fn eq(other: &Lol) -> bool { *self != **other }
pure fn ne(other: &Lol) -> bool { *self == **other }
}
fn main() {
if Lol(2) == Lol(4) {
io::println("2 == 4");
} else {
io::println("2 != 4");
}
}
Surely rustc should throw an error...?
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait system