Skip to content

Commit 14a7dd4

Browse files
authored
Rollup merge of rust-lang#40870 - alexcrichton:stabilize-windows-subsystem, r=aturon
rustc: Stabilize the `#![windows_subsystem]` attribute This commit stabilizes the `#![windows_subsystem]` attribute which is a conservative exposure of the `/SUBSYSTEM` linker flag on Widnows platforms. This is useful for creating applications as well as console programs. Closes rust-lang#37499
2 parents d3a1062 + 34cf288 commit 14a7dd4

File tree

7 files changed

+3
-39
lines changed

7 files changed

+3
-39
lines changed

src/doc/unstable-book/src/SUMMARY.md

-1
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,4 @@
209209
- [windows_handle](windows-handle.md)
210210
- [windows_net](windows-net.md)
211211
- [windows_stdio](windows-stdio.md)
212-
- [windows_subsystem](windows-subsystem.md)
213212
- [zero_one](zero-one.md)

src/doc/unstable-book/src/windows-subsystem.md

-10
This file was deleted.

src/libsyntax/feature_gate.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,6 @@ declare_features! (
292292
// Allows attributes on lifetime/type formal parameters in generics (RFC 1327)
293293
(active, generic_param_attrs, "1.11.0", Some(34761)),
294294

295-
// The #![windows_subsystem] attribute
296-
(active, windows_subsystem, "1.14.0", Some(37499)),
297-
298295
// Allows #[link(..., cfg(..))]
299296
(active, link_cfg, "1.14.0", Some(37406)),
300297

@@ -408,7 +405,8 @@ declare_features! (
408405
(accepted, static_recursion, "1.17.0", Some(29719)),
409406
// pub(restricted) visibilities (RFC 1422)
410407
(accepted, pub_restricted, "1.17.0", Some(32409)),
411-
408+
// The #![windows_subsystem] attribute
409+
(accepted, windows_subsystem, "1.18.0", Some(37499)),
412410
);
413411
// If you change this, please modify src/doc/unstable-book as well. You must
414412
// move that documentation into the relevant place in the other docs, and
@@ -768,11 +766,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
768766
"unboxed_closures are still evolving",
769767
cfg_fn!(unboxed_closures))),
770768

771-
("windows_subsystem", Whitelisted, Gated(Stability::Unstable,
772-
"windows_subsystem",
773-
"the windows subsystem attribute \
774-
is currently unstable",
775-
cfg_fn!(windows_subsystem))),
769+
("windows_subsystem", Whitelisted, Ungated),
776770

777771
("proc_macro_attribute", Normal, Gated(Stability::Unstable,
778772
"proc_macro",

src/test/compile-fail/windows-subsystem-gated.rs

-16
This file was deleted.

src/test/compile-fail/windows-subsystem-invalid.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed
1212

13-
#![feature(windows_subsystem)]
1413
#![windows_subsystem = "wrong"]
1514

1615
fn main() {}

src/test/run-make/windows-subsystem/console.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(windows_subsystem)]
1211
#![windows_subsystem = "console"]
1312

1413
fn main() {}

src/test/run-make/windows-subsystem/windows.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(windows_subsystem)]
1211
#![windows_subsystem = "windows"]
1312

1413
fn main() {}

0 commit comments

Comments
 (0)