Skip to content

Commit 3b0378b

Browse files
committed
Ignore clippy::unnecessary_safety_doc lint
``` warning: safe function's docs have unnecessary `# Safety` section --> futures-task/src/future_obj.rs:151:5 | 151 | fn into_raw(self) -> *mut (dyn Future<Output = T> + 'a); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_safety_doc = note: `#[warn(clippy::unnecessary_safety_doc)]` on by default warning: safe function's docs have unnecessary `# Safety` section --> futures-util/src/future/future/shared.rs:141:5 | 141 | pub fn strong_count(&self) -> Option<usize> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_safety_doc = note: `#[warn(clippy::unnecessary_safety_doc)]` on by default warning: safe function's docs have unnecessary `# Safety` section --> futures-util/src/future/future/shared.rs:154:5 | 154 | pub fn weak_count(&self) -> Option<usize> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_safety_doc ```
1 parent 86f0626 commit 3b0378b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

futures-task/src/future_obj.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ pub unsafe trait UnsafeFutureObj<'a, T>: 'a {
148148
/// provided `*mut (dyn Future<Output = T> + 'a)` into a `Pin<&mut (dyn
149149
/// Future<Output = T> + 'a)>` and call methods on it, non-reentrantly,
150150
/// until `UnsafeFutureObj::drop` is called with it.
151+
#[allow(clippy::unnecessary_safety_doc)]
151152
fn into_raw(self) -> *mut (dyn Future<Output = T> + 'a);
152153

153154
/// Drops the future represented by the given fat pointer.

futures-util/src/future/future/shared.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ where
138138
/// This method by itself is safe, but using it correctly requires extra care. Another thread
139139
/// can change the strong count at any time, including potentially between calling this method
140140
/// and acting on the result.
141+
#[allow(clippy::unnecessary_safety_doc)]
141142
pub fn strong_count(&self) -> Option<usize> {
142143
self.inner.as_ref().map(Arc::strong_count)
143144
}
@@ -151,6 +152,7 @@ where
151152
/// This method by itself is safe, but using it correctly requires extra care. Another thread
152153
/// can change the weak count at any time, including potentially between calling this method
153154
/// and acting on the result.
155+
#[allow(clippy::unnecessary_safety_doc)]
154156
pub fn weak_count(&self) -> Option<usize> {
155157
self.inner.as_ref().map(Arc::weak_count)
156158
}

0 commit comments

Comments
 (0)