File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1- // Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
1+ // compile-flags: --cap-lints=warn
2+ // ^ for https://github.com/rust-lang/rust-clippy/issues/10645
23
4+ // Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
5+ #![ warn( clippy:: future_not_send) ]
36pub async fn bar < ' a , T : ' a > ( _: T ) { }
47
58fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: future cannot be sent between threads safely
2+ --> $DIR/ice-5207.rs:6:35
3+ |
4+ LL | pub async fn bar<'a, T: 'a>(_: T) {}
5+ | ^ future returned by `bar` is not `Send`
6+ |
7+ note: captured value is not `Send`
8+ --> $DIR/ice-5207.rs:6:29
9+ |
10+ LL | pub async fn bar<'a, T: 'a>(_: T) {}
11+ | ^ has type `T` which is not `Send`
12+ = note: `T` doesn't implement `std::marker::Send`
13+ = note: `-D clippy::future-not-send` implied by `-D warnings`
14+
15+ warning: 1 warning emitted
16+
You can’t perform that action at this time.
0 commit comments