diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs
index 14d61edca043..5e08f90ce1c5 100644
--- a/src/libcollections/dlist.rs
+++ b/src/libcollections/dlist.rs
@@ -1066,6 +1066,7 @@ mod tests {
}
#[allow(deprecated)]
+ #[test]
fn test_append() {
{
let mut m = DList::new();
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 9a2245501a81..e5753f6cc2e7 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -1171,134 +1171,6 @@ impl_multiplicative! { uint, 1 }
impl_multiplicative! { f32, 1.0 }
impl_multiplicative! { f64, 1.0 }
-<<<<<<< HEAD
-=======
-/// A trait for iterators over elements which can be compared to one another.
-#[unstable = "recently renamed for new extension trait conventions"]
-pub trait IteratorOrdExt {
- /// Consumes the entire iterator to return the maximum element.
- ///
- /// # Example
- ///
- /// ```rust
- /// let a = [1i, 2, 3, 4, 5];
- /// assert!(a.iter().max().unwrap() == &5);
- /// ```
- fn max(self) -> Option;
-
- /// Consumes the entire iterator to return the minimum element.
- ///
- /// # Example
- ///
- /// ```rust
- /// let a = [1i, 2, 3, 4, 5];
- /// assert!(a.iter().min().unwrap() == &1);
- /// ```
- fn min(self) -> Option;
-
- /// `min_max` finds the minimum and maximum elements in the iterator.
- ///
- /// The return type `MinMaxResult` is an enum of three variants:
- ///
- /// - `NoElements` if the iterator is empty.
- /// - `OneElement(x)` if the iterator has exactly one element.
- /// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two
- /// values are equal if and only if there is more than one
- /// element in the iterator and all elements are equal.
- ///
- /// On an iterator of length `n`, `min_max` does `1.5 * n` comparisons,
- /// and so is faster than calling `min` and `max` separately which does `2 * n` comparisons.
- ///
- /// # Example
- ///
- /// ```rust
- /// use std::iter::MinMaxResult::{NoElements, OneElement, MinMax};
- ///
- /// let v: [int; 0] = [];
- /// assert_eq!(v.iter().min_max(), NoElements);
- ///
- /// let v = [1i];
- /// assert!(v.iter().min_max() == OneElement(&1));
- ///
- /// let v = [1i, 2, 3, 4, 5];
- /// assert!(v.iter().min_max() == MinMax(&1, &5));
- ///
- /// let v = [1i, 2, 3, 4, 5, 6];
- /// assert!(v.iter().min_max() == MinMax(&1, &6));
- ///
- /// let v = [1i, 1, 1, 1];
- /// assert!(v.iter().min_max() == MinMax(&1, &1));
- /// ```
- fn min_max(self) -> MinMaxResult;
-}
-
-#[unstable = "trait is unstable"]
-impl IteratorOrdExt for I where I: Iterator- , T: Ord {
- #[inline]
- fn max(self) -> Option {
- self.fold(None, |max, x| {
- match max {
- None => Some(x),
- Some(y) => Some(cmp::max(x, y))
- }
- })
- }
-
- #[inline]
- fn min(self) -> Option {
- self.fold(None, |min, x| {
- match min {
- None => Some(x),
- Some(y) => Some(cmp::min(x, y))
- }
- })
- }
-
- fn min_max(mut self) -> MinMaxResult {
- let (mut min, mut max) = match self.next() {
- None => return NoElements,
- Some(x) => {
- match self.next() {
- None => return OneElement(x),
- Some(y) => if x < y {(x, y)} else {(y,x)}
- }
- }
- };
-
- loop {
- // `first` and `second` are the two next elements we want to look at.
- // We first compare `first` and `second` (#1). The smaller one is then compared to
- // current minimum (#2). The larger one is compared to current maximum (#3). This
- // way we do 3 comparisons for 2 elements.
- let first = match self.next() {
- None => break,
- Some(x) => x
- };
- let second = match self.next() {
- None => {
- if first < min {
- min = first;
- } else if first > max {
- max = first;
- }
- break;
- }
- Some(x) => x
- };
- if first < second {
- if first < min {min = first;}
- if max < second {max = second;}
- } else {
- if second < min {min = second;}
- if max < first {max = first;}
- }
- }
-
- MinMax(min, max)
- }
-}
-
->>>>>>> parent of f031671... Remove i suffix in docs
/// `MinMaxResult` is an enum returned by `min_max`. See `IteratorOrdExt::min_max` for more detail.
#[derive(Clone, PartialEq, Show)]
#[unstable = "unclear whether such a fine-grained result is widely useful"]
@@ -1386,35 +1258,6 @@ impl ExactSizeIterator for Cloned where
I: ExactSizeIterator + Iterator
- ,
{}
-<<<<<<< HEAD
-=======
-#[unstable = "recently renamed for extension trait conventions"]
-/// An extension trait for cloneable iterators.
-pub trait CloneIteratorExt {
- /// Repeats an iterator endlessly
- ///
- /// # Example
- ///
- /// ```rust
- /// use std::iter::{CloneIteratorExt, count};
- ///
- /// let a = count(1i,1i).take(1);
- /// let mut cy = a.cycle();
- /// assert_eq!(cy.next(), Some(1));
- /// assert_eq!(cy.next(), Some(1));
- /// ```
- #[stable]
- fn cycle(self) -> Cycle;
-}
-
-impl CloneIteratorExt for I where I: Iterator + Clone {
- #[inline]
- fn cycle(self) -> Cycle {
- Cycle{orig: self.clone(), iter: self}
- }
-}
-
->>>>>>> parent of f031671... Remove i suffix in docs
/// An iterator that repeats endlessly
#[derive(Clone, Copy)]
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs
index 2aa2a229f90f..73db72d0313e 100644
--- a/src/libcoretest/iter.rs
+++ b/src/libcoretest/iter.rs
@@ -769,7 +769,7 @@ fn test_range_step_inclusive() {
#[test]
fn test_reverse() {
let mut ys = [1i, 2, 3, 4, 5];
- ys.iter_mut().reverse_();
+ ys.iter_mut().reverse_in_place();
assert!(ys == [5, 4, 3, 2, 1]);
}
diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs
index e3bcf70e8c82..64cc490f4b16 100644
--- a/src/libgraphviz/lib.rs
+++ b/src/libgraphviz/lib.rs
@@ -587,7 +587,7 @@ pub fn render_opts<'a, N:Clone+'a, E:Clone+'a, G:Labeller<'a,N,E>+GraphWalk<'a,N
mod tests {
use self::NodeLabels::*;
use super::{Id, Labeller, Nodes, Edges, GraphWalk, render};
- use super::LabelText::{mod, LabelStr, EscStr};
+ use super::LabelText::{self, LabelStr, EscStr};
use std::io::IoResult;
use std::borrow::IntoCow;
use std::iter::repeat;
diff --git a/src/librand/chacha.rs b/src/librand/chacha.rs
index ce055a84d3f2..815fc0e7ec7a 100644
--- a/src/librand/chacha.rs
+++ b/src/librand/chacha.rs
@@ -27,7 +27,7 @@ const CHACHA_ROUNDS: uint = 20; // Cryptographically secure from 8 upwards as of
///
/// [1]: D. J. Bernstein, [*ChaCha, a variant of
/// Salsa20*](http://cr.yp.to/chacha.html)
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
pub struct ChaChaRng {
buffer: [u32; STATE_WORDS], // Internal buffer of output
state: [u32; STATE_WORDS], // Initial state
@@ -284,7 +284,7 @@ mod test {
#[test]
fn test_rng_clone() {
- let seed : &[_] = &[0u32, ..8];
+ let seed : &[_] = &[0u32; 8];
let mut rng: ChaChaRng = SeedableRng::from_seed(seed);
let mut clone = rng.clone();
for _ in range(0u, 16) {
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index 8eae76973761..c4dd08f9917e 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -403,7 +403,7 @@ pub trait SeedableRng: Rng {
/// RNGs"](http://www.jstatsoft.org/v08/i14/paper). *Journal of
/// Statistical Software*. Vol. 8 (Issue 14).
#[allow(missing_copy_implementations)]
-#[deriving(Clone)]
+#[derive(Clone)]
pub struct XorShiftRng {
x: u32,
y: u32,
diff --git a/src/librustc/middle/infer/region_inference/mod.rs b/src/librustc/middle/infer/region_inference/mod.rs
index 23e96dafa611..d30a6ff1cd9d 100644
--- a/src/librustc/middle/infer/region_inference/mod.rs
+++ b/src/librustc/middle/infer/region_inference/mod.rs
@@ -22,7 +22,7 @@ use super::cres;
use super::{RegionVariableOrigin, SubregionOrigin, TypeTrace, MiscVariable};
use middle::region;
-use middle::ty::{mod, Ty};
+use middle::ty::{self, Ty};
use middle::ty::{BoundRegion, FreeRegion, Region, RegionVid};
use middle::ty::{ReEmpty, ReStatic, ReInfer, ReFree, ReEarlyBound};
use middle::ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
@@ -69,7 +69,7 @@ pub enum Verify<'tcx> {
VerifyGenericBound(GenericKind<'tcx>, SubregionOrigin<'tcx>, Region, Vec),
}
-#[deriving(Clone, Show, PartialEq, Eq)]
+#[derive(Clone, Show, PartialEq, Eq)]
pub enum GenericKind<'tcx> {
Param(ty::ParamTy),
Projection(ty::ProjectionTy<'tcx>),
diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs
index 089d7f737d3c..98e2b4b9dddb 100644
--- a/src/librustc_trans/back/write.rs
+++ b/src/librustc_trans/back/write.rs
@@ -22,7 +22,7 @@ use syntax::codemap;
use syntax::diagnostic;
use syntax::diagnostic::{Emitter, Handler, Level, mk_handler};
-use std::ffi::{mod, CString};
+use std::ffi::{self, CString};
use std::io::Command;
use std::io::fs;
use std::iter::Unfold;
@@ -32,7 +32,7 @@ use std::mem;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::channel;
use std::thread;
-use libc::{mod, c_uint, c_int, c_void};
+use libc::{self, c_uint, c_int, c_void};
#[derive(Clone, Copy, PartialEq, PartialOrd, Ord, Eq)]
pub enum OutputType {
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs
index 7031710c679a..edcfaae0f802 100644
--- a/src/librustc_trans/trans/base.rs
+++ b/src/librustc_trans/trans/base.rs
@@ -88,7 +88,7 @@ use util::nodemap::NodeMap;
use arena::TypedArena;
use libc::{c_uint, uint64_t};
-use std::ffi::{mod, CString};
+use std::ffi::{self, CString};
use std::cell::{Cell, RefCell};
use std::collections::HashSet;
use std::mem;
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index c5b5325e9d44..80e7e7060595 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -195,10 +195,10 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
ast::PatRegion(ref inner, mutbl) => {
let inner_ty = fcx.infcx().next_ty_var();
- // SNAP c894171 remove this `if`-`else` entirely after next snapshot
+ // SNAP b2085d9 remove this `if`-`else` entirely after next snapshot
let mutbl = if mutbl == ast::MutImmutable {
ty::deref(fcx.infcx().shallow_resolve(expected), true)
- .map(|mt| mt.mutbl).unwrap_or(ast::MutImmutable);
+ .map(|mt| mt.mutbl).unwrap_or(ast::MutImmutable)
} else {
mutbl
};
diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs
index b7397b5f9ee6..c7df5ed8453f 100644
--- a/src/librustc_typeck/check/regionck.rs
+++ b/src/librustc_typeck/check/regionck.rs
@@ -92,7 +92,7 @@ use middle::region::CodeExtent;
use middle::traits;
use middle::ty::{ReScope};
use middle::ty::{self, Ty, MethodCall};
-use middle::infer::{mod, GenericKind};
+use middle::infer::{self, GenericKind};
use middle::pat_util;
use util::ppaux::{ty_to_string, Repr};
diff --git a/src/libserialize/json_stage0.rs b/src/libserialize/json_stage0.rs
index 9932f8d0306b..a157d9172749 100644
--- a/src/libserialize/json_stage0.rs
+++ b/src/libserialize/json_stage0.rs
@@ -2298,7 +2298,7 @@ impl ::Decoder for Decoder {
}
/// A trait for converting values to JSON
-pub trait ToJson for Sized? {
+pub trait ToJson {
/// Converts the value of `self` to an instance of JSON
fn to_json(&self) -> Json;
}
diff --git a/src/libserialize/serialize_stage0.rs b/src/libserialize/serialize_stage0.rs
index c4317b99dce0..fd37bb63230a 100644
--- a/src/libserialize/serialize_stage0.rs
+++ b/src/libserialize/serialize_stage0.rs
@@ -172,7 +172,7 @@ pub trait Decoder {
fn error(&mut self, err: &str) -> E;
}
-pub trait Encodable, E> for Sized? {
+pub trait Encodable, E> {
fn encode(&self, s: &mut S) -> Result<(), E>;
}
diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs
index 66cb1f2c948d..2d013a8a5b83 100644
--- a/src/libstd/dynamic_lib.rs
+++ b/src/libstd/dynamic_lib.rs
@@ -128,8 +128,8 @@ impl DynamicLibrary {
// This function should have a lifetime constraint of 'a on
// T but that feature is still unimplemented
+ let raw_string = CString::from_slice(symbol.as_bytes());
let maybe_symbol_value = dl::check_for_errors_in(|| {
- let raw_string = CString::from_slice(symbol.as_bytes());
dl::symbol(self.handle, raw_string.as_ptr())
});
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index e937cd24d8d7..b9f226c5aca7 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -253,8 +253,6 @@ pub mod num;
/* Runtime and platform support */
-pub mod thread_local; // first for macros
-
#[cfg_attr(stage0, macro_escape)]
#[cfg_attr(not(stage0), macro_use)]
pub mod thread_local;
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index cadaae5de5c2..8855a7e5293a 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -245,7 +245,7 @@ pub mod reader;
/// The standard RNG. This is designed to be efficient on the current
/// platform.
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
pub struct StdRng {
rng: IsaacWordRng,
}
@@ -322,7 +322,7 @@ static THREAD_RNG_RESEED_THRESHOLD: uint = 32_768;
type ThreadRngInner = reseeding::ReseedingRng;
/// The thread-local RNG.
-#[deriving(Clone)]
+#[derive(Clone)]
pub struct ThreadRng {
rng: Rc>,
}
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 9b3f2ca03736..7b667416b171 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -466,19 +466,17 @@ fn free_handle(handle: *mut ()) {
#[cfg(test)]
mod tests {
- use c_str::ToCStr;
+ use prelude::v1::*;
+ use str;
+ use ffi::CString;
+ use super::make_command_line;
#[test]
fn test_make_command_line() {
- use prelude::v1::*;
- use str;
- use c_str::CString;
- use super::make_command_line;
-
fn test_wrapper(prog: &str, args: &[&str]) -> String {
- make_command_line(&prog.to_c_str(),
+ make_command_line(&CString::from_slice(prog.as_bytes()),
args.iter()
- .map(|a| a.to_c_str())
+ .map(|a| CString::from_slice(a.as_bytes()))
.collect::>()
.as_slice())
}
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 43e403933083..0810d4ee93ac 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -267,7 +267,7 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
}
}
- ast::ItemImpl(_, polarity, _, _, _, ref items) => {
+ ast::ItemImpl(_, polarity, _, _, _, _) => {
match polarity {
ast::ImplPolarity::Negative => {
self.gate_feature("optin_builtin_traits",
@@ -294,18 +294,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
i.span,
"the new orphan check rules will eventually be strictly enforced");
}
-
- for item in items.iter() {
- match *item {
- ast::MethodImplItem(_) => {}
- ast::TypeImplItem(ref typedef) => {
- self.gate_feature("associated_types",
- typedef.span,
- "associated types are \
- experimental")
- }
- }
- }
}
_ => {}
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cdfbd2c74b6a..32f8f5ee3d63 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1244,7 +1244,7 @@ impl<'a> Parser<'a> {
let _ = self.parse_ret_ty();
- self.obsolete(ty_closure_span, ObsoleteClosureType);
+ self.obsolete(ty_closure_span, ObsoleteSyntax::ClosureType);
TyInfer
}
@@ -3897,16 +3897,10 @@ impl<'a> Parser<'a> {
_ => {
let e = self.mk_mac_expr(span.lo,
span.hi,
-<<<<<<< HEAD
- macro.and_then(|m| m.node));
+ mac.and_then(|m| m.node));
let e = self.parse_dot_or_call_expr_with(e);
let e = self.parse_more_binops(e, 0);
let e = self.parse_assign_expr_with(e);
-=======
- mac.and_then(|m| m.node));
- let e =
- self.parse_dot_or_call_expr_with(e);
->>>>>>> kmc/macro-reform
self.handle_expression_like_statement(
e,
ast::DUMMY_NODE_ID,
@@ -5082,7 +5076,7 @@ impl<'a> Parser<'a> {
}
let _tref = Parser::trait_ref_from_ident(ident, span);
- self.obsolete(span, ObsoleteForSized);
+ self.obsolete(span, ObsoleteSyntax::ForSized);
None
} else {
diff --git a/src/libsyntax/show_span.rs b/src/libsyntax/show_span.rs
index 51d655ec0f2c..57520257fe1b 100644
--- a/src/libsyntax/show_span.rs
+++ b/src/libsyntax/show_span.rs
@@ -65,8 +65,8 @@ impl<'a, 'v> Visitor<'v> for ShowSpanVisitor<'a> {
visit::walk_ty(self, t);
}
- fn visit_mac(&mut self, macro: &ast::Mac) {
- visit::walk_mac(self, macro);
+ fn visit_mac(&mut self, mac: &ast::Mac) {
+ visit::walk_mac(self, mac);
}
}
diff --git a/src/test/auxiliary/traitimpl.rs b/src/test/auxiliary/traitimpl.rs
index fd454509b394..33824af6187a 100644
--- a/src/test/auxiliary/traitimpl.rs
+++ b/src/test/auxiliary/traitimpl.rs
@@ -10,7 +10,7 @@
// Test inherant trait impls work cross-crait.
-pub trait Bar<'a> for ?Sized : 'a {}
+pub trait Bar<'a> : 'a {}
impl<'a> Bar<'a> {
pub fn bar(&self) {}
diff --git a/src/test/auxiliary/two_macros.rs b/src/test/auxiliary/two_macros.rs
index 11b6108b99ed..060960f0dbc8 100644
--- a/src/test/auxiliary/two_macros.rs
+++ b/src/test/auxiliary/two_macros.rs
@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// force-host
-
#[macro_export]
macro_rules! macro_one { () => ("one") }
diff --git a/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs b/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
index 6555aa320277..c55e24e81adc 100644
--- a/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
+++ b/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
@@ -11,8 +11,6 @@
// Test equality constraints in a where clause where the type being
// equated appears in a supertrait.
-#![feature(associated_types)]
-
pub trait Vehicle {
type Color;
diff --git a/src/test/compile-fail/associated-type-projection-from-supertrait.rs b/src/test/compile-fail/associated-type-projection-from-supertrait.rs
index 01f9bd3541fc..abaf79fb4cb1 100644
--- a/src/test/compile-fail/associated-type-projection-from-supertrait.rs
+++ b/src/test/compile-fail/associated-type-projection-from-supertrait.rs
@@ -11,8 +11,6 @@
// Test equality constraints in a where clause where the type being
// equated appears in a supertrait.
-#![feature(associated_types)]
-
pub trait Vehicle {
type Color;
diff --git a/src/test/compile-fail/associated-types-binding-to-type-defined-in-supertrait.rs b/src/test/compile-fail/associated-types-binding-to-type-defined-in-supertrait.rs
index a362529bee8e..b1194154911c 100644
--- a/src/test/compile-fail/associated-types-binding-to-type-defined-in-supertrait.rs
+++ b/src/test/compile-fail/associated-types-binding-to-type-defined-in-supertrait.rs
@@ -11,8 +11,6 @@
// Test equality constraints in a where clause where the type being
// equated appears in a supertrait.
-#![feature(associated_types)]
-
pub trait Vehicle {
type Color;
diff --git a/src/test/compile-fail/associated-types-feature-gate.rs b/src/test/compile-fail/associated-types-feature-gate.rs
deleted file mode 100644
index d95b94f00676..000000000000
--- a/src/test/compile-fail/associated-types-feature-gate.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Get {
- type Value; //~ ERROR associated types are experimental
- fn get(&self) -> Get::Value;
-}
-
-struct Struct {
- x: int,
-}
-
-impl Get for Struct {
- type Value = int; //~ ERROR associated types are experimental
- fn get(&self) -> int {
- self.x
- }
-}
-
-fn main() {
- let s = Struct {
- x: 100,
- };
- assert_eq!(s.get(), 100);
-}
-
diff --git a/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs b/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
index 8afd86195ff5..b04b83e575bf 100644
--- a/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
+++ b/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
@@ -11,8 +11,6 @@
// Test that we report an error if the trait ref in an qualified type
// uses invalid type arguments.
-#![feature(associated_types)]
-
trait Foo {
type Bar;
fn get_bar(&self) -> Self::Bar;
diff --git a/src/test/compile-fail/associated-types-issue-17359.rs b/src/test/compile-fail/associated-types-issue-17359.rs
index 764b79c4cc64..6c79105abee8 100644
--- a/src/test/compile-fail/associated-types-issue-17359.rs
+++ b/src/test/compile-fail/associated-types-issue-17359.rs
@@ -11,8 +11,6 @@
// Test that we do not ICE when an impl is missing an associated type (and that we report
// a useful error, of course).
-#![feature(associated_types)]
-
trait Trait {
type Type;
}
diff --git a/src/test/compile-fail/gated-default-type-param-usage.rs b/src/test/compile-fail/gated-default-type-param-usage.rs
deleted file mode 100644
index 4c8b5de4c864..000000000000
--- a/src/test/compile-fail/gated-default-type-param-usage.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// aux-build:default_type_params_xc.rs
-
-#![deny(default_type_param_usage)]
-
-extern crate default_type_params_xc;
-
-pub struct FooAlloc;
-
-pub type VecFoo = default_type_params_xc::FakeVec;
-//~^ ERROR: default type parameters are experimental
-
-fn main() {}
diff --git a/src/test/compile-fail/gated-default-type-params.rs b/src/test/compile-fail/gated-default-type-params.rs
deleted file mode 100644
index 65575d4fa850..000000000000
--- a/src/test/compile-fail/gated-default-type-params.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Heap;
-
-struct Vec; //~ ERROR: default type parameters are experimental
-
-fn main() {}
diff --git a/src/test/compile-fail/gated-glob-imports.rs b/src/test/compile-fail/gated-glob-imports.rs
deleted file mode 100644
index cc7ba785e7e6..000000000000
--- a/src/test/compile-fail/gated-glob-imports.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 or the MIT license
-// , at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::*;
-//~^ ERROR: glob import statements are experimental
-
-fn main() {}
diff --git a/src/test/compile-fail/macros-no-semicolon.rs b/src/test/compile-fail/macros-no-semicolon.rs
index fd5f5866f094..0e85551e2161 100644
--- a/src/test/compile-fail/macros-no-semicolon.rs
+++ b/src/test/compile-fail/macros-no-semicolon.rs
@@ -10,7 +10,7 @@
fn main() {
assert!(1 == 2)
- assert!(3 == 4) //~ ERROR expected one of `.`, `;`, or `}`, found `assert`
+ assert!(3 == 4) //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `assert`
println!("hello");
}
diff --git a/src/test/compile-fail/mut-pattern-mismatched.rs b/src/test/compile-fail/mut-pattern-mismatched.rs
index 74e6141a2b3f..81985a3d6aa5 100644
--- a/src/test/compile-fail/mut-pattern-mismatched.rs
+++ b/src/test/compile-fail/mut-pattern-mismatched.rs
@@ -13,8 +13,8 @@ fn main() {
// (separate lines to ensure the spans are accurate)
- // SNAP c894171 uncomment this after the next snapshot
- // NOTE(stage0) just in case tidy doesn't check SNAP's in tests
+ // SNAP b2085d9 uncomment this after the next snapshot
+ // NOTE(stage0) just in case tidy doesn't check snap's in tests
// let &_ // ~ ERROR expected `&mut int`, found `&_`
// = foo;
let &mut _ = foo;
diff --git a/src/test/compile-fail/regions-close-associated-type-into-object.rs b/src/test/compile-fail/regions-close-associated-type-into-object.rs
index 84664078d562..816314529b5e 100644
--- a/src/test/compile-fail/regions-close-associated-type-into-object.rs
+++ b/src/test/compile-fail/regions-close-associated-type-into-object.rs
@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(associated_types)]
-
trait X {}
trait Iter {
diff --git a/src/test/compile-fail/unsized3.rs b/src/test/compile-fail/unsized3.rs
index 1b0368a351ab..9b7d10b0d0f7 100644
--- a/src/test/compile-fail/unsized3.rs
+++ b/src/test/compile-fail/unsized3.rs
@@ -20,7 +20,7 @@ fn f2(x: &X) {
}
// Bounded.
-trait T for {}
+trait T {}
fn f3(x: &X) {
f4::(x);
//~^ ERROR the trait `core::kinds::Sized` is not implemented
diff --git a/src/test/run-pass/const-str-ptr.rs b/src/test/run-pass/const-str-ptr.rs
index 1a84236793b4..e846501be6ee 100644
--- a/src/test/run-pass/const-str-ptr.rs
+++ b/src/test/run-pass/const-str-ptr.rs
@@ -18,8 +18,6 @@ pub fn main() {
unsafe {
let foo = &A as *const u8;
assert_eq!(str::from_utf8_unchecked(&A), "hi");
- assert_eq!(String::from_raw_buf_len(foo, A.len()), "hi".to_string());
- assert_eq!(String::from_raw_buf_len(C, B.len()), "hi".to_string());
assert!(*C == A[0]);
assert!(*(&B[0] as *const u8) == A[0]);
}
diff --git a/src/test/run-pass/method-recursive-blanket-impl.rs b/src/test/run-pass/method-recursive-blanket-impl.rs
index 4e4fb75b428c..e81244d4beab 100644
--- a/src/test/run-pass/method-recursive-blanket-impl.rs
+++ b/src/test/run-pass/method-recursive-blanket-impl.rs
@@ -16,7 +16,7 @@
use std::kinds::Sized;
// Note: this must be generic for the problem to show up
-trait Foo for ?Sized {
+trait Foo {
fn foo(&self);
}
diff --git a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs
index aa0ed023da3e..2bdc883b9ce5 100644
--- a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs
+++ b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs
@@ -27,7 +27,7 @@ struct Foo<'a,'tcx:'a> {
impl<'a,'tcx> Foo<'a,'tcx> {
fn bother(&mut self) -> int {
- self.elaborate_bounds(|this| {
+ self.elaborate_bounds(box |this| {
// (*) Here: type of `this` is `&'f0 Foo<&'f1, '_2>`,
// where `'f0` and `'f1` are fresh, free regions that
// result from the bound regions on the closure, and `'2`
@@ -50,7 +50,7 @@ impl<'a,'tcx> Foo<'a,'tcx> {
fn elaborate_bounds(
&mut self,
- mk_cand: for<'b>|this: &mut Foo<'b, 'tcx>| -> int)
+ mut mk_cand: Box FnMut(&mut Foo<'b, 'tcx>) -> int>)
-> int
{
mk_cand(self)
diff --git a/src/test/run-pass/running-with-no-runtime.rs b/src/test/run-pass/running-with-no-runtime.rs
index fc53737bb445..6f807fc34995 100644
--- a/src/test/run-pass/running-with-no-runtime.rs
+++ b/src/test/run-pass/running-with-no-runtime.rs
@@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+use std::ffi;
use std::io::process::{Command, ProcessOutput};
use std::os;
use std::rt::unwind::try;
@@ -34,7 +35,8 @@ fn start(argc: int, argv: *const *const u8) -> int {
let args = unsafe {
range(0, argc as uint).map(|i| {
- String::from_raw_buf(*argv.offset(i as int)).into_bytes()
+ let ptr = *argv.offset(i as int) as *const _;
+ ffi::c_str_to_bytes(&ptr).to_vec()
}).collect::>()
};
let me = args[0].as_slice();
diff --git a/src/test/run-pass/unsized.rs b/src/test/run-pass/unsized.rs
index 07b9fac66554..e6dd8d46952e 100644
--- a/src/test/run-pass/unsized.rs
+++ b/src/test/run-pass/unsized.rs
@@ -12,9 +12,9 @@
// Test syntax checks for `?Sized` syntax.
-trait T1 for ?Sized {}
-pub trait T2 for ?Sized {}
-trait T3 for ?Sized: T2 {}
+trait T1 {}
+pub trait T2 {}
+trait T3 : T2 {}
trait T4 {}
trait T5 {}
trait T6 {}
diff --git a/src/test/run-pass/unsized2.rs b/src/test/run-pass/unsized2.rs
index 8d2c99d4414c..c7e8b2a05ec5 100644
--- a/src/test/run-pass/unsized2.rs
+++ b/src/test/run-pass/unsized2.rs
@@ -22,7 +22,7 @@ fn f2(x: &X) {
}
// Bounded.
-trait T for ?Sized {}
+trait T {}
fn f3(x: &X) {
f3::(x);
}
@@ -32,7 +32,7 @@ fn f4(x: &X) {
}
// Self type.
-trait T2 for ?Sized {
+trait T2 {
fn f() -> Box;
}
struct S;
@@ -48,7 +48,7 @@ fn f6(x: &X) {
let _: Box = T2::f();
}
-trait T3 for ?Sized {
+trait T3 {
fn f() -> Box;
}
impl T3 for S {
diff --git a/src/test/run-pass/vec-macro-no-std.rs b/src/test/run-pass/vec-macro-no-std.rs
index c04afffb1203..7b2c35aa08d3 100644
--- a/src/test/run-pass/vec-macro-no-std.rs
+++ b/src/test/run-pass/vec-macro-no-std.rs
@@ -11,6 +11,8 @@
#![feature(lang_items)]
#![no_std]
+extern crate "std" as other;
+
#[macro_use]
extern crate core;
extern crate libc;
@@ -22,10 +24,6 @@ use core::option::Option::Some;
use core::slice::SliceExt;
use collections::vec::Vec;
-#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
-#[lang = "eh_personality"] extern fn eh_personality() {}
-#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
-
// Issue #16806
#[start]