File tree 3 files changed +9
-6
lines changed 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 1
1
error: future cannot be sent between threads safely
2
- --> $DIR/ice-5207 .rs:6 :35
2
+ --> $DIR/ice-10645 .rs:5 :35
3
3
|
4
4
LL | pub async fn bar<'a, T: 'a>(_: T) {}
5
5
| ^ future returned by `bar` is not `Send`
6
6
|
7
7
note: captured value is not `Send`
8
- --> $DIR/ice-5207 .rs:6 :29
8
+ --> $DIR/ice-10645 .rs:5 :29
9
9
|
10
10
LL | pub async fn bar<'a, T: 'a>(_: T) {}
11
11
| ^ 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
-
4
1
// Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
5
- #![ warn( clippy:: future_not_send) ]
6
2
pub async fn bar < ' a , T : ' a > ( _: T ) { }
7
3
8
4
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments