forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#120558 - oli-obk:missing_impl_item_ice, r=e…
…stebank Stop bailing out from compilation just because there were incoherent traits fixes rust-lang#120343 but also has a lot of "type annotations needed" fallout. Some are fixed in the second commit.
- Loading branch information
Showing
48 changed files
with
497 additions
and
137 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
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
19 changes: 3 additions & 16 deletions
19
tests/ui/async-await/in-trait/coherence-constrained.stderr
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,25 +1,12 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::T == ()` | ||
--> $DIR/coherence-constrained.rs:14:5 | ||
| | ||
LL | async fn foo(&self) {} | ||
| ^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Bar as Foo>::T == ()` | ||
|
||
error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::T == ()` | ||
--> $DIR/coherence-constrained.rs:22:5 | ||
| | ||
LL | async fn foo(&self) {} | ||
| ^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Bar as Foo>::T == ()` | ||
|
||
error[E0119]: conflicting implementations of trait `Foo` for type `Bar` | ||
--> $DIR/coherence-constrained.rs:18:1 | ||
--> $DIR/coherence-constrained.rs:17:1 | ||
| | ||
LL | impl Foo for Bar { | ||
| ---------------- first implementation here | ||
... | ||
LL | impl Foo for Bar { | ||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `Bar` | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
Some errors have detailed explanations: E0119, E0284. | ||
For more information about an error, try `rustc --explain E0119`. | ||
For more information about this error, try `rustc --explain E0119`. |
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 @@ | ||
//! A regression test for #120343. The overlap error was previously | ||
//! silenced in coherence because projecting `<() as ToUnit>::Unit` | ||
//! failed. Then then silenced the missing items error in the `ToUnit` | ||
//! impl, causing us to not emit any errors and ICEing due to a | ||
//! `span_delay_bug`. | ||
trait ToUnit { | ||
type Unit; | ||
} | ||
|
||
impl<T> ToUnit for *const T {} | ||
//~^ ERROR: not all trait items implemented | ||
|
||
trait Overlap<T> {} | ||
|
||
impl<T> Overlap<T> for T {} | ||
|
||
impl<T> Overlap<<*const T as ToUnit>::Unit> for T {} | ||
|
||
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[E0046]: not all trait items implemented, missing: `Unit` | ||
--> $DIR/associated-type2.rs:11:1 | ||
| | ||
LL | type Unit; | ||
| --------- `Unit` from trait | ||
... | ||
LL | impl<T> ToUnit for *const T {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Unit` in implementation | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0046`. |
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
Oops, something went wrong.