Skip to content

Commit 1e4a245

Browse files
committed
Fix -D dead-code on Windows: allow unused completion directory field
CompletionOptions.directory is only read by the POSIX install path (cfg(not(windows))); the Windows debug build (which builds with -D dead-code) rejected the field as never read.
1 parent 032e835 commit 1e4a245

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/runtime/cli/install_completions_command.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ enum CompletionAction {
2424
struct CompletionOptions {
2525
action: CompletionAction,
2626
shell: Shell,
27+
// Only the POSIX install path reads this (the Windows install path
28+
// errors out before the `cfg(not(windows))` install body runs).
29+
#[allow(dead_code)]
2730
directory: Option<&'static [u8]>,
2831
}
2932

0 commit comments

Comments
 (0)