-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #123674 - oli-obk:bogus_note, r=estebank
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes #123292 Also removes a bunch of extra diagnostics that were introduced in #121154 and #120558
- Loading branch information
Showing
11 changed files
with
55 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
impl Drop for u32 {} //~ ERROR E0117 | ||
//~| ERROR the `Drop` trait may only be implemented for local structs, enums, and unions | ||
//~| ERROR not all trait items implemented | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//@ edition: 2021 | ||
|
||
struct Ty; | ||
|
||
impl TryFrom<Ty> for u8 { | ||
type Error = Ty; | ||
fn try_from(_: Ty) -> Result<Self, Self::Error> { | ||
loop {} | ||
} | ||
} | ||
|
||
impl TryFrom<Ty> for u8 { | ||
//~^ ERROR conflicting implementations of trait | ||
type Error = Ty; | ||
fn try_from(_: Ty) -> Result<Self, Self::Error> { | ||
loop {} | ||
} | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0119]: conflicting implementations of trait `TryFrom<Ty>` for type `u8` | ||
--> $DIR/conflicting-impls.rs:12:1 | ||
| | ||
LL | impl TryFrom<Ty> for u8 { | ||
| ----------------------- first implementation here | ||
... | ||
LL | impl TryFrom<Ty> for u8 { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |