Skip to content

Commit

Permalink
natvis does not need to be conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlie Davis committed Jun 12, 2024
1 parent 8e0e96d commit 418394d
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[build]
rustflags = [
# "--cfg", "windows_debugger_visualizer",
# "--cfg", "windows_raw_dylib",
# "-C", "target-feature=+crt-static",
]
2 changes: 1 addition & 1 deletion .github/workflows/debugger_visualizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master

env:
RUSTFLAGS: -Dwarnings --cfg windows_debugger_visualizer
RUSTFLAGS: -Dwarnings

jobs:
check:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ exclude = [
[workspace.lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib, windows_debugger_visualizer)'] }
unexpected_cfgs = { level = "warn" }
5 changes: 1 addition & 4 deletions crates/libs/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs

#![doc(html_no_source)]
#![allow(non_snake_case)]
#![cfg_attr(
windows_debugger_visualizer,
debugger_visualizer(natvis_file = "../.natvis")
)]
#![debugger_visualizer(natvis_file = "../.natvis")]
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]

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

#![cfg_attr(
windows_debugger_visualizer,
debugger_visualizer(natvis_file = "../.natvis")
)]
#![debugger_visualizer(natvis_file = "../.natvis")]
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
#![cfg_attr(not(windows), allow(unused_imports))]

Expand Down
2 changes: 1 addition & 1 deletion crates/tests/debugger_visualizer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ doc = false
doctest = false

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

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

use debugger_test::*;
use windows::core::*;
Expand Down

0 comments on commit 418394d

Please sign in to comment.