1
Fork 0

Remove #[main] attribute.

This commit is contained in:
Charles Lew 2021-04-08 21:37:38 +08:00
parent 9c3b66cff7
commit fc357039f9
29 changed files with 59 additions and 214 deletions

View file

@ -134,9 +134,6 @@ declare_features! (
/// Allows using the `box $expr` syntax.
(active, box_syntax, "1.0.0", Some(49733), None),
/// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
(active, main, "1.0.0", Some(29634), None),
/// Allows using `#[start]` on a function indicating that it is the program entrypoint.
(active, start, "1.0.0", Some(29633), None),

View file

@ -536,6 +536,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
rustc_specialization_trait, Normal, template!(Word),
"the `#[rustc_specialization_trait]` attribute is used to check specializations"
),
rustc_attr!(
rustc_main, Normal, template!(Word),
"the `#[rustc_main]` attribute is used internally to specify test entry point function",
),
// ==========================================================================
// Internal attributes, Testing:

View file

@ -132,6 +132,8 @@ declare_features! (
(removed, link_args, "1.53.0", Some(29596), None,
Some("removed in favor of using `-C link-arg=ARG` on command line, \
which is available from cargo build scripts with `cargo:rustc-link-arg` now")),
/// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
(removed, main, "1.53.0", Some(29634), None, None),
// -------------------------------------------------------------------------
// feature-group-end: removed features