-
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.
Stop bailing out from compilation just because there were incoherent …
…traits
- Loading branch information
Showing
135 changed files
with
2,213 additions
and
251 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
85 changes: 80 additions & 5 deletions
85
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,100 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::T == ()` | ||
--> $DIR/coherence-constrained.rs:14:5 | ||
--> $DIR/coherence-constrained.rs:18: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 | ||
--> $DIR/coherence-constrained.rs:29: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:23: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[E0283]: type annotations needed: cannot satisfy `Bar: Foo` | ||
--> $DIR/coherence-constrained.rs:13:14 | ||
| | ||
LL | impl Foo for Bar { | ||
| ^^^ | ||
| | ||
note: multiple `impl`s satisfying `Bar: Foo` found | ||
--> $DIR/coherence-constrained.rs:13:1 | ||
| | ||
LL | impl Foo for Bar { | ||
| ^^^^^^^^^^^^^^^^ | ||
... | ||
LL | impl Foo for Bar { | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error[E0284]: type annotations needed | ||
--> $DIR/coherence-constrained.rs:15:14 | ||
| | ||
LL | type T = (); | ||
| ^^ cannot infer type | ||
| | ||
= note: cannot satisfy `<Bar as Foo>::T == _` | ||
|
||
error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::{opaque#0}<'_> == impl Future<Output = ()>` | ||
--> $DIR/coherence-constrained.rs:18:5 | ||
| | ||
LL | async fn foo(&self) {} | ||
| ^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Bar as Foo>::{opaque#0}<'_> == impl Future<Output = ()>` | ||
|
||
error[E0284]: type annotations needed | ||
--> $DIR/coherence-constrained.rs:6:5 | ||
| | ||
LL | async fn foo(&self) -> Self::T; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type | ||
| | ||
= note: cannot satisfy `<Bar as Foo>::{opaque#0}<'_> == _` | ||
|
||
error[E0283]: type annotations needed: cannot satisfy `Bar: Foo` | ||
--> $DIR/coherence-constrained.rs:23:14 | ||
| | ||
LL | impl Foo for Bar { | ||
| ^^^ | ||
| | ||
note: multiple `impl`s satisfying `Bar: Foo` found | ||
--> $DIR/coherence-constrained.rs:13:1 | ||
| | ||
LL | impl Foo for Bar { | ||
| ^^^^^^^^^^^^^^^^ | ||
... | ||
LL | impl Foo for Bar { | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error[E0284]: type annotations needed | ||
--> $DIR/coherence-constrained.rs:26:14 | ||
| | ||
LL | type T = (); | ||
| ^^ cannot infer type | ||
| | ||
= note: cannot satisfy `<Bar as Foo>::T == _` | ||
|
||
error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::{opaque#0}<'_> == impl Future<Output = ()>` | ||
--> $DIR/coherence-constrained.rs:29:5 | ||
| | ||
LL | async fn foo(&self) {} | ||
| ^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Bar as Foo>::{opaque#0}<'_> == impl Future<Output = ()>` | ||
|
||
error[E0284]: type annotations needed | ||
--> $DIR/coherence-constrained.rs:6:5 | ||
| | ||
LL | async fn foo(&self) -> Self::T; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type | ||
| | ||
= note: cannot satisfy `<Bar as Foo>::{opaque#0}<'_> == _` | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error: aborting due to 11 previous errors | ||
|
||
Some errors have detailed explanations: E0119, E0284. | ||
Some errors have detailed explanations: E0119, E0283, E0284. | ||
For more information about an 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
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,12 +1,57 @@ | ||
error[E0119]: conflicting implementations of trait `From` for type `()` | ||
--> $DIR/issue-67651.rs:11:1 | ||
--> $DIR/issue-67651.rs:12:1 | ||
| | ||
LL | impl From for () { | ||
| ---------------- first implementation here | ||
... | ||
LL | impl From for () { | ||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `()` | ||
|
||
error: aborting due to 1 previous error | ||
error[E0283]: type annotations needed: cannot satisfy `(): From` | ||
--> $DIR/issue-67651.rs:7:15 | ||
| | ||
LL | impl From for () { | ||
| ^^ | ||
| | ||
note: multiple `impl`s satisfying `(): From` found | ||
--> $DIR/issue-67651.rs:7:1 | ||
| | ||
LL | impl From for () { | ||
| ^^^^^^^^^^^^^^^^ | ||
... | ||
LL | impl From for () { | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error[E0283]: type annotations needed: cannot satisfy `(): From` | ||
--> $DIR/issue-67651.rs:12:15 | ||
| | ||
LL | impl From for () { | ||
| ^^ | ||
| | ||
note: multiple `impl`s satisfying `(): From` found | ||
--> $DIR/issue-67651.rs:7:1 | ||
| | ||
LL | impl From for () { | ||
| ^^^^^^^^^^^^^^^^ | ||
... | ||
LL | impl From for () { | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type | ||
--> $DIR/issue-67651.rs:19:18 | ||
| | ||
LL | fn from(); | ||
| ---------- `From::from` defined here | ||
... | ||
LL | async move { From::from() } | ||
| ^^^^^^^^^^^^ cannot call associated function of trait | ||
| | ||
help: use a fully-qualified path to a specific available implementation | ||
| | ||
LL | async move { </* self type */ as From>::from() } | ||
| +++++++++++++++++++ + | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0119`. | ||
Some errors have detailed explanations: E0119, E0283, E0790. | ||
For more information about an 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
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.