forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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 rust-lang#126453 - cuviper:beta-next, r=cuviper
[beta] backports and stage0 bump - Bump stage0 to 1.79.0 - Do not define opaque types when selecting impls rust-lang#126258 - Remove failing GUI test to stop blocking CI until it is fixed rust-lang#126445 r? cuviper
- Loading branch information
Showing
24 changed files
with
472 additions
and
569 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//! Test that we can evaluate nested obligations when invoking methods on recursive calls on | ||
//! an RPIT. | ||
|
||
//@revisions: next current | ||
//@[next] compile-flags: -Znext-solver | ||
|
||
//@[current] check-pass | ||
|
||
pub trait Parser<E> { | ||
fn parse(&self) -> E; | ||
} | ||
|
||
impl<E, T: Fn() -> E> Parser<E> for T { | ||
fn parse(&self) -> E { | ||
self() | ||
} | ||
} | ||
|
||
pub fn recursive_fn<E>() -> impl Parser<E> { | ||
move || recursive_fn().parse() | ||
//[next]~^ ERROR: type annotations needed | ||
} | ||
|
||
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
12 changes: 9 additions & 3 deletions
12
tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.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,9 +1,15 @@ | ||
error[E0275]: overflow evaluating the requirement `Bar: PartialEq<(Foo, i32)>` | ||
error[E0277]: can't compare `Bar` with `(Foo, i32)` | ||
--> $DIR/recursive-type-alias-impl-trait-declaration.rs:13:13 | ||
| | ||
LL | fn foo() -> Foo { | ||
| ^^^ | ||
| ^^^ no implementation for `Bar == (Foo, i32)` | ||
LL | | ||
LL | Bar | ||
| --- return type was inferred to be `Bar` here | ||
| | ||
= help: the trait `PartialEq<(Foo, i32)>` is not implemented for `Bar` | ||
= help: the trait `PartialEq<(Bar, i32)>` is implemented for `Bar` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0275`. | ||
For more information about this error, try `rustc --explain E0277`. |
11 changes: 11 additions & 0 deletions
11
tests/ui/type-alias-impl-trait/constrain_in_projection.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0277]: the trait bound `Foo: Trait<Bar>` is not satisfied | ||
--> $DIR/constrain_in_projection.rs:24:14 | ||
| | ||
LL | let x = <Foo as Trait<Bar>>::Assoc::default(); | ||
| ^^^ the trait `Trait<Bar>` is not implemented for `Foo` | ||
| | ||
= help: the trait `Trait<()>` is implemented for `Foo` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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
18 changes: 6 additions & 12 deletions
18
tests/ui/type-alias-impl-trait/constrain_in_projection2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
error[E0283]: type annotations needed: cannot satisfy `Foo: Trait<Bar>` | ||
error[E0277]: the trait bound `Foo: Trait<Bar>` is not satisfied | ||
--> $DIR/constrain_in_projection2.rs:27:14 | ||
| | ||
LL | let x = <Foo as Trait<Bar>>::Assoc::default(); | ||
| ^^^ help: use the fully qualified path to an implementation: `<Type as Trait>::Assoc` | ||
| ^^^ the trait `Trait<Bar>` is not implemented for `Foo` | ||
| | ||
note: multiple `impl`s satisfying `Foo: Trait<Bar>` found | ||
--> $DIR/constrain_in_projection2.rs:18:1 | ||
| | ||
LL | impl Trait<()> for Foo { | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
... | ||
LL | impl Trait<u32> for Foo { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: associated types cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl` | ||
= help: the following other types implement trait `Trait<T>`: | ||
<Foo as Trait<()>> | ||
<Foo as Trait<u32>> | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0283`. | ||
For more information about this error, try `rustc --explain E0277`. |
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
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
19 changes: 9 additions & 10 deletions
19
tests/ui/type-alias-impl-trait/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
error[E0283]: type annotations needed: cannot satisfy `(): Foo<FooX>` | ||
error[E0277]: the trait bound `(): Foo<FooX>` is not satisfied | ||
--> $DIR/nested-tait-inference2.rs:17:13 | ||
| | ||
LL | fn foo() -> impl Foo<FooX> { | ||
| ^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^ the trait `Foo<FooX>` is not implemented for `()` | ||
LL | | ||
LL | () | ||
| -- return type was inferred to be `()` here | ||
| | ||
note: multiple `impl`s satisfying `(): Foo<FooX>` found | ||
--> $DIR/nested-tait-inference2.rs:14:1 | ||
| | ||
LL | impl Foo<()> for () {} | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
LL | impl Foo<u32> for () {} | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
= help: the following other types implement trait `Foo<A>`: | ||
<() as Foo<()>> | ||
<() as Foo<u32>> | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0283`. | ||
For more information about this error, try `rustc --explain E0277`. |
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.