Skip to content

Commit e0684e8

Browse files
committed
Fallout
1 parent 48f50e1 commit e0684e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+211
-211
lines changed

src/liballoc/boxed.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ impl<T: Clone> Clone for Box<T> {
7575
}
7676

7777
#[stable]
78-
impl<Sized? T: PartialEq> PartialEq for Box<T> {
78+
impl<T: ?Sized + PartialEq> PartialEq for Box<T> {
7979
#[inline]
8080
fn eq(&self, other: &Box<T>) -> bool { PartialEq::eq(&**self, &**other) }
8181
#[inline]
8282
fn ne(&self, other: &Box<T>) -> bool { PartialEq::ne(&**self, &**other) }
8383
}
8484
#[stable]
85-
impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
85+
impl<T: ?Sized + PartialOrd> PartialOrd for Box<T> {
8686
#[inline]
8787
fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering> {
8888
PartialOrd::partial_cmp(&**self, &**other)
@@ -97,16 +97,16 @@ impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
9797
fn gt(&self, other: &Box<T>) -> bool { PartialOrd::gt(&**self, &**other) }
9898
}
9999
#[stable]
100-
impl<Sized? T: Ord> Ord for Box<T> {
100+
impl<T: ?Sized + Ord> Ord for Box<T> {
101101
#[inline]
102102
fn cmp(&self, other: &Box<T>) -> Ordering {
103103
Ord::cmp(&**self, &**other)
104104
}
105105

106106
#[stable]}
107-
impl<Sized? T: Eq> Eq for Box<T> {}
107+
impl<T: ?Sized + Eq> Eq for Box<T> {}
108108

109-
impl<S: hash::Writer, Sized? T: Hash<S>> Hash<S> for Box<T> {
109+
impl<S: hash::Writer, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
110110
#[inline]
111111
fn hash(&self, state: &mut S) {
112112
(**self).hash(state);
@@ -143,7 +143,7 @@ impl BoxAny for Box<Any> {
143143
}
144144
}
145145

146-
impl<Sized? T: fmt::Show> fmt::Show for Box<T> {
146+
impl<T: ?Sized + fmt::Show> fmt::Show for Box<T> {
147147
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
148148
(**self).fmt(f)
149149
}
@@ -155,13 +155,13 @@ impl fmt::Show for Box<Any> {
155155
}
156156
}
157157

158-
impl<Sized? T> Deref for Box<T> {
158+
impl<T: ?Sized> Deref for Box<T> {
159159
type Target = T;
160160

161161
fn deref(&self) -> &T { &**self }
162162
}
163163

164-
impl<Sized? T> DerefMut for Box<T> {
164+
impl<T: ?Sized> DerefMut for Box<T> {
165165
fn deref_mut(&mut self) -> &mut T { &mut **self }
166166
}
167167

src/libcollections/btree/map.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
130130

131131
#[stable]
132132
/// A view into a single entry in a map, which may either be vacant or occupied.
133-
pub enum Entry<'a, Sized? Q:'a, K:'a, V:'a> {
133+
pub enum Entry<'a, Q: ?Sized +'a, K:'a, V:'a> {
134134
/// A vacant Entry
135135
Vacant(VacantEntry<'a, Q, K, V>),
136136
/// An occupied Entry
@@ -139,7 +139,7 @@ pub enum Entry<'a, Sized? Q:'a, K:'a, V:'a> {
139139

140140
#[stable]
141141
/// A vacant Entry.
142-
pub struct VacantEntry<'a, Sized? Q:'a, K:'a, V:'a> {
142+
pub struct VacantEntry<'a, Q: ?Sized +'a, K:'a, V:'a> {
143143
key: &'a Q,
144144
stack: stack::SearchStack<'a, K, V, node::handle::Edge, node::handle::Leaf>,
145145
}
@@ -214,7 +214,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
214214
/// assert_eq!(map.get(&2), None);
215215
/// ```
216216
#[stable]
217-
pub fn get<Sized? Q>(&self, key: &Q) -> Option<&V> where Q: BorrowFrom<K> + Ord {
217+
pub fn get<Q: ?Sized>(&self, key: &Q) -> Option<&V> where Q: BorrowFrom<K> + Ord {
218218
let mut cur_node = &self.root;
219219
loop {
220220
match Node::search(cur_node, key) {
@@ -246,7 +246,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
246246
/// assert_eq!(map.contains_key(&2), false);
247247
/// ```
248248
#[stable]
249-
pub fn contains_key<Sized? Q>(&self, key: &Q) -> bool where Q: BorrowFrom<K> + Ord {
249+
pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where Q: BorrowFrom<K> + Ord {
250250
self.get(key).is_some()
251251
}
252252

@@ -270,7 +270,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
270270
/// ```
271271
// See `get` for implementation notes, this is basically a copy-paste with mut's added
272272
#[stable]
273-
pub fn get_mut<Sized? Q>(&mut self, key: &Q) -> Option<&mut V> where Q: BorrowFrom<K> + Ord {
273+
pub fn get_mut<Q: ?Sized>(&mut self, key: &Q) -> Option<&mut V> where Q: BorrowFrom<K> + Ord {
274274
// temp_node is a Borrowck hack for having a mutable value outlive a loop iteration
275275
let mut temp_node = &mut self.root;
276276
loop {
@@ -440,7 +440,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
440440
/// assert_eq!(map.remove(&1), None);
441441
/// ```
442442
#[stable]
443-
pub fn remove<Sized? Q>(&mut self, key: &Q) -> Option<V> where Q: BorrowFrom<K> + Ord {
443+
pub fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V> where Q: BorrowFrom<K> + Ord {
444444
// See `swap` for a more thorough description of the stuff going on in here
445445
let mut stack = stack::PartialSearchStack::new(self);
446446
loop {
@@ -880,7 +880,7 @@ impl<K: Show, V: Show> Show for BTreeMap<K, V> {
880880
// NOTE(stage0): remove impl after a snapshot
881881
#[cfg(stage0)]
882882
#[stable]
883-
impl<K: Ord, Sized? Q, V> Index<Q, V> for BTreeMap<K, V>
883+
impl<K: Ord, Q: ?Sized, V> Index<Q, V> for BTreeMap<K, V>
884884
where Q: BorrowFrom<K> + Ord
885885
{
886886
fn index(&self, key: &Q) -> &V {
@@ -890,7 +890,7 @@ impl<K: Ord, Sized? Q, V> Index<Q, V> for BTreeMap<K, V>
890890

891891
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
892892
#[stable]
893-
impl<K: Ord, Sized? Q, V> Index<Q> for BTreeMap<K, V>
893+
impl<K: Ord, Q: ?Sized, V> Index<Q> for BTreeMap<K, V>
894894
where Q: BorrowFrom<K> + Ord
895895
{
896896
type Output = V;
@@ -903,7 +903,7 @@ impl<K: Ord, Sized? Q, V> Index<Q> for BTreeMap<K, V>
903903
// NOTE(stage0): remove impl after a snapshot
904904
#[cfg(stage0)]
905905
#[stable]
906-
impl<K: Ord, Sized? Q, V> IndexMut<Q, V> for BTreeMap<K, V>
906+
impl<K: Ord, Q: ?Sized, V> IndexMut<Q, V> for BTreeMap<K, V>
907907
where Q: BorrowFrom<K> + Ord
908908
{
909909
fn index_mut(&mut self, key: &Q) -> &mut V {
@@ -913,7 +913,7 @@ impl<K: Ord, Sized? Q, V> IndexMut<Q, V> for BTreeMap<K, V>
913913

914914
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
915915
#[stable]
916-
impl<K: Ord, Sized? Q, V> IndexMut<Q> for BTreeMap<K, V>
916+
impl<K: Ord, Q: ?Sized, V> IndexMut<Q> for BTreeMap<K, V>
917917
where Q: BorrowFrom<K> + Ord
918918
{
919919
type Output = V;
@@ -1135,7 +1135,7 @@ impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V> {
11351135
#[stable]
11361136
impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> {}
11371137

1138-
impl<'a, Sized? Q, K: Ord, V> Entry<'a, Q, K, V> {
1138+
impl<'a, Q: ?Sized, K: Ord, V> Entry<'a, Q, K, V> {
11391139
#[unstable = "matches collection reform v2 specification, waiting for dust to settle"]
11401140
/// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant
11411141
pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, Q, K, V>> {
@@ -1146,7 +1146,7 @@ impl<'a, Sized? Q, K: Ord, V> Entry<'a, Q, K, V> {
11461146
}
11471147
}
11481148

1149-
impl<'a, Sized? Q: ToOwned<K>, K: Ord, V> VacantEntry<'a, Q, K, V> {
1149+
impl<'a, Q: ?Sized + ToOwned<K>, K: Ord, V> VacantEntry<'a, Q, K, V> {
11501150
#[stable]
11511151
/// Sets the value of the entry with the VacantEntry's key,
11521152
/// and returns a mutable reference to it.
@@ -1386,7 +1386,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
13861386
/// ```
13871387
/// The key must have the same ordering before or after `.to_owned()` is called.
13881388
#[stable]
1389-
pub fn entry<'a, Sized? Q>(&'a mut self, mut key: &'a Q) -> Entry<'a, Q, K, V>
1389+
pub fn entry<'a, Q: ?Sized>(&'a mut self, mut key: &'a Q) -> Entry<'a, Q, K, V>
13901390
where Q: Ord + ToOwned<K>
13911391
{
13921392
// same basic logic of `swap` and `pop`, blended together

src/libcollections/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ impl<K: Ord, V> Node<K, V> {
517517
/// Searches for the given key in the node. If it finds an exact match,
518518
/// `Found` will be yielded with the matching index. If it doesn't find an exact match,
519519
/// `GoDown` will be yielded with the index of the subtree the key must lie in.
520-
pub fn search<Sized? Q, NodeRef: Deref<Target=Node<K, V>>>(node: NodeRef, key: &Q)
520+
pub fn search<Q: ?Sized, NodeRef: Deref<Target=Node<K, V>>>(node: NodeRef, key: &Q)
521521
-> SearchResult<NodeRef> where Q: BorrowFrom<K> + Ord {
522522
// FIXME(Gankro): Tune when to search linear or binary based on B (and maybe K/V).
523523
// For the B configured as of this writing (B = 6), binary search was *significantly*
@@ -536,7 +536,7 @@ impl<K: Ord, V> Node<K, V> {
536536
}
537537
}
538538

539-
fn search_linear<Sized? Q>(&self, key: &Q) -> (bool, uint) where Q: BorrowFrom<K> + Ord {
539+
fn search_linear<Q: ?Sized>(&self, key: &Q) -> (bool, uint) where Q: BorrowFrom<K> + Ord {
540540
for (i, k) in self.keys().iter().enumerate() {
541541
match key.cmp(BorrowFrom::borrow_from(k)) {
542542
Greater => {},

src/libcollections/btree/set.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl<T: Ord> BTreeSet<T> {
299299
/// assert_eq!(set.contains(&4), false);
300300
/// ```
301301
#[stable]
302-
pub fn contains<Sized? Q>(&self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
302+
pub fn contains<Q: ?Sized>(&self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
303303
self.map.contains_key(value)
304304
}
305305

@@ -429,7 +429,7 @@ impl<T: Ord> BTreeSet<T> {
429429
/// assert_eq!(set.remove(&2), false);
430430
/// ```
431431
#[stable]
432-
pub fn remove<Sized? Q>(&mut self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
432+
pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
433433
self.map.remove(value).is_some()
434434
}
435435
}

src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ impl<T> SliceExt for [T] {
989989
////////////////////////////////////////////////////////////////////////////////
990990
#[unstable = "U should be an associated type"]
991991
/// An extension trait for concatenating slices
992-
pub trait SliceConcatExt<Sized? T, U> for Sized? {
992+
pub trait SliceConcatExt<T: ?Sized, U> for Sized? {
993993
/// Flattens a slice of `T` into a single value `U`.
994994
#[stable]
995995
fn concat(&self) -> U;

src/libcore/borrow.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,50 +53,50 @@ use option::Option;
5353
use self::Cow::*;
5454

5555
/// A trait for borrowing data.
56-
pub trait BorrowFrom<Sized? Owned> for Sized? {
56+
pub trait BorrowFrom<Owned: ?Sized> for Sized? {
5757
/// Immutably borrow from an owned value.
5858
fn borrow_from(owned: &Owned) -> &Self;
5959
}
6060

6161
/// A trait for mutably borrowing data.
62-
pub trait BorrowFromMut<Sized? Owned> for Sized? : BorrowFrom<Owned> {
62+
pub trait BorrowFromMut<Owned: ?Sized> for Sized? : BorrowFrom<Owned> {
6363
/// Mutably borrow from an owned value.
6464
fn borrow_from_mut(owned: &mut Owned) -> &mut Self;
6565
}
6666

67-
impl<Sized? T> BorrowFrom<T> for T {
67+
impl<T: ?Sized> BorrowFrom<T> for T {
6868
fn borrow_from(owned: &T) -> &T { owned }
6969
}
7070

71-
impl<Sized? T> BorrowFromMut<T> for T {
71+
impl<T: ?Sized> BorrowFromMut<T> for T {
7272
fn borrow_from_mut(owned: &mut T) -> &mut T { owned }
7373
}
7474

75-
impl<'a, Sized? T> BorrowFrom<&'a T> for T {
75+
impl<'a, T: ?Sized> BorrowFrom<&'a T> for T {
7676
fn borrow_from<'b>(owned: &'b &'a T) -> &'b T { &**owned }
7777
}
7878

79-
impl<'a, Sized? T> BorrowFrom<&'a mut T> for T {
79+
impl<'a, T: ?Sized> BorrowFrom<&'a mut T> for T {
8080
fn borrow_from<'b>(owned: &'b &'a mut T) -> &'b T { &**owned }
8181
}
8282

83-
impl<'a, Sized? T> BorrowFromMut<&'a mut T> for T {
83+
impl<'a, T: ?Sized> BorrowFromMut<&'a mut T> for T {
8484
fn borrow_from_mut<'b>(owned: &'b mut &'a mut T) -> &'b mut T { &mut **owned }
8585
}
8686

87-
impl<'a, T, Sized? B> BorrowFrom<Cow<'a, T, B>> for B where B: ToOwned<T> {
87+
impl<'a, T, B: ?Sized> BorrowFrom<Cow<'a, T, B>> for B where B: ToOwned<T> {
8888
fn borrow_from<'b>(owned: &'b Cow<'a, T, B>) -> &'b B {
8989
&**owned
9090
}
9191
}
9292

9393
/// Trait for moving into a `Cow`
94-
pub trait IntoCow<'a, T, Sized? B> {
94+
pub trait IntoCow<'a, T, B: ?Sized> {
9595
/// Moves `self` into `Cow`
9696
fn into_cow(self) -> Cow<'a, T, B>;
9797
}
9898

99-
impl<'a, T, Sized? B> IntoCow<'a, T, B> for Cow<'a, T, B> where B: ToOwned<T> {
99+
impl<'a, T, B: ?Sized> IntoCow<'a, T, B> for Cow<'a, T, B> where B: ToOwned<T> {
100100
fn into_cow(self) -> Cow<'a, T, B> {
101101
self
102102
}
@@ -129,7 +129,7 @@ impl<T> ToOwned<T> for T where T: Clone {
129129
/// }
130130
/// }
131131
/// ```
132-
pub enum Cow<'a, T, Sized? B: 'a> where B: ToOwned<T> {
132+
pub enum Cow<'a, T, B: ?Sized + 'a> where B: ToOwned<T> {
133133
/// Borrowed data.
134134
Borrowed(&'a B),
135135

@@ -138,7 +138,7 @@ pub enum Cow<'a, T, Sized? B: 'a> where B: ToOwned<T> {
138138
}
139139

140140
#[stable]
141-
impl<'a, T, Sized? B> Clone for Cow<'a, T, B> where B: ToOwned<T> {
141+
impl<'a, T, B: ?Sized> Clone for Cow<'a, T, B> where B: ToOwned<T> {
142142
fn clone(&self) -> Cow<'a, T, B> {
143143
match *self {
144144
Borrowed(b) => Borrowed(b),
@@ -150,7 +150,7 @@ impl<'a, T, Sized? B> Clone for Cow<'a, T, B> where B: ToOwned<T> {
150150
}
151151
}
152152

153-
impl<'a, T, Sized? B> Cow<'a, T, B> where B: ToOwned<T> {
153+
impl<'a, T, B: ?Sized> Cow<'a, T, B> where B: ToOwned<T> {
154154
/// Acquire a mutable reference to the owned form of the data.
155155
///
156156
/// Copies the data if it is not already owned.
@@ -191,7 +191,7 @@ impl<'a, T, Sized? B> Cow<'a, T, B> where B: ToOwned<T> {
191191
}
192192
}
193193

194-
impl<'a, T, Sized? B> Deref for Cow<'a, T, B> where B: ToOwned<T> {
194+
impl<'a, T, B: ?Sized> Deref for Cow<'a, T, B> where B: ToOwned<T> {
195195
type Target = B;
196196

197197
fn deref(&self) -> &B {
@@ -203,18 +203,18 @@ impl<'a, T, Sized? B> Deref for Cow<'a, T, B> where B: ToOwned<T> {
203203
}
204204

205205
#[stable]
206-
impl<'a, T, Sized? B> Eq for Cow<'a, T, B> where B: Eq + ToOwned<T> {}
206+
impl<'a, T, B: ?Sized> Eq for Cow<'a, T, B> where B: Eq + ToOwned<T> {}
207207

208208
#[stable]
209-
impl<'a, T, Sized? B> Ord for Cow<'a, T, B> where B: Ord + ToOwned<T> {
209+
impl<'a, T, B: ?Sized> Ord for Cow<'a, T, B> where B: Ord + ToOwned<T> {
210210
#[inline]
211211
fn cmp(&self, other: &Cow<'a, T, B>) -> Ordering {
212212
Ord::cmp(&**self, &**other)
213213
}
214214
}
215215

216216
#[stable]
217-
impl<'a, 'b, T, U, Sized? B, Sized? C> PartialEq<Cow<'b, U, C>> for Cow<'a, T, B> where
217+
impl<'a, 'b, T, U, B: ?Sized, C: ?Sized> PartialEq<Cow<'b, U, C>> for Cow<'a, T, B> where
218218
B: PartialEq<C> + ToOwned<T>,
219219
C: ToOwned<U>,
220220
{
@@ -225,14 +225,14 @@ impl<'a, 'b, T, U, Sized? B, Sized? C> PartialEq<Cow<'b, U, C>> for Cow<'a, T, B
225225
}
226226

227227
#[stable]
228-
impl<'a, T, Sized? B> PartialOrd for Cow<'a, T, B> where B: PartialOrd + ToOwned<T> {
228+
impl<'a, T, B: ?Sized> PartialOrd for Cow<'a, T, B> where B: PartialOrd + ToOwned<T> {
229229
#[inline]
230230
fn partial_cmp(&self, other: &Cow<'a, T, B>) -> Option<Ordering> {
231231
PartialOrd::partial_cmp(&**self, &**other)
232232
}
233233
}
234234

235-
impl<'a, T, Sized? B> fmt::Show for Cow<'a, T, B> where B: fmt::Show + ToOwned<T>, T: fmt::Show {
235+
impl<'a, T, B: ?Sized> fmt::Show for Cow<'a, T, B> where B: fmt::Show + ToOwned<T>, T: fmt::Show {
236236
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
237237
match *self {
238238
Borrowed(ref b) => fmt::Show::fmt(b, f),

src/libcore/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub trait Clone : Sized {
4343
}
4444

4545
#[stable]
46-
impl<'a, Sized? T> Clone for &'a T {
46+
impl<'a, T: ?Sized> Clone for &'a T {
4747
/// Return a shallow copy of the reference.
4848
#[inline]
4949
fn clone(&self) -> &'a T { *self }

0 commit comments

Comments
 (0)