diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-02-10 15:18:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 15:18:15 +0000 |
commit | 50aa471f9c38dc214dd86f3cad78a0e6b1065af5 (patch) | |
tree | bd173f641aeaa7e07a1485937aa50cfe6604e486 | |
parent | 782e55ae5818c114ede2a579f7653c3bdc0d23e3 (diff) | |
parent | ce0ae76899a39a93e7db8f8ad24c5e681a3d7294 (diff) |
-rw-r--r-- | bindgen/codegen/serialize.rs | 10 | ||||
-rw-r--r-- | bindgen/lib.rs | 1 | ||||
-rw-r--r-- | clippy.toml | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/bindgen/codegen/serialize.rs b/bindgen/codegen/serialize.rs index 217098e5..e521c703 100644 --- a/bindgen/codegen/serialize.rs +++ b/bindgen/codegen/serialize.rs @@ -44,12 +44,10 @@ impl<'a> CSerialize<'a> for Item { ItemKind::Function(func) => { func.serialize(ctx, self, stack, writer) } - kind => { - return Err(CodegenError::Serialize { - msg: format!("Cannot serialize item kind {:?}", kind), - loc: get_loc(self), - }); - } + kind => Err(CodegenError::Serialize { + msg: format!("Cannot serialize item kind {:?}", kind), + loc: get_loc(self), + }), } } } diff --git a/bindgen/lib.rs b/bindgen/lib.rs index 53747420..14d7a155 100644 --- a/bindgen/lib.rs +++ b/bindgen/lib.rs @@ -9,6 +9,7 @@ //! additional documentation. #![deny(missing_docs)] #![deny(unused_extern_crates)] +#![deny(clippy::disallowed_methods)] // To avoid rather annoying warnings when matching with CXCursor_xxx as a // constant. #![allow(non_upper_case_globals)] diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..1060a6b4 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,4 @@ +disallowed-methods = [ + { path = "clang_sys::CXCursor_TranslationUnit", reason = "This value was changed in clang 15"}, + { path = "clang_sys::CXCursor_LastStmt", reason = "This value was changed in clang 15"} +] |