David Tolnay
1565becf8d
Resolve manual_let_else clippy lint
...
warning: this could be rewritten as `let...else`
--> gen/build/src/cargo.rs:54:13
|
54 | / let k = match k.to_str() {
55 | | Some(k) => k,
56 | | None => continue,
57 | | };
| |______________^ help: consider writing: `let Some(k) = k.to_str() else { continue };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`
warning: this could be rewritten as `let...else`
--> gen/build/src/cargo.rs:58:13
|
58 | / let v = match v.into_string() {
59 | | Ok(v) => v,
60 | | Err(_) => continue,
61 | | };
| |______________^ help: consider writing: `let Ok(v) = v.into_string() else { continue };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> gen/build/src/lib.rs:437:5
|
437 | / let mut entries = match fs::read_dir(src) {
438 | | Ok(entries) => entries,
439 | | Err(_) => return,
440 | | };
| |______^ help: consider writing: `let Ok(mut entries) = fs::read_dir(src) else { return };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> gen/build/src/out.rs:160:5
|
160 | / let relative_path = match abstractly_relativize_symlink(original, link) {
161 | | Some(relative_path) => relative_path,
162 | | None => return original.to_path_buf(),
163 | | };
| |______^ help: consider writing: `let Some(relative_path) = abstractly_relativize_symlink(original, link) else { return original.to_path_buf() };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> syntax/check.rs:558:9
|
558 | / let resolve = match cx.types.try_resolve(&receiver.ty) {
559 | | Some(resolve) => resolve,
560 | | None => return,
561 | | };
| |__________^ help: consider writing: `let Some(resolve) = cx.types.try_resolve(&receiver.ty) else { return };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`
warning: this could be rewritten as `let...else`
--> syntax/parse.rs:439:5
|
439 | / let name = match &abi.name {
440 | | Some(name) => name,
441 | | None => {
442 | | return Err(Error::new_spanned(
... |
446 | | }
447 | | };
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
help: consider writing
|
439 ~ let Some(name) = &abi.name else {
440 + return Err(Error::new_spanned(
441 + abi,
442 + "ABI name is required, extern \"C++\" or extern \"Rust\"",
443 + ));
444 + };
|
warning: this could be rewritten as `let...else`
--> syntax/parse.rs:1332:5
|
1332 | / let len_expr = if let Expr::Lit(lit) = &ty.len {
1333 | | lit
1334 | | } else {
1335 | | let msg = "unsupported expression, array length must be an integer literal";
1336 | | return Err(Error::new_spanned(&ty.len, msg));
1337 | | };
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
help: consider writing
|
1332 ~ let Expr::Lit(len_expr) = &ty.len else {
1333 + let msg = "unsupported expression, array length must be an integer literal";
1334 + return Err(Error::new_spanned(&ty.len, msg));
1335 + };
|
warning: this could be rewritten as `let...else`
--> syntax/report.rs:24:9
|
24 | / let mut all_errors = match iter.next() {
25 | | Some(err) => err,
26 | | None => return Ok(()),
27 | | };
| |__________^ help: consider writing: `let Some(mut all_errors) = iter.next() else { return Ok(()) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> syntax/types.rs:174:13
|
174 | / let impl_key = match ty.impl_key() {
175 | | Some(impl_key) => impl_key,
176 | | None => continue,
177 | | };
| |______________^ help: consider writing: `let Some(impl_key) = ty.impl_key() else { continue };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
2024-07-08 20:48:29 -07:00
David Tolnay
3ea1e9f654
Raise required compiler to rust 1.67
...
Required by recent versions of the cc crate.
error: package `cc v1.0.106` cannot be built because it requires rustc 1.67 or newer, while the currently active rustc version is 1.63.0
2024-07-08 20:38:37 -07:00
David Tolnay
afd4aa3f3d
Release 1.0.124
2024-06-14 10:55:05 -07:00
David Tolnay
dd532b6505
Ignore needless_maybe_sized clippy lint in generated code
...
warning: `?Sized` bound is ignored because of a `Sized` requirement
--> tests/ffi/lib.rs:233:14
|
233 | type Reference<'a>;
| ^^^^^^^^^^^^^^
|
note: `T` cannot be unsized because of the bound
--> tests/ffi/lib.rs:233:9
|
233 | type Reference<'a>;
| ^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
= note: `#[warn(clippy::needless_maybe_sized)]` on by default
help: change the bounds that require `Sized`, or remove the `?Sized` bound
|
233 - type Reference<'a>;
233 +
|
warning: `?Sized` bound is ignored because of a `Sized` requirement
--> tests/ffi/lib.rs:262:14
|
262 | type R;
| ^^
|
note: `T` cannot be unsized because of the bound
--> tests/ffi/lib.rs:262:9
|
262 | type R;
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
help: change the bounds that require `Sized`, or remove the `?Sized` bound
|
262 - type R;
262 +
|
2024-06-14 10:34:48 -07:00
David Tolnay
bdb44f4dc0
Release 1.0.123
2024-06-04 23:17:26 -07:00
David Tolnay
462896c806
Release 1.0.122
2024-05-07 16:20:00 -07:00
David Tolnay
d5dd97693c
Raise minimum tested compiler to 1.63
...
Required by the `cc` crate.
2024-04-20 20:56:10 -07:00
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