Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant warning suppression #1709

Merged
merged 5 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Update toolchain
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Run cargo check
run: cargo check -p windows
run: cargo check -p windows --features Foundation,Win32_Foundation,Win32_Graphics_Direct2D
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we can't test --all-features as we do for windows-sys due to build server limitations (and a very greedy compiler) but at least this adds a bit more smoke testing for some common type system patterns that we can validate on the MSRV.


cargo_clippy:
name: Check clippy
Expand Down
1 change: 0 additions & 1 deletion crates/libs/bindgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ pub fn gen_namespace(gen: &Gen) -> String {
let types = gen_non_sys_function_types(tree, gen);

let tokens = quote! {
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)]
#(#namespaces)*
#functions
#types
Expand Down
1 change: 1 addition & 0 deletions crates/libs/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs

#![no_std]
#![doc(html_no_source)]
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, clashing_extern_declarations)]

extern crate self as windows_sys;
mod Windows;
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/windows/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs
*/

#![doc(html_no_source)]
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, dead_code, unused_variables)]
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, clashing_extern_declarations, unused_variables, dead_code)]

extern crate self as windows;
mod Windows;
Expand Down
2 changes: 2 additions & 0 deletions crates/tests/nightly_component/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, clashing_extern_declarations, unused_variables, dead_code)]

mod bindings;
use std::mem::*;
use std::sync::*;
Expand Down
1 change: 1 addition & 0 deletions crates/tests/nightly_component_client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, clashing_extern_declarations, unused_variables, dead_code)]
#![cfg(test)]

mod bindings;
Expand Down
2 changes: 1 addition & 1 deletion crates/tools/bindings/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ fn main() -> std::io::Result<()> {
"Windows.Win32.System.WinRT.IWeakReferenceSource",
];

let mut tokens = "#![allow(non_snake_case, non_upper_case_globals, dead_code, non_camel_case_types, clippy::upper_case_acronyms, clippy::derivable_impls)]".to_string();
let gen = bindgen::Gen { namespace: "Windows.", min_enum: true, min_inherit: true, flatten: true, ..Default::default() };
let mut tokens = String::new();

for name in types {
tokens += &bindgen::gen_type(name, &gen);
Expand Down