David Tolnay
084b47d7fa
Release 1.0.121
2024-04-08 12:46:46 -07:00
David Tolnay
2d4b4f8f62
Release 1.0.120
2024-03-22 20:25:46 -07:00
David Tolnay
b63fec7694
Release 1.0.119
2024-03-06 00:15:46 -08:00
David Tolnay
1fd8a5fcaa
Release 1.0.118
2024-02-28 10:47:53 -08:00
David Tolnay
7eef56220b
Release 1.0.117
2024-02-19 15:16:56 -08:00
David Tolnay
30fd3a1370
Resolve redundant import warning
...
warning: the item `Trait` is imported redundantly
--> macro/src/derive.rs:1:43
|
1 | use crate::syntax::{derive, Enum, Struct, Trait};
| ^^^^^
...
5 | pub(crate) use crate::syntax::derive::*;
| ------------------------ the item `Trait` is already imported here
|
= note: `#[warn(unused_imports)]` on by default
2024-02-18 21:23:53 -08:00
David Tolnay
d5aed942cf
Release 1.0.116
2024-02-09 19:20:01 -08:00
David Tolnay
375d159c2b
Ignore ref_as_ptr clippy pedantic lint in generated code
...
warning: reference as raw pointer
--> tests/ffi/module.rs:34:31
|
34 | fn c_take_trivial_ref(d: &D);
| ^^^^^ help: try: `std::ptr::from_ref::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
warning: reference as raw pointer
--> tests/ffi/module.rs:35:35
|
35 | fn c_take_trivial_mut_ref(d: &mut D);
| ^^^^^^^^^ help: try: `std::ptr::from_mut::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:36:35
|
36 | fn c_take_trivial_pin_ref(d: Pin<&D>);
| ^^^^^^^^^ help: try: `std::ptr::from_ref::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:37:39
|
37 | fn c_take_trivial_pin_mut_ref(d: Pin<&mut D>);
| ^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:42:34
|
42 | fn c_take_trivial_ns_ref(g: &G);
| ^^^^^ help: try: `std::ptr::from_ref::<G>(g)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:45:30
|
45 | fn c_take_opaque_ref(e: &E);
| ^^^^^ help: try: `std::ptr::from_ref::<E>(e)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:49:33
|
49 | fn c_take_opaque_ns_ref(e: &F);
| ^^^^^ help: try: `std::ptr::from_ref::<F>(e)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:55:36
|
55 | fn c_return_opaque_mut_pin(e: Pin<&mut E>) -> Pin<&mut E>;
| ^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<E>(e)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:138:25
|
138 | fn c_take_ref_r(r: &R);
| ^^^^^ help: try: `std::ptr::from_ref::<R>(r)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:167:37
|
167 | fn c_take_ref_shared_string(s: &SharedString) -> &SharedString;
| ^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref::<SharedString>(s)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:342:34
|
342 | impl CxxVector<SharedString> {}
| ^^ help: try: `std::ptr::from_mut::<{}>({})`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:116:77
|
116 | fn c_return_unique_ptr_vector_shared() -> UniquePtr<CxxVector<Shared>>;
| ^ help: try: `std::ptr::from_mut::<>>(>)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
2024-02-09 19:13:00 -08:00
David Tolnay
a9ea68c5cd
Turn on wrong_self_convention clippy lint after false positive fix
2024-01-11 20:40:31 -08:00
David Tolnay
cc6fc0d3ae
Format clippy bug comments on the same line as the lint
2024-01-11 20:36:35 -08:00
David Tolnay
5ceca34a28
Release 1.0.115
2024-01-05 19:09:11 -08:00
David Tolnay
e6184c2a62
Release 1.0.114
2024-01-02 17:45:07 -08:00
David Tolnay
2dc00a4e2d
Release 1.0.113
2024-01-01 22:37:48 -08:00
David Tolnay
b7a9d8ee6b
Pull in proc-macro2 sccache fix
2024-01-01 22:35:57 -08:00
David Tolnay
5ae629804a
Release 1.0.112
2023-12-31 16:32:33 -08:00
David Tolnay
a1c0f2d5d0
Remove option_if_let_else clippy suppression
2023-12-30 14:45:28 -08:00
David Tolnay
a666000c85
Release 1.0.111
2023-12-16 18:50:22 -08:00
David Tolnay
6874ecd09c
Suppress no_effect_underscore_binding pedantic clippy lint in generated code
...
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/module.rs:15:19
|
15 | impl Vec<Job> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
= note: `-W clippy::no-effect-underscore-binding` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::no_effect_underscore_binding)]`
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/module.rs:15:19
|
15 | impl Vec<Job> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:168:58
|
168 | fn c_take_callback(callback: fn(String) -> usize);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:169:54
|
169 | fn c_take_callback_ref(callback: fn(&String));
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:171:70
|
171 | fn c_take_callback_ref_lifetime<'a>(callback: fn(&'a String));
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:172:58
|
172 | fn c_take_callback_mut(callback: fn(&mut String));
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:28:28
|
28 | #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:28:43
|
28 | #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:33:14
|
33 | #[derive(PartialEq, PartialOrd)]
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:33:25
|
33 | #[derive(PartialEq, PartialOrd)]
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:79:14
|
79 | #[derive(Hash)]
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:90:47
|
90 | #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:90:58
|
90 | #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:90:69
|
90 | #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:264:41
|
264 | fn r_return_primitive() -> usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:265:39
|
265 | fn r_return_shared() -> Shared;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:266:36
|
266 | fn r_return_box() -> Box<R>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:267:49
|
267 | fn r_return_unique_ptr() -> UniquePtr<C>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:268:49
|
268 | fn r_return_shared_ptr() -> SharedPtr<C>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:269:51
|
269 | fn r_return_ref(shared: &Shared) -> &usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:270:59
|
270 | fn r_return_mut(shared: &mut Shared) -> &mut usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:271:49
|
271 | fn r_return_str(shared: &Shared) -> &str;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:272:54
|
272 | fn r_return_sliceu8(shared: &Shared) -> &[u8];
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:273:62
|
273 | fn r_return_mutsliceu8(slice: &mut [u8]) -> &mut [u8];
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:274:44
|
274 | fn r_return_rust_string() -> String;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:275:64
|
275 | fn r_return_unique_ptr_string() -> UniquePtr<CxxString>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:276:42
|
276 | fn r_return_rust_vec() -> Vec<u8>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:277:53
|
277 | fn r_return_rust_vec_string() -> Vec<String>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:278:57
|
278 | fn r_return_rust_vec_extern_struct() -> Vec<Job>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:279:62
|
279 | fn r_return_ref_rust_vec(shared: &Shared) -> &Vec<u8>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:280:70
|
280 | fn r_return_mut_rust_vec(shared: &mut Shared) -> &mut Vec<u8>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:281:48
|
281 | fn r_return_identity(_: usize) -> usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:282:53
|
282 | fn r_return_sum(_: usize, _: usize) -> usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:283:41
|
283 | fn r_return_enum(n: u32) -> Enum;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:285:38
|
285 | fn r_take_primitive(n: usize);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:286:41
|
286 | fn r_take_shared(shared: Shared);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:287:33
|
287 | fn r_take_box(r: Box<R>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:288:46
|
288 | fn r_take_unique_ptr(c: UniquePtr<C>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:289:46
|
289 | fn r_take_shared_ptr(c: SharedPtr<C>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:290:31
|
290 | fn r_take_ref_r(r: &R);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:291:31
|
291 | fn r_take_ref_c(c: &C);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:292:31
|
292 | fn r_take_str(s: &str);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:293:43
|
293 | fn r_take_slice_char(s: &[c_char]);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:294:41
|
294 | fn r_take_rust_string(s: String);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:295:61
|
295 | fn r_take_unique_ptr_string(s: UniquePtr<CxxString>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:296:48
|
296 | fn r_take_ref_vector(v: &CxxVector<u8>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:297:55
|
297 | fn r_take_ref_empty_vector(v: &CxxVector<u64>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:298:39
|
298 | fn r_take_rust_vec(v: Vec<u8>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:299:50
|
299 | fn r_take_rust_vec_string(v: Vec<String>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:300:44
|
300 | fn r_take_ref_rust_vec(v: &Vec<u8>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:301:55
|
301 | fn r_take_ref_rust_vec_string(v: &Vec<String>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:302:32
|
302 | fn r_take_enum(e: Enum);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:304:45
|
304 | fn r_try_return_void() -> Result<()>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:305:53
|
305 | fn r_try_return_primitive() -> Result<usize>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:306:48
|
306 | fn r_try_return_box() -> Result<Box<R>>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:307:54
|
307 | fn r_fail_return_primitive() -> Result<usize>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:308:59
|
308 | fn r_try_return_sliceu8(s: &[u8]) -> Result<&[u8]>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:309:70
|
309 | fn r_try_return_mutsliceu8(s: &mut [u8]) -> Result<&mut [u8]>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:311:34
|
311 | fn get(self: &R) -> usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:312:48
|
312 | fn set(self: &mut R, n: usize) -> usize;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:313:55
|
313 | fn r_method_on_shared(self: &Shared) -> String;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:314:48
|
314 | fn r_get_array_sum(self: &Array) -> i32;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:317:48
|
317 | fn r_aliased_function(x: i32) -> String;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:341:22
|
341 | impl Box<Shared> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:75:27
|
75 | second: Box<Second>,
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:102:35
|
102 | fn c_return_box() -> Box<R>;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:154:48
|
154 | fn c_take_rust_vec_shared(v: Vec<Shared>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:178:52
|
178 | fn c_take_rust_vec_ns_shared(v: Vec<AShared>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:179:60
|
179 | fn c_take_rust_vec_nested_ns_shared(v: Vec<ABShared>);
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
warning: binding to `_` prefixed variable with no side-effect
--> tests/ffi/lib.rs:326:22
|
326 | vec: Vec<Dag3>,
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
2023-12-16 18:37:25 -08:00
David Tolnay
306019c5a7
Release 1.0.110
2023-10-27 20:04:28 -07:00
David Tolnay
4a9c24b3d7
Ignore spurious unused_unsafe produced by old compilers
...
warning: unnecessary `unsafe` block
--> demo/src/main.rs:22:63
|
22 | fn new_blobstore_client() -> UniquePtr<BlobstoreClient>;
| ^
| |
| unnecessary `unsafe` block
| because it's nested under this `unsafe` fn
|
= note: `#[warn(unused_unsafe)]` on by default
= note: this `unsafe` block does contain unsafe operations, but those are already allowed in an `unsafe fn`
= note: `#[allow(unsafe_op_in_unsafe_fn)]` on by default
2023-10-27 19:55:00 -07:00
David Tolnay
b5b2fcde7d
Make compatible with deny(unsafe_op_in_unsafe_fn)
2023-10-27 19:44:34 -07:00
David Tolnay
42621edf42
Resolve get_first clippy lint
...
warning: accessing first element with `variants_from_header.get(0)`
--> macro/src/load.rs:39:22
|
39 | let span = match variants_from_header.get(0) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `variants_from_header.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `-W clippy::get-first` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
2023-10-21 22:17:13 -07:00
David Tolnay
75ba3fb7fd
Resolve ignored_unit_patterns pedantic clippy lint
...
warning: matching over `()` is more explicit
--> macro/src/load.rs:63:36
|
63 | decode_result.map(|_| gunzipped.as_slice())
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
= note: `-W clippy::ignored-unit-patterns` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ignored_unit_patterns)]`
2023-10-21 22:16:12 -07:00
David Tolnay
506737e91a
Ignore struct_field_names pedantic clippy lint
...
warning: field name starts with the struct's name
--> syntax/mod.rs:112:5
|
112 | pub struct_token: Token![struct],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
= note: `-W clippy::struct-field-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_field_names)]`
warning: field name starts with the struct's name
--> syntax/mod.rs:128:5
|
128 | pub enum_token: Token![enum],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
warning: field name starts with the struct's name
--> syntax/mod.rs:190:5
|
190 | pub impl_token: Token![impl],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
warning: field name starts with the struct's name
--> syntax/mod.rs:191:5
|
191 | pub impl_generics: Lifetimes,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
warning: field name starts with the struct's name
--> syntax/mod.rs:204:5
|
204 | pub lifetimes: Punctuated<Lifetime, Token![,]>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
2023-10-21 21:57:30 -07:00
David Tolnay
ff4367ea9a
Release 1.0.109
2023-10-12 15:32:28 -07:00
David Tolnay
a6ca025d06
Release 1.0.108
2023-10-09 18:09:18 -07:00
David Tolnay
c66b6a9686
Keep old name of non_canonical_partial_ord_impl allowed to support old clippy
2023-10-06 22:37:56 -04:00
David Tolnay
7cc26d0a6f
Clippy incorrect_partial_ord_impl_on_ord_type lint has been renamed
...
warning: lint `clippy::incorrect_partial_ord_impl_on_ord_type` has been renamed to `clippy::non_canonical_partial_ord_impl`
--> tests/ffi/lib.rs:27:43
|
27 | #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
| ^^^^^^^^^^ help: use the new name: `clippy::non_canonical_partial_ord_impl`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
warning: lint `clippy::incorrect_partial_ord_impl_on_ord_type` has been renamed to `clippy::non_canonical_partial_ord_impl`
--> tests/ffi/lib.rs:32:25
|
32 | #[derive(PartialEq, PartialOrd)]
| ^^^^^^^^^^ help: use the new name: `clippy::non_canonical_partial_ord_impl`
warning: lint `clippy::incorrect_partial_ord_impl_on_ord_type` has been renamed to `clippy::non_canonical_partial_ord_impl`
--> tests/ffi/lib.rs:37:27
|
37 | #[derive(Debug, Hash, PartialOrd, Ord)]
| ^^^^^^^^^^ help: use the new name: `clippy::non_canonical_partial_ord_impl`
warning: lint `clippy::incorrect_partial_ord_impl_on_ord_type` has been renamed to `clippy::non_canonical_partial_ord_impl`
--> tests/ffi/lib.rs:89:69
|
89 | #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
| ^^^^^^^^^^ help: use the new name: `clippy::non_canonical_partial_ord_impl`
2023-10-06 22:29:43 -04:00
David Tolnay
ba26443538
Ignore into_iter_without_iter pedantic clippy lint
...
warning: `IntoIterator` implemented for a reference type without an `iter` method
--> syntax/types.rs:275:1
|
275 | / impl<'t, 'a> IntoIterator for &'t Types<'a> {
276 | | type Item = &'a Type;
277 | | type IntoIter = crate::syntax::set::Iter<'t, 'a, Type>;
278 | | fn into_iter(self) -> Self::IntoIter {
279 | | self.all.into_iter()
280 | | }
281 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_without_iter
= note: `-W clippy::into-iter-without-iter` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::into_iter_without_iter)]`
help: consider implementing `iter`
|
275 +
276 + impl Types<'a> {
277 + fn iter(&self) -> crate::syntax::set::Iter<'t, 'a, Type> {
278 + <&Self as IntoIterator>::into_iter(self)
279 + }
280 + }
|
2023-10-06 22:25:52 -04:00
David Tolnay
927d8ead12
Reduce visibility of all pub items which are not publicly exported
2023-09-03 12:41:41 -07:00
David Tolnay
51ded1be5e
Release 1.0.107
2023-08-29 16:17:48 -07:00
David Tolnay
2ff5e37af4
Remove unique_ptr from name of std::vector<>::new symbol
2023-08-29 15:39:22 -07:00
Cameron Pickett
1489071e5b
Add CxxVector::new for creating an empty vector
2023-08-25 10:38:55 -07:00
David Tolnay
eb06f521de
Release 1.0.106
2023-08-19 11:54:21 -07:00
David Tolnay
342cba6056
Release 1.0.105
2023-08-13 12:04:43 -07:00
David Tolnay
377f47e5a4
Release 1.0.104
2023-08-06 07:13:27 -07:00
David Tolnay
71225477bd
Release 1.0.103
2023-08-05 15:42:00 -07:00
David Tolnay
04622483f9
Release 1.0.102
2023-07-20 22:24:53 -07:00
David Tolnay
21e07fc0a6
Opt in to generate-link-to-definition when building on docs.rs
2023-07-20 22:24:14 -07:00
David Tolnay
3655e476ad
Release 1.0.101
2023-07-17 21:55:31 -07:00
David Tolnay
28954ac642
Suppress incorrect_partial_ord_impl_on_ord_type lint within generated code
...
warning: incorrect implementation of `partial_cmp` on an `Ord` type
--> tests/ffi/lib.rs:27:43
|
27 | #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
| ^^^^^^^^^^ help: change this to: `{ Some(self.cmp(other)) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type
= note: `-W clippy::incorrect-partial-ord-impl-on-ord-type` implied by `-W clippy::all`
warning: incorrect implementation of `partial_cmp` on an `Ord` type
--> tests/ffi/lib.rs:37:27
|
37 | #[derive(Debug, Hash, PartialOrd, Ord)]
| ^^^^^^^^^^ help: change this to: `{ Some(self.cmp(other)) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type
warning: incorrect implementation of `partial_cmp` on an `Ord` type
--> tests/ffi/lib.rs:89:69
|
89 | #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
| ^^^^^^^^^^ help: change this to: `{ Some(self.cmp(other)) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type
2023-07-17 21:37:35 -07:00
David Tolnay
155d6772bc
Release 1.0.100
2023-07-06 12:49:38 -07:00
David Tolnay
bcc8d8c990
Suppress items_after_statements pedantic clippy lint inside generated code
...
warning: adding items after statements is confusing, since items exist from the start of the scope
--> demo/src/main.rs:15:12
|
15 | fn next_chunk(buf: &mut MultiBuf) -> &[u8];
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
= note: `-W clippy::items-after-statements` implied by `-W clippy::pedantic`
2023-07-06 12:41:08 -07:00
David Tolnay
718eacac67
Resolve unnested_or_patterns pedantic clippy lint
...
warning: unnested or-patterns
--> gen/src/check.rs:19:20
|
19 | if let Some(Component::CurDir) | Some(Component::ParentDir) = first_component {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
= note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic`
help: nest the patterns
|
19 | if let Some(Component::CurDir | Component::ParentDir) = first_component {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> gen/src/write.rs:208:17
|
208 | / Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(I8) | Some(I16) | Some(I32)
209 | | | Some(I64) => out.include.cstdint = true,
| |___________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
208 | Some(U8 | U16 | U32 | U64 | I8 | I16 | I32 | I64) => out.include.cstdint = true,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> gen/src/write.rs:214:17
|
214 | Some(Bool) | Some(Char) | Some(F32) | Some(F64) | None => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
214 | Some(Bool | Char | F32 | F64) | None => {}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> gen/src/write.rs:851:9
|
851 | Some(Type::Str(_)) | Some(Type::SliceRef(_)) if !indirect_return => write!(out, ")"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
851 | Some(Type::Str(_) | Type::SliceRef(_)) if !indirect_return => write!(out, ")"),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> gen/src/write.rs:1185:9
|
1185 | Some(Type::RustBox(ty)) | Some(Type::UniquePtr(ty)) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
1185 | Some(Type::RustBox(ty) | Type::UniquePtr(ty)) => {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> gen/src/write.rs:1196:9
|
1196 | Some(Type::Str(_)) | Some(Type::SliceRef(_)) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
1196 | Some(Type::Str(_) | Type::SliceRef(_)) => {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> syntax/check.rs:126:17
|
126 | / None | Some(Bool) | Some(Char) | Some(U8) | Some(U16) | Some(U32) | Some(U64)
127 | | | Some(Usize) | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize)
128 | | | Some(F32) | Some(F64) | Some(RustString) => return,
| |__________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
126 ~ None |
127 + Some(Bool | Char | U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize
128 ~ | F32 | F64 | RustString) => return,
|
warning: unnested or-patterns
--> syntax/check.rs:165:13
|
165 | / None | Some(Bool) | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize)
166 | | | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32)
167 | | | Some(F64) | Some(CxxString) => return,
| |_________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
165 ~ None |
166 + Some(Bool | U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32
167 ~ | F64 | CxxString) => return,
|
warning: unnested or-patterns
--> syntax/check.rs:168:13
|
168 | Some(Char) | Some(RustString) => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
168 | Some(Char | RustString) => {}
| ~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> syntax/check.rs:186:13
|
186 | / None | Some(Bool) | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize)
187 | | | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32)
188 | | | Some(F64) | Some(CxxString) => return,
| |_________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
186 ~ None |
187 + Some(Bool | U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32
188 ~ | F64 | CxxString) => return,
|
warning: unnested or-patterns
--> syntax/check.rs:189:13
|
189 | Some(Char) | Some(RustString) => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
189 | Some(Char | RustString) => {}
| ~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> syntax/check.rs:210:13
|
210 | / None | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize) | Some(I8)
211 | | | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32) | Some(F64)
212 | | | Some(CxxString) => return,
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
210 ~ None |
211 + Some(U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32 | F64 |
212 ~ CxxString) => return,
|
warning: unnested or-patterns
--> syntax/check.rs:214:13
|
214 | Some(Bool) | Some(RustString) => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
214 | Some(Bool | RustString) => {}
| ~~~~~~~~~~~~~~~~~~~~~~~
warning: unnested or-patterns
--> gen/build/src/lib.rs:458:21
|
458 | Some("h") | Some("hh") | Some("hpp") => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns
help: nest the patterns
|
458 | Some("h" | "hh" | "hpp") => {}
| ~~~~~~~~~~~~~~~~~~~~~~~~
2023-07-06 12:29:28 -07:00
David Tolnay
7a5c69f405
Resolve semicolon_if_nothing_returned pedantic clippy lint
...
warning: consider adding a `;` to the last statement for consistent formatting
--> gen/src/write.rs:132:17
|
132 | check_trivial_extern_type(out, ety, reasons)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `check_trivial_extern_type(out, ety, reasons);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
warning: consider adding a `;` to the last statement for consistent formatting
--> syntax/parse.rs:45:17
|
45 | parse_foreign_mod(cx, foreign_mod, &mut apis, trusted, namespace)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `parse_foreign_mod(cx, foreign_mod, &mut apis, trusted, namespace);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
warning: consider adding a `;` to the last statement for consistent formatting
--> gen/lib/tests/test.rs:27:5
|
27 | assert!(cxx_gen::generate_header_and_cc(rs, &opt).is_err())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `assert!(cxx_gen::generate_header_and_cc(rs, &opt).is_err());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
2023-07-06 12:21:41 -07:00
David Tolnay
669a72080a
Ignore all currently triggered clippy pedantic lints
2023-07-06 12:15:11 -07:00
David Tolnay
6ccae07bb7
Update to 2021 edition
2023-07-06 11:50:43 -07:00
David Tolnay
22d0e8c4b8
Release 1.0.99
2023-07-06 11:41:18 -07:00
David Tolnay
8308e99118
Release 1.0.98
2023-07-05 09:05:18 -07:00
David Tolnay
1ae80edc8e
Eliminate syn 1 from minimal-versions
2023-07-05 09:03:13 -07:00