-
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.
Do not assert >1 RPITITs on collect_return_position_impl_trait_in_tra…
…it_tys
- Loading branch information
1 parent
c4c84df
commit 07a230b
Showing
4 changed files
with
45 additions
and
5 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
9 changes: 9 additions & 0 deletions
9
tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.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,9 @@ | ||
error[E0412]: cannot find type `Missing` in this scope | ||
--> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25 | ||
| | ||
LL | fn bar() -> Wrapper<Missing<impl Sized>>; | ||
| ^^^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
9 changes: 9 additions & 0 deletions
9
tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.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[E0412]: cannot find type `Missing` in this scope | ||
--> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25 | ||
| | ||
LL | fn bar() -> Wrapper<Missing<impl Sized>>; | ||
| ^^^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
20 changes: 20 additions & 0 deletions
20
tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs
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 | ||
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty | ||
// revisions: current next | ||
|
||
#![feature(return_position_impl_trait_in_trait)] | ||
|
||
struct Wrapper<T>(T); | ||
|
||
trait Foo { | ||
fn bar() -> Wrapper<Missing<impl Sized>>; | ||
//~^ ERROR: cannot find type `Missing` in this scope [E0412] | ||
} | ||
|
||
impl Foo for () { | ||
fn bar() -> Wrapper<i32> { | ||
Wrapper(0) | ||
} | ||
} | ||
|
||
fn main() {} |