Skip to content

Commit 1ace298

Browse files
committed
add testcase for #82933
1 parent a7890c7 commit 1ace298

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

src/test/ui/issues/issue-82933.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// edition:2018
2+
pub trait ParallelStream {
3+
async fn reduce(&self) {
4+
//~^ ERROR functions in traits cannot be declared `async`
5+
vec![].into_iter().for_each(|_: ()| {})
6+
}
7+
}
8+
9+
fn main() {}

src/test/ui/issues/issue-82933.stderr

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0706]: functions in traits cannot be declared `async`
2+
--> $DIR/issue-82933.rs:3:5
3+
|
4+
LL | async fn reduce(&self) {
5+
| ^----
6+
| |
7+
| _____`async` because of this
8+
| |
9+
LL | |
10+
LL | | vec![].into_iter().for_each(|_: ()| {})
11+
LL | | }
12+
| |_____^
13+
|
14+
= note: `async` trait functions are not currently supported
15+
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
16+
17+
error: aborting due to previous error
18+
19+
For more information about this error, try `rustc --explain E0706`.

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::path::Path;
88
const ENTRY_LIMIT: usize = 1000;
99
// FIXME: The following limits should be reduced eventually.
1010
const ROOT_ENTRY_LIMIT: usize = 1371;
11-
const ISSUES_ENTRY_LIMIT: usize = 2558;
11+
const ISSUES_ENTRY_LIMIT: usize = 2560;
1212

1313
fn check_entries(path: &Path, bad: &mut bool) {
1414
let dirs = walkdir::WalkDir::new(&path.join("test/ui"))

0 commit comments

Comments
 (0)