File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -13,18 +13,27 @@ r[runtime.windows_subsystem]
13
13
## The ` windows_subsystem ` attribute
14
14
15
15
r[ runtime.windows_subsystem.intro]
16
- The * ` windows_subsystem ` attribute* may be applied at the crate level to set the [ subsystem] when linking on a Windows target.
16
+ The * ` windows_subsystem ` [ attribute] [ attributes ] * sets the [ subsystem] when linking on a Windows target.
17
17
18
18
> [ !EXAMPLE]
19
19
> ``` rust
20
20
> #![windows_subsystem = " windows" ]
21
21
> ```
22
22
23
23
r [runtime . windows_subsystem. syntax]
24
- It uses the [MetaNameValueStr ] syntax to specify the subsystem with a value of either `console ` or `windows `.
24
+ The `windows_subsystem ` attribute uses the [MetaNameValueStr ] syntax to specify the subsystem with a value of either `console ` or `windows `.
25
+
26
+ r [runtime . windows_subsystem. allowed- positions ]
27
+ The `windows_subsystem ` attribute may only be applied to the crate root .
28
+
29
+ r [runtime . windows_subsystem. duplicates]
30
+ Only the first instance of `windows_subsystem ` on an item is honored . Subsequent `example ` attributes are ignored .
31
+
32
+ > [! NOTE ]
33
+ > `rustc ` currently warns on subsequent duplicate `example ` attributes . This may become an error in the future .
25
34
26
35
r [runtime . windows_subsystem. ignored]
27
- This attribute is ignored on non - Windows targets , and for non - `bin ` [crate types ].
36
+ The ` windows_subsystem ` attribute is ignored on non - Windows targets , and for non - `bin ` [crate types ].
28
37
29
38
r [runtime . windows_subsystem. console]
30
39
The " console" subsystem is the default . If a console process is run from an existing console then it will be attached to that console , otherwise a new console window will be created .
You can’t perform that action at this time.
0 commit comments