We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7c14d4 commit f9b6718Copy full SHA for f9b6718
1 file changed
tests/ui/std/open-options-ext-compat.rs
@@ -0,0 +1,20 @@
1
+//@ only-windows
2
+//@ check-pass
3
+
4
+// Regression test for https://github.com/rust-lang/rust/issues/153486
5
+// Ensures that `OpenOptionsExt` remains implementable by downstream crates
6
+// without requiring changes when new methods are added to the standard library.
7
8
+use std::os::windows::fs::OpenOptionsExt;
9
10
+struct MockOptions;
11
12
+impl OpenOptionsExt for MockOptions {
13
+ fn access_mode(&mut self, _: u32) -> &mut Self { self }
14
+ fn share_mode(&mut self, _: u32) -> &mut Self { self }
15
+ fn custom_flags(&mut self, _: u32) -> &mut Self { self }
16
+ fn attributes(&mut self, _: u32) -> &mut Self { self }
17
+ fn security_qos_flags(&mut self, _: u32) -> &mut Self { self }
18
+}
19
20
+fn main() {}
0 commit comments