split test into 2

This commit is contained in:
Matthias Krüger 2023-04-23 15:11:31 +02:00
parent f16bfa478f
commit 572eecd267
3 changed files with 9 additions and 6 deletions

View file

@ -0,0 +1,7 @@
// compile-flags: --cap-lints=warn
// https://github.com/rust-lang/rust-clippy/issues/10645
#![warn(clippy::future_not_send)]
pub async fn bar<'a, T: 'a>(_: T) {}
fn main() {}

View file

@ -1,11 +1,11 @@
error: future cannot be sent between threads safely error: future cannot be sent between threads safely
--> $DIR/ice-5207.rs:6:35 --> $DIR/ice-10645.rs:5:35
| |
LL | pub async fn bar<'a, T: 'a>(_: T) {} LL | pub async fn bar<'a, T: 'a>(_: T) {}
| ^ future returned by `bar` is not `Send` | ^ future returned by `bar` is not `Send`
| |
note: captured value is not `Send` note: captured value is not `Send`
--> $DIR/ice-5207.rs:6:29 --> $DIR/ice-10645.rs:5:29
| |
LL | pub async fn bar<'a, T: 'a>(_: T) {} LL | pub async fn bar<'a, T: 'a>(_: T) {}
| ^ has type `T` which is not `Send` | ^ has type `T` which is not `Send`

View file

@ -1,8 +1,4 @@
// compile-flags: --cap-lints=warn
// ^ for https://github.com/rust-lang/rust-clippy/issues/10645
// Regression test for https://github.com/rust-lang/rust-clippy/issues/5207 // Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
#![warn(clippy::future_not_send)]
pub async fn bar<'a, T: 'a>(_: T) {} pub async fn bar<'a, T: 'a>(_: T) {}
fn main() {} fn main() {}