mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Test fixes and rebase conflicts, round 1
This commit is contained in:
parent
e361b25c5e
commit
01560112b8
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
||||
|
1
src/doc/trpl/unstable.md
Normal file
1
src/doc/trpl/unstable.md
Normal file
@ -0,0 +1 @@
|
||||
% Unstable Rust
|
@ -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)]
|
||||
|
@ -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));
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#![feature(core)]
|
||||
#![feature(quote)]
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
#![feature(rustc_private)]
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#![feature(alloc)]
|
||||
#![feature(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(staged_api)]
|
||||
|
Loading…
Reference in New Issue
Block a user