Stabilize termination_trait
This stabilizes `main` with non-() return types; see #48453.
This commit is contained in:
parent
c5c650d670
commit
97b3bf99f6
13 changed files with 21 additions and 39 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() -> ! {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// must-compile-successfully
|
||||
// failure-status: 1
|
||||
|
||||
#![feature(termination_trait)]
|
||||
|
||||
use std::io::{Error, ErrorKind};
|
||||
|
||||
fn main() -> Result<(), Box<Error>> {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,4 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(termination_trait)]
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>> {
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue