mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
split test into 2
This commit is contained in:
parent
f16bfa478f
commit
572eecd267
3 changed files with 9 additions and 6 deletions
7
tests/ui/crashes/ice-10645.rs
Normal file
7
tests/ui/crashes/ice-10645.rs
Normal 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() {}
|
|
@ -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`
|
|
@ -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() {}
|
||||||
|
|
Loading…
Reference in a new issue