File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ // compile-flags: --cap-lints=warn
2+ // https://github.com/rust-lang/rust-clippy/issues/10645
3+
4+ #![ warn( clippy:: future_not_send) ]
5+ pub async fn bar < ' a , T : ' a > ( _: T ) { }
6+
7+ fn main ( ) { }
Original file line number Diff line number Diff line change 11error: future cannot be sent between threads safely
2- --> $DIR/ice-5207 .rs:6 :35
2+ --> $DIR/ice-10645 .rs:5 :35
33 |
44LL | pub async fn bar<'a, T: 'a>(_: T) {}
55 | ^ future returned by `bar` is not `Send`
66 |
77note: captured value is not `Send`
8- --> $DIR/ice-5207 .rs:6 :29
8+ --> $DIR/ice-10645 .rs:5 :29
99 |
1010LL | pub async fn bar<'a, T: 'a>(_: T) {}
1111 | ^ has type `T` which is not `Send`
Original file line number Diff line number Diff line change 1- // compile-flags: --cap-lints=warn
2- // ^ for https://github.com/rust-lang/rust-clippy/issues/10645
3-
41// Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
5- #![ warn( clippy:: future_not_send) ]
62pub async fn bar < ' a , T : ' a > ( _: T ) { }
73
84fn main ( ) { }
You can’t perform that action at this time.
0 commit comments