Change macos version in workflows #266
clippy
54 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 54 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.79.0 (129f3b996 2024-06-10)
- cargo 1.79.0 (ffa9cf99a 2024-06-03)
- clippy 0.1.79 (129f3b9 2024-06-10)
Annotations
Check warning on line 28 in cglue/src/tests/simple/trait_groups.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> cglue/src/tests/simple/trait_groups.rs:28:23
|
28 | let _ = into_test(&a);
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 33 in cglue/src/tests/simple/trait_defs.rs
github-actions / clippy
unsafe function's docs miss `# Safety` section
warning: unsafe function's docs miss `# Safety` section
--> cglue/src/tests/simple/trait_defs.rs:33:5
|
33 | unsafe fn tf_1(&self);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
Check warning on line 209 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:209:31
|
209 | let bwaker = unsafe { transmute::<_, [usize; 2]>(waker) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<std::task::RawWaker, [usize; 2]>`
...
227 | const ORDER: CRawWakerOrder = { __order!() };
| ---------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: this warning originates in the macro `__order` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 203 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:203:29
|
203 | let vtbl = unsafe { transmute(1 as *const ()) };
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const (), &std::task::RawWakerVTable>`
...
227 | const ORDER: CRawWakerOrder = { __order!() };
| ---------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: this warning originates in the macro `__order` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 203 in cglue/src/task/mod.rs
github-actions / clippy
transmute from a pointer type (`*const ()`) to a reference type (`&std::task::RawWakerVTable`)
warning: transmute from a pointer type (`*const ()`) to a reference type (`&std::task::RawWakerVTable`)
--> cglue/src/task/mod.rs:203:29
|
203 | let vtbl = unsafe { transmute(1 as *const ()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(1 as *const () as *const std::task::RawWakerVTable)`
...
227 | const ORDER: CRawWakerOrder = { __order!() };
| ---------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref
= note: `#[warn(clippy::transmute_ptr_to_ref)]` on by default
= note: this warning originates in the macro `__order` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 179 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:179:28
|
179 | let bvtbl_c = unsafe { transmute::<_, [u8; size_of::<RawWakerVTable>()]>(vtbl_c) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<task::CRawWakerVTable, [u8; 32]>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 178 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:178:26
|
178 | let bvtbl = unsafe { transmute::<_, [u8; size_of::<RawWakerVTable>()]>(vtbl) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<std::task::RawWakerVTable, [u8; 32]>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 168 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:168:13
|
168 | transmute(drop),
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const (), unsafe fn(*const ())>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 167 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:167:13
|
167 | transmute(wake_by_ref),
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const (), unsafe fn(*const ())>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 166 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:166:13
|
166 | transmute(wake),
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const (), unsafe fn(*const ())>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 165 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:165:13
|
165 | transmute(clone),
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const (), unsafe fn(*const ()) -> std::task::RawWaker>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 138 in cglue/src/task/sound.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/sound.rs:138:44
|
138 | unsafe { Self::from_raw(core::mem::transmute(waker)) }
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<std::task::Waker, std::task::RawWaker>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 128 in cglue/src/task/sound.rs
github-actions / clippy
casting raw pointers to the same type and constness is unnecessary (`*const ()` -> `*const ()`)
warning: casting raw pointers to the same type and constness is unnecessary (`*const ()` -> `*const ()`)
--> cglue/src/task/sound.rs:128:61
|
128 | raw: unsafe { (self.clone_adapter)(self.data(), self.vtable().clone as *const ()) },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.vtable().clone`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 117 in cglue/src/task/sound.rs
github-actions / clippy
casting raw pointers to the same type and constness is unnecessary (`*const ()` -> `*const ()`)
warning: casting raw pointers to the same type and constness is unnecessary (`*const ()` -> `*const ()`)
--> cglue/src/task/sound.rs:117:40
|
117 | unsafe { (other_adapter)(data, drop as *const ()) };
| ^^^^^^^^^^^^^^^^^ help: try: `drop`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 95 in cglue/src/task/sound.rs
github-actions / clippy
unsafe function's docs miss `# Safety` section
warning: unsafe function's docs miss `# Safety` section
--> cglue/src/task/sound.rs:95:5
|
95 | pub unsafe fn from_raw(raw: RawWaker) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `#[warn(clippy::missing_safety_doc)]` on by default
Check warning on line 153 in cglue/src/trait_group.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> cglue/src/trait_group.rs:153:9
|
153 | &self.vtbl
| ^^^^^^^^^^ help: change this to: `self.vtbl`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 244 in cglue/src/slice.rs
github-actions / clippy
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> cglue/src/slice.rs:244:35
|
244 | _lifetime: PhantomData::default(),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
Check warning on line 234 in cglue/src/slice.rs
github-actions / clippy
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> cglue/src/slice.rs:234:35
|
234 | _lifetime: PhantomData::default(),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
Check warning on line 76 in cglue/src/iter.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/iter.rs:76:39
|
76 | let func = unsafe { std::mem::transmute::<_, _>(func) };
| ^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<extern "C" fn(&mut I, &mut std::mem::MaybeUninit<T>) -> i32, for<'a, 'b> extern "C" fn(&'a mut trait_group::c_void, &'b mut std::mem::MaybeUninit<T>) -> i32>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
Check warning on line 49 in cglue/src/callback.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/callback.rs:49:33
|
49 | func: std::mem::transmute(self.func),
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<for<'a> extern "C" fn(&'a mut T, F) -> bool, for<'a> extern "C" fn(&'a mut trait_group::c_void, F) -> bool>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: `#[warn(clippy::missing_transmute_annotations)]` on by default
Check warning on line 4 in cglue/src/tests/extra/forward.rs
github-actions / clippy
trait `ForwardMe` is never used
warning: trait `ForwardMe` is never used
--> cglue/src/tests/extra/forward.rs:4:7
|
4 | trait ForwardMe {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 209 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:209:31
|
209 | let bwaker = unsafe { transmute::<_, [usize; 2]>(waker) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<std::task::RawWaker, [usize; 2]>`
...
227 | const ORDER: CRawWakerOrder = { __order!() };
| ---------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: this warning originates in the macro `__order` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 203 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:203:29
|
203 | let vtbl = unsafe { transmute(1 as *const ()) };
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const (), &std::task::RawWakerVTable>`
...
227 | const ORDER: CRawWakerOrder = { __order!() };
| ---------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: this warning originates in the macro `__order` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 203 in cglue/src/task/mod.rs
github-actions / clippy
transmute from a pointer type (`*const ()`) to a reference type (`&std::task::RawWakerVTable`)
warning: transmute from a pointer type (`*const ()`) to a reference type (`&std::task::RawWakerVTable`)
--> cglue/src/task/mod.rs:203:29
|
203 | let vtbl = unsafe { transmute(1 as *const ()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(1 as *const () as *const std::task::RawWakerVTable)`
...
227 | const ORDER: CRawWakerOrder = { __order!() };
| ---------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref
= note: `#[warn(clippy::transmute_ptr_to_ref)]` on by default
= note: this warning originates in the macro `__order` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 179 in cglue/src/task/mod.rs
github-actions / clippy
transmute used without annotations
warning: transmute used without annotations
--> cglue/src/task/mod.rs:179:28
|
179 | let bvtbl_c = unsafe { transmute::<_, [u8; size_of::<RawWakerVTable>()]>(vtbl_c) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<task::CRawWakerVTable, [u8; 32]>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations