about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-27 15:41:51 +0000
committerbors <bors@rust-lang.org>2017-12-27 15:41:51 +0000
commitbfbb1f5ce1e6a85a03219767cfc5c9bab3f7bf9e (patch)
treeb72634f6bee5eb0e51d428fe53ecd1c28c11b907 /src/libstd/lib.rs
parent63efff5a71269ae22b8769e2e6f9aaa2f940f823 (diff)
parent09f94bea4aca7696b58dd7e6668ca27d71908984 (diff)
downloadrust-bfbb1f5ce1e6a85a03219767cfc5c9bab3f7bf9e.tar.gz
rust-bfbb1f5ce1e6a85a03219767cfc5c9bab3f7bf9e.zip
Auto merge of #46479 - bkchr:termination_trait, r=arielb1
Implements RFC 1937: `?` in `main`

This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.

Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help!

The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 12e6231136e..171c108e3aa 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -308,6 +308,7 @@
 #![feature(str_char)]
 #![feature(str_internals)]
 #![feature(str_utf16)]
+#![feature(termination_trait)]
 #![feature(test, rustc_private)]
 #![feature(thread_local)]
 #![feature(toowned_clone_into)]
@@ -499,6 +500,11 @@ mod memchr;
 // The runtime entry point and a few unstable public functions used by the
 // compiler
 pub mod rt;
+// The trait to support returning arbitrary types in the main function
+mod termination;
+
+#[unstable(feature = "termination_trait", issue = "43301")]
+pub use self::termination::Termination;
 
 // Include a number of private modules that exist solely to provide
 // the rustdoc documentation for primitive types. Using `include!`