rollup merge of #22210: aturon/stab-final-borrow

Conflicts:
	src/libcollections/btree/map.rs
	src/libcollections/str.rs
	src/libcollections/vec.rs
	src/libcore/borrow.rs
	src/libcore/hash/mod.rs
	src/libstd/collections/hash/map.rs
	src/libstd/collections/hash/set.rs
This commit is contained in:
Alex Crichton 2015-02-18 15:34:32 -08:00
commit 2cdbd288ac
29 changed files with 766 additions and 514 deletions

View file

@ -12,6 +12,5 @@ use std::borrow::IntoCow;
fn main() {
<String as IntoCow>::into_cow("foo".to_string());
//~^ ERROR wrong number of type arguments: expected 2, found 0
//~^ ERROR wrong number of type arguments: expected 1, found 0
}

View file

@ -34,7 +34,7 @@ use std::mem::size_of;
static uni: &'static str = "Les Miséééééééérables";
static yy: usize = 25;
static bob: Option<std::vec::CowVec<'static, isize>> = None;
static bob: Option<std::borrow::Cow<'static, [isize]>> = None;
// buglink test - see issue #1337.

View file

@ -100,8 +100,8 @@ tests! {
Add::add, fn(i32, i32) -> i32, (5, 6);
<i32 as Add<_>>::add, fn(i32, i32) -> i32, (5, 6);
<i32 as Add<i32>>::add, fn(i32, i32) -> i32, (5, 6);
<String as IntoCow<_, _>>::into_cow, fn(String) -> Cow<'static, String, str>,
<String as IntoCow<_>>::into_cow, fn(String) -> Cow<'static, str>,
("foo".to_string());
<String as IntoCow<'static, _, _>>::into_cow, fn(String) -> Cow<'static, String, str>,
<String as IntoCow<'static, _>>::into_cow, fn(String) -> Cow<'static, str>,
("foo".to_string());
}

View file

@ -13,7 +13,7 @@ extern crate collections;
use std::collections::HashMap;
use std::borrow::{Cow, IntoCow};
type SendStr = Cow<'static, String, str>;
type SendStr = Cow<'static, str>;
pub fn main() {
let mut map: HashMap<SendStr, uint> = HashMap::new();

View file

@ -13,7 +13,7 @@ extern crate collections;
use self::collections::BTreeMap;
use std::borrow::{Cow, IntoCow};
type SendStr = Cow<'static, String, str>;
type SendStr = Cow<'static, str>;
pub fn main() {
let mut map: BTreeMap<SendStr, uint> = BTreeMap::new();

View file

@ -23,18 +23,18 @@ pub type Node<'a> = &'a CFGNode;
pub trait GraphWalk<'c, N> {
/// Returns all the nodes in this graph.
fn nodes(&'c self) where [N]:ToOwned<Vec<N>>;
fn nodes(&'c self) where [N]:ToOwned<Owned=Vec<N>>;
}
impl<'g> GraphWalk<'g, Node<'g>> for u32
{
fn nodes(&'g self) where [Node<'g>]:ToOwned<Vec<Node<'g>>>
fn nodes(&'g self) where [Node<'g>]:ToOwned<Owned=Vec<Node<'g>>>
{ loop { } }
}
impl<'h> GraphWalk<'h, Node<'h>> for u64
{
fn nodes(&'h self) where [Node<'h>]:ToOwned<Vec<Node<'h>>>
fn nodes(&'h self) where [Node<'h>]:ToOwned<Owned=Vec<Node<'h>>>
{ loop { } }
}