Permalink
Please
sign in to comment.
Browse files
changed termination_trait's bound from Error to Debug; added compilet…
…est header command and appropriate tests
- Loading branch information...
Showing
with
77 additions
and 18 deletions.
- +3 −12 src/libstd/termination.rs
- 0 ...ile-fail/{main-wrong-type-2.rs → rfc-1937-termination-trait/termination-trait-main-wrong-type.rs}
- 0 src/test/compile-fail/{ → rfc-1937-termination-trait}/termination-trait-not-satisfied.rs
- +20 −0 src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs
- 0 src/test/run-pass/{ → rfc-1937-termination-trait}/termination-trait-for-empty.rs
- 0 src/test/run-pass/{ → rfc-1937-termination-trait}/termination-trait-for-i32.rs
- +17 −0 src/test/run-pass/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs
- 0 src/test/run-pass/{ → rfc-1937-termination-trait}/termination-trait-for-result.rs
- +17 −0 src/test/run-pass/termination-trait-for-result-box-error_ok.rs
- +13 −0 src/tools/compiletest/src/header.rs
- +7 −6 src/tools/compiletest/src/runtest.rs
File renamed without changes.
File renamed without changes.
| @@ -0,0 +1,20 @@ | |||
| // Copyright 2018 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. | |||
|
|
|||
| // must-compile-successfully | |||
| // failure-status: 1 | |||
|
|
|||
| #![feature(termination_trait)] | |||
|
|
|||
| use std::io::{Error, ErrorKind}; | |||
|
|
|||
| fn main() -> Result<(), Box<Error>> { | |||
| Err(Box::new(Error::new(ErrorKind::Other, "returned Box<Error> from main()"))) | |||
| } | |||
File renamed without changes.
File renamed without changes.
| @@ -0,0 +1,17 @@ | |||
| // Copyright 2018 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. | |||
|
|
|||
| #![feature(termination_trait)] | |||
|
|
|||
| use std::io::Error; | |||
|
|
|||
| fn main() -> Result<(), Box<Error>> { | |||
| Ok(()) | |||
| } | |||
File renamed without changes.
| @@ -0,0 +1,17 @@ | |||
| // Copyright 2018 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. | |||
|
|
|||
| #![feature(termination_trait)] | |||
|
|
|||
| use std::io::Error; | |||
|
|
|||
| fn main() -> Result<(), Box<Error>> { | |||
| Ok(()) | |||
| } | |||
0 comments on commit
7948afd