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

NatVis does not need to be conditional #3094

Closed
wants to merge 2 commits into from
Closed
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: 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
6 changes: 4 additions & 2 deletions crates/libs/targets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ description = "Import libs for Windows"
repository = "https://github.com/microsoft/windows-rs"
readme = "readme.md"

[lints]
workspace = true
[lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib)'] }

[target.'cfg(all(target_arch = "x86", target_env = "msvc", not(windows_raw_dylib)))'.dependencies]
windows_i686_msvc = { path = "../../targets/i686_msvc", version = "0.52.5" }
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
Loading