-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
71 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/recursive-bound-eval.rs:20:13 | ||
| | ||
LL | move || recursive_fn().parse() | ||
| ^^^^^^^^^^^^^^ cannot infer type | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
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
2 changes: 1 addition & 1 deletion
2
...impl-trait/issue-84660-unsoundness.stderr → ...it/issue-84660-unsoundness.current.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
23 changes: 23 additions & 0 deletions
23
tests/ui/type-alias-impl-trait/issue-84660-unsoundness.next.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `<Out as Trait<Bar, In>>::Out == ()` | ||
--> $DIR/issue-84660-unsoundness.rs:22:37 | ||
| | ||
LL | fn convert(_i: In) -> Self::Out { | ||
| _____________________________________^ | ||
LL | | | ||
LL | | unreachable!(); | ||
LL | | } | ||
| |_____^ cannot satisfy `<Out as Trait<Bar, In>>::Out == ()` | ||
|
||
error[E0119]: conflicting implementations of trait `Trait<Bar, _>` | ||
--> $DIR/issue-84660-unsoundness.rs:28:1 | ||
| | ||
LL | impl<In, Out> Trait<Bar, In> for Out { | ||
| ------------------------------------ first implementation here | ||
... | ||
LL | impl<In, Out> Trait<(), In> for Out { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0119, 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
2 changes: 1 addition & 1 deletion
2
...s-impl-trait/nested-tait-inference.stderr → ...rait/nested-tait-inference.current.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
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,18 +1,23 @@ | ||
#![feature(type_alias_impl_trait)] | ||
#![allow(dead_code)] | ||
|
||
//@ revisions: current next | ||
//@ ignore-compare-mode-next-solver (explicit revisions) | ||
//@[next] compile-flags: -Znext-solver | ||
//@[next] check-pass | ||
|
||
use std::fmt::Debug; | ||
|
||
type FooX = impl Debug; | ||
|
||
trait Foo<A> { } | ||
trait Foo<A> {} | ||
|
||
impl Foo<()> for () { } | ||
impl Foo<()> for () {} | ||
|
||
fn foo() -> impl Foo<FooX> { | ||
//~^ ERROR: the trait bound `(): Foo<FooX>` is not satisfied | ||
//[current]~^ ERROR: the trait bound `(): Foo<FooX>` is not satisfied | ||
// FIXME(type-alias-impl-trait): We could probably make this work. | ||
() | ||
} | ||
|
||
fn main() { } | ||
fn main() {} |
2 changes: 1 addition & 1 deletion
2
...-impl-trait/nested-tait-inference2.stderr → ...ait/nested-tait-inference2.current.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
9 changes: 9 additions & 0 deletions
9
tests/ui/type-alias-impl-trait/nested-tait-inference2.next.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `impl Foo<FooX> == ()` | ||
--> $DIR/nested-tait-inference2.rs:19:5 | ||
| | ||
LL | () | ||
| ^^ cannot satisfy `impl Foo<FooX> == ()` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0284`. |
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