From 01560112b8dda59d7e45b33d4d344dfdea589ea2 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 27 Mar 2015 11:29:36 -0700 Subject: [PATCH] Test fixes and rebase conflicts, round 1 --- src/doc/trpl/lang-items.md | 2 +- src/doc/trpl/no-stdlib.md | 4 ++-- src/doc/trpl/tracing-macros.md | 3 ++- src/doc/trpl/unstable.md | 1 + src/libcore/option.rs | 2 +- src/libcoretest/option.rs | 3 --- src/librustc_borrowck/lib.rs | 1 - src/librustc_resolve/lib.rs | 1 - 8 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 src/doc/trpl/unstable.md diff --git a/src/doc/trpl/lang-items.md b/src/doc/trpl/lang-items.md index 30ab59cc0291..5c27c03e8e0b 100644 --- a/src/doc/trpl/lang-items.md +++ b/src/doc/trpl/lang-items.md @@ -16,7 +16,7 @@ and one for deallocation. A freestanding program that uses the `Box` sugar for dynamic allocations via `malloc` and `free`: ``` -#![feature(lang_items, box_syntax, start, no_std)] +#![feature(lang_items, box_syntax, start, no_std, libc)] #![no_std] extern crate libc; diff --git a/src/doc/trpl/no-stdlib.md b/src/doc/trpl/no-stdlib.md index 539a0729ba33..094c82a08cc9 100644 --- a/src/doc/trpl/no-stdlib.md +++ b/src/doc/trpl/no-stdlib.md @@ -21,7 +21,7 @@ The function marked `#[start]` is passed the command line parameters in the same format as C: ``` -#![feature(lang_items, start, no_std)] +#![feature(lang_items, start, no_std, libc)] #![no_std] // Pull in the system libc library for what crt0.o likely requires @@ -104,7 +104,7 @@ As an example, here is a program that will calculate the dot product of two vectors provided from C, using idiomatic Rust practices. ``` -#![feature(lang_items, start, no_std)] +#![feature(lang_items, start, no_std, core, libc)] #![no_std] # extern crate libc; diff --git a/src/doc/trpl/tracing-macros.md b/src/doc/trpl/tracing-macros.md index bc337f30515a..6226ea9f3e75 100644 --- a/src/doc/trpl/tracing-macros.md +++ b/src/doc/trpl/tracing-macros.md @@ -31,7 +31,7 @@ macro_rules! bct { This is pretty complex! we can see the output - ```rust +```rust,ignore #![feature(trace_macros)] macro_rules! bct { @@ -61,6 +61,7 @@ fn main() { bct!(0, 0, 1, 1, 1 ; 1, 0, 1); } +``` This will print out a wall of text: diff --git a/src/doc/trpl/unstable.md b/src/doc/trpl/unstable.md new file mode 100644 index 000000000000..e8e02cc9d092 --- /dev/null +++ b/src/doc/trpl/unstable.md @@ -0,0 +1 @@ +% Unstable Rust diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 368d56f515e5..6d9b93e9be07 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -151,7 +151,7 @@ use default::Default; use iter::{ExactSizeIterator}; use iter::{Iterator, IteratorExt, DoubleEndedIterator, FromIterator, IntoIterator}; use mem; -use ops::{Deref, FnOnce}; +use ops::FnOnce; use result::Result::{Ok, Err}; use result::Result; #[allow(deprecated)] diff --git a/src/libcoretest/option.rs b/src/libcoretest/option.rs index 1a7d8f83d701..569142c0d7dc 100644 --- a/src/libcoretest/option.rs +++ b/src/libcoretest/option.rs @@ -258,9 +258,6 @@ fn test_cloned() { assert_eq!(opt_none.clone(), None); assert_eq!(opt_none.cloned(), None); - // Mutable refs work - assert_eq!(opt_mut_ref.cloned(), Some(2u32)); - // Immutable ref works assert_eq!(opt_ref.clone(), Some(&val1)); assert_eq!(opt_ref.cloned(), Some(1u32)); diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs index 516e4b26faa9..54feed930a80 100644 --- a/src/librustc_borrowck/lib.rs +++ b/src/librustc_borrowck/lib.rs @@ -21,7 +21,6 @@ #![allow(non_camel_case_types)] -#![feature(core)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 808891013c61..24278af48a96 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -21,7 +21,6 @@ #![feature(alloc)] #![feature(collections)] -#![feature(core)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] #![feature(staged_api)]