Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelix

These two attributes are used to change the entry point into a Rust program, but
for now they're being put behind feature gates until we have a chance to think
about them a little more. The #[start] attribute specifically may have its
signature changed.

This is a breaking change to due the usage of these attributes generating errors
by default now. If your crate is using these attributes, add this to your crate
root:

    #![feature(start)] // if you're using the #[start] attribute
    #![feature(main)]  // if you're using the #[main] attribute

cc #20064
This commit is contained in:
bors 2015-01-20 02:23:49 +00:00
commit e375a892f1
26 changed files with 71 additions and 13 deletions

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(main)]
pub fn main() {
panic!()

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(main)]
#[main]
fn foo() {

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(start)]
#[start]
fn start(_argc: int, _argv: *const *const u8) -> int {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(main)]
#[main]
fn foo() {
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(intrinsics)]
#![feature(intrinsics, main)]
mod rusti {
extern "rust-intrinsic" {

View file

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags:--test
// no-pretty-expanded
// This verifies that the test generation doesn't crash when we have
// no tests - for more information, see PR #16892.

View file

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: --test
// no-pretty-expanded
#![deny(unstable)]

View file

@ -13,7 +13,7 @@
// ignore-windows #13361
#![no_std]
#![feature(lang_items)]
#![feature(lang_items, start)]
extern crate "lang-item-public" as lang_lib;

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(start)]
#[start]
pub fn main(_: int, _: *const *const u8) -> int {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(start)]
use std::ffi;
use std::io::process::{Command, ProcessOutput};
use std::os;

View file

@ -13,7 +13,7 @@
// Smallest "hello world" with a libc runtime
#![no_std]
#![feature(intrinsics, lang_items)]
#![feature(intrinsics, lang_items, start)]
extern crate libc;

View file

@ -9,14 +9,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(unused_imports)]
#![feature(start)]
#![no_std]
extern crate std;
extern crate "std" as zed;
use std::str;
use zed::str as x;
mod baz {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(lang_items)]
#![feature(lang_items, start)]
#![no_std]
extern crate "std" as other;