提交 34cf2882 编写于 作者: A Alex Crichton

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 #37499
上级 5e122f59
......@@ -209,5 +209,4 @@
- [windows_handle](windows-handle.md)
- [windows_net](windows-net.md)
- [windows_stdio](windows-stdio.md)
- [windows_subsystem](windows-subsystem.md)
- [zero_one](zero-one.md)
# `windows_subsystem`
The tracking issue for this feature is: [#37499]
[#37499]: https://github.com/rust-lang/rust/issues/37499
------------------------
......@@ -292,9 +292,6 @@ pub fn new() -> Features {
// Allows attributes on lifetime/type formal parameters in generics (RFC 1327)
(active, generic_param_attrs, "1.11.0", Some(34761)),
// The #![windows_subsystem] attribute
(active, windows_subsystem, "1.14.0", Some(37499)),
// Allows #[link(..., cfg(..))]
(active, link_cfg, "1.14.0", Some(37406)),
......@@ -408,7 +405,8 @@ pub fn new() -> Features {
(accepted, static_recursion, "1.17.0", Some(29719)),
// pub(restricted) visibilities (RFC 1422)
(accepted, pub_restricted, "1.17.0", Some(32409)),
// The #![windows_subsystem] attribute
(accepted, windows_subsystem, "1.18.0", Some(37499)),
);
// If you change this, please modify src/doc/unstable-book as well. You must
// move that documentation into the relevant place in the other docs, and
......@@ -768,11 +766,7 @@ pub fn is_builtin_attr(attr: &ast::Attribute) -> bool {
"unboxed_closures are still evolving",
cfg_fn!(unboxed_closures))),
("windows_subsystem", Whitelisted, Gated(Stability::Unstable,
"windows_subsystem",
"the windows subsystem attribute \
is currently unstable",
cfg_fn!(windows_subsystem))),
("windows_subsystem", Whitelisted, Ungated),
("proc_macro_attribute", Normal, Gated(Stability::Unstable,
"proc_macro",
......
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// gate-test-windows_subsystem
#![windows_subsystem = "console"]
//~^ ERROR: the windows subsystem attribute is currently unstable
fn main() {}
......@@ -10,7 +10,6 @@
// error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed
#![feature(windows_subsystem)]
#![windows_subsystem = "wrong"]
fn main() {}
......@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(windows_subsystem)]
#![windows_subsystem = "console"]
fn main() {}
......
......@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(windows_subsystem)]
#![windows_subsystem = "windows"]
fn main() {}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册