1
Fork 0

no overlap errors after failing the orphan check

This commit is contained in:
lcnr 2021-10-21 15:36:35 +02:00
parent 800a156c1e
commit 1296719c06
28 changed files with 506 additions and 507 deletions

View file

@ -2,9 +2,8 @@
pub struct Int(i32);
impl const std::ops::Add for i32 {
//~^ ERROR conflicting implementations of trait
//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
impl const std::ops::Add for i32 { //~ ERROR type annotations needed
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
type Output = Self;
fn add(self, rhs: Self) -> Self {
@ -12,7 +11,7 @@ impl const std::ops::Add for i32 {
}
}
impl std::ops::Add for Int {
impl std::ops::Add for Int { //~ ERROR type annotations needed
type Output = Self;
fn add(self, rhs: Self) -> Self {
@ -20,7 +19,7 @@ impl std::ops::Add for Int {
}
}
impl const std::ops::Add for Int {
impl const std::ops::Add for Int { //~ ERROR type annotations needed
//~^ ERROR conflicting implementations of trait
type Output = Self;