3 #![warn(clippy::all, clippy::pedantic)]
5 clippy::missing_errors_doc,
6 clippy::needless_pass_by_value,
7 clippy::must_use_candidate,
9 clippy::needless_lifetimes,
10 clippy::missing_safety_doc,
11 clippy::wrong_self_convention
15 use std::rc::{self, Rc};
16 use std::sync::{self, Arc};
22 // corner cases: should not lint
24 // no error, not public interface
25 pub(crate) fn drop(&mut self) {}
27 // no error, private function
28 fn neg(self) -> Self {
32 // no error, private function
33 fn eq(&self, other: Self) -> bool {
37 // No error; self is a ref.
38 fn sub(&self, other: Self) -> &Self {
42 // No error; different number of arguments.
43 fn div(self) -> Self {
47 // No error; wrong return type.
48 fn rem(self, other: Self) {}
51 fn into_u32(self) -> u32 {
55 fn into_u16(&self) -> u16 {
59 fn to_something(self) -> u32 {
63 fn new(self) -> Self {
67 pub fn next<'b>(&'b mut self) -> Option<&'b mut T1> {
74 // Shouldn't trigger lint as it is unsafe.
75 pub unsafe fn add(self, rhs: Self) -> Self {
79 // Should not trigger lint since this is an async function.
80 pub async fn next(&mut self) -> Option<Self> {