Skip to content

Commit a239b4b

Browse files
committed
Revise windows_subsystem text
1 parent 987ab56 commit a239b4b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/runtime.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,28 @@ The *`windows_subsystem` [attribute][attributes]* sets the [subsystem] when link
2121
> ```
2222
2323
r[runtime.windows_subsystem.syntax]
24-
The `windows_subsystem` attribute 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. Accepted values are `"console"` and `"windows"`.
2525
2626
r[runtime.windows_subsystem.allowed-positions]
2727
The `windows_subsystem` attribute may only be applied to the crate root.
2828
2929
r[runtime.windows_subsystem.duplicates]
30-
Only the first instance of `windows_subsystem` on an item is honored. Subsequent `example` attributes are ignored.
30+
Only the first use of `windows_subsystem` is honored.
3131
3232
> [!NOTE]
33-
> `rustc` currently warns on subsequent duplicate `example` attributes. This may become an error in the future.
33+
> `rustc` currently lints against uses following the first. This may become a hard error in the future.
3434
3535
r[runtime.windows_subsystem.ignored]
36-
The `windows_subsystem` 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 non-`bin` [crate types].
3737
3838
r[runtime.windows_subsystem.console]
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.
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.
4040
4141
r[runtime.windows_subsystem.windows]
42-
The "windows" subsystem is commonly used by GUI applications that do not want to display a console window on startup. It will run detached from any existing console.
42+
The `"windows"` subsystem will run detached from any existing console.
43+
44+
> [!NOTE]
45+
> The `"windows"` subsystem is commonly used by GUI applications that do not want to display a console window on startup.
4346
4447
[`GlobalAlloc`]: alloc::alloc::GlobalAlloc
4548
[crate types]: linkage.md

0 commit comments

Comments
 (0)