-
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
1 parent
b0d4553
commit 748476d
Showing
5 changed files
with
75 additions
and
2 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
27 changes: 27 additions & 0 deletions
27
.../async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.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,27 @@ | ||
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/normalizing-self-auto-trait-issue-109924.rs:8:12 | ||
| | ||
LL | #![feature(return_type_notation)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0277]: `impl Future<Output = ()> { <_ as Foo>::bar() }` cannot be sent between threads safely | ||
--> $DIR/normalizing-self-auto-trait-issue-109924.rs:23:11 | ||
| | ||
LL | build(Bar); | ||
| ----- ^^^ `impl Future<Output = ()> { <_ as Foo>::bar() }` cannot be sent between threads safely | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= help: the trait `for<'a> Send` is not implemented for `impl Future<Output = ()> { <_ as Foo>::bar() }` | ||
note: required by a bound in `build` | ||
--> $DIR/normalizing-self-auto-trait-issue-109924.rs:20:39 | ||
| | ||
LL | fn build<T>(_: T) where T: Foo<bar(): Send> {} | ||
| ^^^^ required by this bound in `build` | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
11 changes: 11 additions & 0 deletions
11
.../ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.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,11 @@ | ||
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/normalizing-self-auto-trait-issue-109924.rs:8:12 | ||
| | ||
LL | #![feature(return_type_notation)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
24 changes: 24 additions & 0 deletions
24
tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.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,24 @@ | ||
// revisions: current next | ||
//[current] known-bug: #109924 | ||
//[next] check-pass | ||
//[next] compile-flags: -Ztrait-solver=next | ||
// edition:2021 | ||
|
||
#![feature(async_fn_in_trait)] | ||
#![feature(return_type_notation)] | ||
//[next]~^ WARN the feature `return_type_notation` is incomplete | ||
|
||
trait Foo { | ||
async fn bar(&self); | ||
} | ||
|
||
struct Bar; | ||
impl Foo for Bar { | ||
async fn bar(&self) {} | ||
} | ||
|
||
fn build<T>(_: T) where T: Foo<bar(): Send> {} | ||
|
||
fn main() { | ||
build(Bar); | ||
} |