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

Re-enable unexpected_cfgs #3050

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ exclude = [
rust_2018_idioms = "warn"
unused_qualifications = "warn"
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib, windows_debugger_visualizer)'] }
2 changes: 1 addition & 1 deletion crates/libs/core/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, unexpected_cfgs)]
#![allow(non_snake_case)]
#![cfg_attr(windows_debugger_visualizer, debugger_visualizer(natvis_file = "../.natvis"))]
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]

Expand Down
1 change: 0 additions & 1 deletion crates/libs/result/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs>
*/

#![allow(unexpected_cfgs)]
#![cfg_attr(
windows_debugger_visualizer,
debugger_visualizer(natvis_file = "../.natvis")
Expand Down
1 change: 0 additions & 1 deletion crates/libs/targets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs
*/

#![no_std]
#![allow(unexpected_cfgs)]

/// Defines an external function to import.
#[cfg(all(windows_raw_dylib, target_arch = "x86"))]
Expand Down
3 changes: 3 additions & 0 deletions crates/tests/calling_convention/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.0.0"
edition = "2021"
publish = false

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib)'] }

[dependencies.windows]
path = "../../libs/windows"
features = [
Expand Down
2 changes: 0 additions & 2 deletions crates/tests/calling_convention/tests/sys.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(unexpected_cfgs)]

use windows_sys::{
core::*, Win32::Foundation::*, Win32::Networking::Ldap::*, Win32::System::SystemInformation::*,
Win32::UI::WindowsAndMessaging::*,
Expand Down
2 changes: 0 additions & 2 deletions crates/tests/calling_convention/tests/win.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(unexpected_cfgs)]

use windows::{
Win32::Foundation::*, Win32::Networking::Ldap::*, Win32::System::SystemInformation::*,
};
Expand Down
3 changes: 3 additions & 0 deletions crates/tests/debugger_visualizer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.0.0"
edition = "2021"
publish = false

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_debugger_visualizer)'] }

[dependencies.windows]
path = "../../libs/windows"
features = [
Expand Down
1 change: 0 additions & 1 deletion crates/tests/debugger_visualizer/tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(unexpected_cfgs)]
#![cfg(windows_debugger_visualizer)]

use debugger_test::*;
Expand Down