rollup merge of #20721: japaric/snap
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustc/lint/builtin.rs src/librustc/session/config.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/context.rs src/librustc_trans/trans/type_.rs src/librustc_typeck/check/_match.rs src/librustdoc/html/format.rs src/libsyntax/std_inject.rs src/libsyntax/util/interner.rs src/test/compile-fail/mut-pattern-mismatched.rs
This commit is contained in:
commit
6e806bdefd
236 changed files with 2421 additions and 2495 deletions
|
|
@ -38,8 +38,6 @@
|
|||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
// OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::{cmp, iter, mem};
|
||||
use std::thread::Thread;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
// OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::cmp::min;
|
||||
use std::io::{stdout, IoResult};
|
||||
use std::iter::repeat;
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
// OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::cmp::min;
|
||||
use std::io::{BufferedWriter, File};
|
||||
use std::io;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
// multi tasking k-nucleotide
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::ascii::{AsciiExt, OwnedAsciiExt};
|
||||
use std::cmp::Ordering::{self, Less, Greater, Equal};
|
||||
use std::collections::HashMap;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@
|
|||
|
||||
// ignore-android see #10393 #13206
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::ascii::OwnedAsciiExt;
|
||||
use std::iter::repeat;
|
||||
use std::slice;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> {
|
|||
// translating to (0, 0) as minimum coordinates.
|
||||
for cur_piece in res.iter_mut() {
|
||||
let (dy, dx) = *cur_piece.iter().min_by(|e| *e).unwrap();
|
||||
for &(ref mut y, ref mut x) in cur_piece.iter_mut() {
|
||||
for &mut (ref mut y, ref mut x) in cur_piece.iter_mut() {
|
||||
*y -= dy; *x -= dx;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@
|
|||
// ignore-stage1
|
||||
// ignore-cross-compile #12102
|
||||
|
||||
#![feature(plugin, slicing_syntax)]
|
||||
|
||||
extern crate regex;
|
||||
|
||||
use std::io;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// ignore-android see #10393 #13206
|
||||
|
||||
#![feature(slicing_syntax, unboxed_closures)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
extern crate libc;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use std::slice::ChunksMut;
|
|||
fn dft_iter<'a, T>(arg1: Chunks<'a,T>, arg2: ChunksMut<'a,T>)
|
||||
{
|
||||
for
|
||||
&something
|
||||
&mut something
|
||||
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[T]`
|
||||
in arg2
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,10 +13,8 @@ fn main() {
|
|||
|
||||
// (separate lines to ensure the spans are accurate)
|
||||
|
||||
// SNAP 9e4e524 uncomment this after the next snapshot
|
||||
// NOTE(stage0) just in case tidy doesn't check snap's in tests
|
||||
// let &_ // ~ ERROR expected `&mut isize`, found `&_`
|
||||
// = foo;
|
||||
let &_ //~ ERROR expected `&mut isize`, found `&_`
|
||||
= foo;
|
||||
let &mut _ = foo;
|
||||
|
||||
let bar = &1is;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@
|
|||
|
||||
// error-pattern: transmute called on types with different size
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::mem;
|
||||
|
||||
#[repr(packed)]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ enum Option<T> {
|
|||
|
||||
fn main() {
|
||||
match &mut Some(1i) {
|
||||
ref mut z @ &Some(ref a) => {
|
||||
ref mut z @ &mut Some(ref a) => {
|
||||
//~^ ERROR pattern bindings are not allowed after an `@`
|
||||
**z = None;
|
||||
println!("{}", *a);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
// Test range syntax - type errors.
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
// Mixed types.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
// Test range syntax - borrow errors.
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
let r = {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test that slicing syntax gives errors if we have not implemented the trait.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
struct Foo;
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test slicing expressions doesn't defeat the borrow checker.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn main() {
|
||||
let y;
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test mutability and slicing syntax.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn main() {
|
||||
let x: &[int] = &[1, 2, 3, 4, 5];
|
||||
// Can't mutably slice an immutable slice
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test mutability and slicing syntax.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn main() {
|
||||
let x: &[int] = &[1, 2, 3, 4, 5];
|
||||
// Immutable slices are not mutable.
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@
|
|||
// lldb-check:[...]$5 = &[AStruct { x: 10, y: 11, z: 12 }, AStruct { x: 13, y: 14, z: 15 }]
|
||||
|
||||
#![allow(unused_variables)]
|
||||
#![feature(slicing_syntax)]
|
||||
#![omit_gdb_pretty_printer_section]
|
||||
|
||||
struct AStruct {
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ enum Foo {
|
|||
impl Drop for Foo {
|
||||
fn drop(&mut self) {
|
||||
match self {
|
||||
&Foo::SimpleVariant(ref mut sender) => {
|
||||
&mut Foo::SimpleVariant(ref mut sender) => {
|
||||
sender.send(Message::DestructorRan).unwrap();
|
||||
}
|
||||
&Foo::NestedVariant(_, _, ref mut sender) => {
|
||||
&mut Foo::NestedVariant(_, _, ref mut sender) => {
|
||||
sender.send(Message::DestructorRan).unwrap();
|
||||
}
|
||||
&Foo::FailingVariant { .. } => {
|
||||
&mut Foo::FailingVariant { .. } => {
|
||||
panic!("Failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn main() {
|
||||
let mut array = [1, 2, 3];
|
||||
let pie_slice = &array[1..2];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ impl Deref for X {
|
|||
|
||||
impl DerefMut for X {
|
||||
fn deref_mut(&mut self) -> &mut int {
|
||||
let &X(box ref mut x) = self;
|
||||
let &mut X(box ref mut x) = self;
|
||||
x
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn main() {
|
||||
let s: &[int] = &[0, 1, 2, 3, 4];
|
||||
let ss: &&[int] = &s;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
// A reduced version of the rustbook ice. The problem this encountered
|
||||
// had to do with trans ignoring binders.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
#![feature(associated_types)]
|
||||
#![feature(macro_rules)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] {
|
||||
&v[1..5]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn broken(v: &[u8], i: uint, j: uint) -> &[u8] { &v[i..j] }
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn assert_repr_eq<T: std::fmt::Show>(obj : T, expected : String) {
|
||||
assert_eq!(expected, format!("{:?}", obj));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test range syntax.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn foo() -> int { 42 }
|
||||
|
||||
pub fn main() {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
let x = [ [true]; 512 ];
|
||||
let y = [ 0i; 1 ];
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test slicing expressions on slices and Vecs.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
fn main() {
|
||||
let x: &[int] = &[1, 2, 3, 4, 5];
|
||||
let cmp: &[int] = &[1, 2, 3, 4, 5];
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test that if a slicing expr[..] fails, the correct cleanups happen.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::thread::Thread;
|
||||
|
||||
struct Foo;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// Test that if a slicing expr[..] fails, the correct cleanups happen.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
||||
use std::thread::Thread;
|
||||
|
||||
struct Foo;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,10 @@
|
|||
|
||||
// Test slicing sugar.
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
#![feature(associated_types)]
|
||||
|
||||
extern crate core;
|
||||
use core::ops::{Index, Range, RangeTo, RangeFrom, FullRange};
|
||||
use core::ops::{Index, IndexMut, Range, RangeTo, RangeFrom, FullRange};
|
||||
|
||||
static mut COUNT: uint = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue