From 6b5d420ed2e9db495ac4791a1547805b427ce4db Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Tue, 18 Jan 2022 09:37:01 -0500 Subject: [PATCH] Use a module instead of include! Modules are better understood by rust-analyzer compared to macros expansion, and we can still use the same bindgen script and lint attrs. --- ctru-sys/src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ctru-sys/src/lib.rs b/ctru-sys/src/lib.rs index dc32370..d91d887 100644 --- a/ctru-sys/src/lib.rs +++ b/ctru-sys/src/lib.rs @@ -1,7 +1,9 @@ -#![allow(non_upper_case_globals)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(clippy::all)] #![no_std] -include!("bindings.rs"); +#[allow(non_upper_case_globals)] +#[allow(non_camel_case_types)] +#[allow(non_snake_case)] +#[allow(clippy::all)] +mod bindings; + +pub use bindings::*;