Skip to content

Commit 765d687

Browse files
authored
Resolve double_must_use lint (#50)
* Resolve double_must_use lint * Use 1.99.0 in CI for tests
1 parent 2f96d31 commit 765d687

17 files changed

Lines changed: 3 additions & 33 deletions

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v3
22-
- uses: dtolnay/rust-toolchain@1.90.0
22+
- uses: dtolnay/rust-toolchain@1.99.0
2323
with:
2424
components: rust-src # required for consistent error messages
2525
- run: cargo install cargo-expand

‎src/expand.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ impl ToTokens for AsyncItem {
1414
}
1515

1616
pub fn expand(item: &mut AsyncItem, args: &RecursionArgs) {
17-
item.0.attrs.push(parse_quote!(#[must_use]));
1817
transform_sig(&mut item.0.sig, args);
1918
transform_block(&mut item.0.block);
2019
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
fn no_send_bound() -> ::core::pin::Pin<Box<dyn ::core::future::Future<Output = ()>>> {
43
Box::pin(async move {})
54
}

‎tests/expand/args_punctuated.expanded.rs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
fn not_send_sync_1() -> ::core::pin::Pin<
43
Box<dyn ::core::future::Future<Output = ()> + ::core::marker::Sync>,
54
> {
65
Box::pin(async move {})
76
}
8-
#[must_use]
97
fn not_send_sync_2() -> ::core::pin::Pin<
108
Box<dyn ::core::future::Future<Output = ()> + ::core::marker::Sync>,
119
> {
1210
Box::pin(async move {})
1311
}
14-
#[must_use]
1512
fn sync_not_send_1() -> ::core::pin::Pin<
1613
Box<dyn ::core::future::Future<Output = ()> + ::core::marker::Sync>,
1714
> {
1815
Box::pin(async move {})
1916
}
20-
#[must_use]
2117
fn sync_not_send_2() -> ::core::pin::Pin<
2218
Box<dyn ::core::future::Future<Output = ()> + ::core::marker::Sync>,
2319
> {

‎tests/expand/args_sync.expanded.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
fn sync() -> ::core::pin::Pin<
43
Box<
54
dyn ::core::future::Future<

‎tests/expand/core_module.expanded.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
pub fn n(
43
x: i32,
54
) -> ::core::pin::Pin<

‎tests/expand/fibonacci.expanded.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
fn fib(
43
n: u32,
54
) -> ::core::pin::Pin<

‎tests/expand/generic_parameter.expanded.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
pub fn generic_parameter<'async_recursion, S: Marker + Send>(
43
mut x: S,
54
) -> ::core::pin::Pin<

‎tests/expand/generic_parameter_no_send.expanded.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
pub fn generic_parameter_no_send<'async_recursion, T>(
43
x: T,
54
y: u64,

‎tests/expand/lifetimes_explicit_async_recursion_bound.expanded.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use async_recursion::async_recursion;
2-
#[must_use]
32
fn explicit_async_recursion_bound<'life0, 'life1, 'async_recursion>(
43
t: &'life0 T,
54
p: &'life1 [String],

0 commit comments

Comments
 (0)