Stabilize termination_trait

This stabilizes `main` with non-() return types; see #48453.
This commit is contained in:
Tyler Mandry 2018-03-19 01:31:04 -05:00
parent c5c650d670
commit 97b3bf99f6
13 changed files with 21 additions and 39 deletions

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() -> i32 { //~ ERROR main function has wrong type [E0580]
fn main() -> i32 {
//~^ ERROR the trait bound `i32: std::process::Termination` is not satisfied [E0277]
0
}

View file

@ -7,7 +7,6 @@
// <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.
#![feature(termination_trait)]
fn main() -> char {
//~^ ERROR: the trait bound `char: std::process::Termination` is not satisfied

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(termination_trait)]
struct ReturnType {}
fn main() -> ReturnType { //~ ERROR `ReturnType: std::process::Termination` is not satisfied

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(termination_trait)]
// error-pattern:oh, dear
fn main() -> ! {

View file

@ -11,8 +11,6 @@
// must-compile-successfully
// failure-status: 1
#![feature(termination_trait)]
use std::io::{Error, ErrorKind};
fn main() -> Result<(), Box<Error>> {

View file

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

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(termination_trait)]
#![feature(process_exitcode_placeholder)]
use std::process::ExitCode;

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(termination_trait)]
use std::io::Error;
fn main() -> Result<(), Box<Error>> {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(termination_trait)]
use std::io::Error;
fn main() -> Result<(), Error> {