File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,7 @@ expect-test = "1.2.0-pre.1"
30
30
31
31
# used as proc macro test targets
32
32
proc_macro_test = { path = " ../proc_macro_test" }
33
+
34
+ [features ]
35
+ default = [" copy-dll-on-windows" ]
36
+ copy-dll-on-windows = [] # Please keep the feature (or another way to disable DLL copying) for intellij-rust
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ impl Expander {
162
162
}
163
163
164
164
/// Copy the dylib to temp directory to prevent locking in Windows
165
- #[ cfg( windows) ]
165
+ #[ cfg( all ( windows, feature = "copy-dll-on-windows" ) ) ]
166
166
fn ensure_file_with_lock_free_access ( path : & Path ) -> io:: Result < PathBuf > {
167
167
use std:: collections:: hash_map:: RandomState ;
168
168
use std:: ffi:: OsString ;
@@ -189,7 +189,7 @@ fn ensure_file_with_lock_free_access(path: &Path) -> io::Result<PathBuf> {
189
189
Ok ( to)
190
190
}
191
191
192
- #[ cfg( unix) ]
192
+ #[ cfg( any ( unix, not ( feature = "copy-dll-on-windows" ) ) ) ]
193
193
fn ensure_file_with_lock_free_access ( path : & Path ) -> io:: Result < PathBuf > {
194
194
Ok ( path. to_path_buf ( ) )
195
195
}
You can’t perform that action at this time.
0 commit comments