forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clippy: add test for rust-lang/rust-clippy#10645 which will be fixed in
- Loading branch information
1 parent
de96f3d
commit b1d6e8f
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// Regression test for https://github.com/rust-lang/rust-clippy/issues/5207 | ||
// 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 | ||
#![warn(clippy::future_not_send)] | ||
pub async fn bar<'a, T: 'a>(_: T) {} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
warning: future cannot be sent between threads safely | ||
--> $DIR/ice-5207.rs:6:35 | ||
| | ||
LL | pub async fn bar<'a, T: 'a>(_: T) {} | ||
| ^ future returned by `bar` is not `Send` | ||
| | ||
note: captured value is not `Send` | ||
--> $DIR/ice-5207.rs:6:29 | ||
| | ||
LL | pub async fn bar<'a, T: 'a>(_: T) {} | ||
| ^ has type `T` which is not `Send` | ||
= note: `T` doesn't implement `std::marker::Send` | ||
= note: `-D clippy::future-not-send` implied by `-D warnings` | ||
|
||
warning: 1 warning emitted | ||
|