From 93b6d9e086c6910118a57e4332c9448ab550931f Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 11 Feb 2019 04:23:21 +0900 Subject: libstd => 2018 --- src/libstd/lib.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index ff72704bfbf..92197e8014a 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -209,6 +209,10 @@ #![deny(intra_doc_link_resolution_failure)] #![deny(missing_debug_implementations)] +#![deny(rust_2018_idioms)] +#![allow(explicit_outlives_requirements)] +#![allow(elided_lifetimes_in_paths)] + // Tell the compiler to link to either panic_abort or panic_unwind #![needs_panic_runtime] @@ -272,7 +276,6 @@ #![feature(maybe_uninit)] #![feature(needs_panic_runtime)] #![feature(never_type)] -#![feature(nll)] #![feature(non_exhaustive)] #![feature(on_unimplemented)] #![feature(optin_builtin_traits)] @@ -313,29 +316,25 @@ use prelude::v1::*; // Access to Bencher, etc. #[cfg(test)] extern crate test; -#[cfg(test)] extern crate rand; // Re-export a few macros from core #[stable(feature = "rust1", since = "1.0.0")] pub use core::{assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne}; #[stable(feature = "rust1", since = "1.0.0")] -pub use core::{unreachable, unimplemented, write, writeln, try}; +pub use core::{unreachable, unimplemented, write, writeln, r#try}; #[allow(unused_imports)] // macros from `alloc` are not used on all platforms #[macro_use] extern crate alloc as alloc_crate; #[doc(masked)] +#[allow(unused_extern_crates)] extern crate libc; -extern crate rustc_demangle; // We always need an unwinder currently for backtraces #[doc(masked)] #[allow(unused_extern_crates)] extern crate unwind; -#[cfg(feature = "backtrace")] -extern crate backtrace_sys; - // During testing, this crate is not actually the "real" std library, but rather // it links to the real std library, which was compiled from this same source // code. So any lang items std defines are conditionally excluded (or else they -- cgit 1.4.1-3-g733a5 From 2c783c3543f9582bb113253ab4d2277a4b27728f Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 11 Feb 2019 04:25:30 +0900 Subject: Revert removed #![feature(nll)] --- src/libstd/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 92197e8014a..4883c607ad1 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -276,6 +276,7 @@ #![feature(maybe_uninit)] #![feature(needs_panic_runtime)] #![feature(never_type)] +#![feature(nll)] #![feature(non_exhaustive)] #![feature(on_unimplemented)] #![feature(optin_builtin_traits)] -- cgit 1.4.1-3-g733a5 From 90dbf59b920054e5808718f4a54323e3653348aa Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 17 Feb 2019 22:35:20 +0900 Subject: Fix some imports and paths --- src/libstd/lib.rs | 3 --- src/libstd/sys/sgx/abi/usercalls/mod.rs | 2 +- src/libstd/sys/unix/stack_overflow.rs | 1 - src/libstd/sys_common/util.rs | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 4883c607ad1..32a168619df 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -344,9 +344,6 @@ extern crate unwind; // testing gives test-std access to real-std lang items and globals. See #2912 #[cfg(test)] extern crate std as realstd; -#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] -extern crate fortanix_sgx_abi; - // The standard macros that are not built-in to the compiler. #[macro_use] mod macros; diff --git a/src/libstd/sys/sgx/abi/usercalls/mod.rs b/src/libstd/sys/sgx/abi/usercalls/mod.rs index 7361011e92d..d84b6154cbe 100644 --- a/src/libstd/sys/sgx/abi/usercalls/mod.rs +++ b/src/libstd/sys/sgx/abi/usercalls/mod.rs @@ -22,7 +22,7 @@ pub fn read(fd: Fd, buf: &mut [u8]) -> IoResult { #[unstable(feature = "sgx_platform", issue = "56975")] pub fn read_alloc(fd: Fd) -> IoResult> { unsafe { - let userbuf = ByteBuffer { data: ::ptr::null_mut(), len: 0 }; + let userbuf = ByteBuffer { data: crate::ptr::null_mut(), len: 0 }; let mut userbuf = alloc::User::new_from_enclave(&userbuf); raw::read_alloc(fd, userbuf.as_raw_mut_ptr()).from_sgx_result()?; Ok(userbuf.copy_user_buffer()) diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index cfa019634bd..8c60bddc238 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -39,7 +39,6 @@ mod imp { use libc::{sigaltstack, SIGSTKSZ, SS_DISABLE}; use libc::{sigaction, SIGBUS, SIG_DFL, SA_SIGINFO, SA_ONSTACK, sighandler_t}; - use libc; use libc::{mmap, munmap}; use libc::{SIGSEGV, PROT_READ, PROT_WRITE, MAP_PRIVATE, MAP_ANON}; use libc::MAP_FAILED; diff --git a/src/libstd/sys_common/util.rs b/src/libstd/sys_common/util.rs index b547d941f3b..206443a6736 100644 --- a/src/libstd/sys_common/util.rs +++ b/src/libstd/sys_common/util.rs @@ -11,7 +11,7 @@ pub fn dumb_print(args: fmt::Arguments) { // Other platforms should use the appropriate platform-specific mechanism for // aborting the process. If no platform-specific mechanism is available, -// ::intrinsics::abort() may be used instead. The above implementations cover +// crate::intrinsics::abort() may be used instead. The above implementations cover // all targets currently supported by libstd. pub fn abort(args: fmt::Arguments) -> ! { -- cgit 1.4.1-3-g733a5