Skip to content

Rolling up PRs in the queue #20610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 142 commits into from
Jan 6, 2015
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
4ee73a1
Changed LaTex $\bot$s to ⊥
th0114nd Dec 18, 2014
9f244dc
Minor fix for the Rust language FAQ
barosl Dec 13, 2014
739f74b
Make the line numbers of the source code clickable
barosl Dec 19, 2014
9554794
Add unstable_options method
sanxiyn Dec 27, 2014
d4da758
Use -Z unstable-options for span debugger
sanxiyn Dec 27, 2014
20fa7cb
Add header to optimizations section
steveklabnik Dec 15, 2014
cd85f0a
restore paragraph
steveklabnik Dec 15, 2014
98aeac2
Extend span debugger
sanxiyn Dec 27, 2014
5cf72ff
Parse arbitrary operators after expr-like macro invocations in statem…
ftxqxd Dec 21, 2014
3995797
Minor documentation edit.
SeanTAllen Jan 3, 2015
0536986
Minor documentation edit.
SeanTAllen Jan 3, 2015
a2c2cb9
rename std::sync::RWLock to RwLock
ville-h Jan 3, 2015
b2ab5d7
fix code and comments referencing RwLock
ville-h Jan 3, 2015
fedbde6
rename std::sync::StaticRWLock to StaticRwLock
ville-h Jan 4, 2015
144f4b8
Update influence list
brendanzab Nov 23, 2014
8cebb1f
Rename `raw_pointer_deriving` lint to `raw_pointer_derive`
csouth3 Jan 4, 2015
817f75d
fix code and comments referencing StaticRwLock
ville-h Jan 4, 2015
5344ae2
rename std::sync::RWLOCK_INIT to RW_LOCK_INIT
ville-h Jan 4, 2015
c3dcf9b
fix code and comments referencing RW_LOCK_INIT
ville-h Jan 4, 2015
2dcbdc1
rename std::sync::RWLockReadGuard to RwLockReadGuard
ville-h Jan 4, 2015
956cab6
fix code referencing RwLockReadGuard
ville-h Jan 4, 2015
98e6d12
rename std::sync::RWLockWriteGuard to RwLockWriteGuard
ville-h Jan 4, 2015
44b3dde
fix code referencing RwLockWriteGuard
ville-h Jan 4, 2015
fee1f2a
fix comment referencing RwLock
ville-h Jan 4, 2015
e723fe0
Do not use entropy during gen_weighted_bool(1)
nagisa Jan 4, 2015
9b820d0
Correct the subtyping relations created by the pattern typechecking
nikomatsakis Jan 4, 2015
a17a7c9
Miscellaneous reformatting and commenting.
nikomatsakis Jan 4, 2015
dbfa054
Cleanup type-checking of constants, but do not try to fix #20489.
nikomatsakis Jan 4, 2015
cc18053
bench: do not quit rt-messaging-ping-pong.rs early
tshepang Jan 5, 2015
c54932c
Fix the parsing of where-clauses for structs
jroesch Jan 2, 2015
bf6c007
Change `&` pat to only work with &T, and `&mut` with &mut T.
huonw Dec 5, 2014
09c4e8f
kate syntax highlight: update keyword list
bombless Jan 5, 2015
267b73d
std: Fixup some missing stabilization on str
alexcrichton Jan 5, 2015
177f8bc
std: Fix missing stability in sync
alexcrichton Jan 5, 2015
dc246ae
std: Fix missing stability on prelude
alexcrichton Jan 5, 2015
73019ac
Fix misleading name in AsciiExt docs
zsiciarz Jan 5, 2015
c02fac4
Refactor struct parsing and add tests
jroesch Jan 4, 2015
82a96a1
Ungate associated types.
huonw Jan 5, 2015
6795148
Ungate globs.
huonw Jan 5, 2015
6e3d78f
Ungate default type parameters.
huonw Jan 5, 2015
4016c72
Remove use of associated_types feature gate from tests.
huonw Jan 5, 2015
b98a589
Remove use of globs feature gate from tests.
huonw Jan 5, 2015
3e9d593
Remove uses of default_type_params feature gate from tests.
huonw Jan 5, 2015
2c44195
Make temporary directory names non-deterministic.
ltratt Jan 3, 2015
f677dee
Implement Clone for PRNGs
nagisa Dec 23, 2014
6ca1f0c
Add tests for ChaCha and Isaac Clone impls
nagisa Jan 3, 2015
156a1c3
Implement a few methods for RingBuf
pczarn Jan 5, 2015
c886894
Treat associated types the same as type parameters when it comes to r…
nikomatsakis Jan 3, 2015
05c5b5f
reverting other changes
andrewyli Jan 5, 2015
ec7a50d
std: Redesign c_str and c_vec
alexcrichton Nov 25, 2014
540a777
Don't ICE just because an impl is missing an associated type. Trust i…
nikomatsakis Jan 3, 2015
5caf847
Add a test for issue #18865. Fixes #18865.
nikomatsakis Jan 3, 2015
61bb6ac
remove unnecessary `Default` bound from `Hash{Map,Set}`'s `Extend` impl
apasel422 Jan 5, 2015
a56e7ae
Add lifetime elision information to the ownership guide.
steveklabnik Dec 11, 2014
5488ddb
Segmented stack support for DragonFly
mneumann Jan 3, 2015
66da36f
Ensure that LLVM is rebuilt with recent changes
mneumann Jan 5, 2015
faf07b1
Update reexports in vim syntax file
csouth3 Jan 5, 2015
40bd1c2
Put version number in beta channel artifacts
brson Jan 5, 2015
edbb7c3
0.13.0 -> 1.0.0
brson Jan 5, 2015
c548b87
Typo
brson Jan 5, 2015
d1cf1b1
Don't test codegen-units errors on stage1 (c.f. #20184)
kmcallister Jan 1, 2015
5e5924b
Replace LetSyntaxTT with MacroRulesTT
kmcallister Sep 15, 2014
ad7c647
Add a special macro nonterminal $crate
kmcallister Sep 16, 2014
e2a9c04
Allow leading :: in use items
kmcallister Dec 10, 2014
5382881
Implement macro re-export
kmcallister Sep 16, 2014
1c2fddc
Remove unused if_ok! macro
kmcallister Dec 10, 2014
4236c52
std: Move Atomic{Int,Uint} back to unstable
alexcrichton Jan 5, 2015
774588f
sed -i -s 's/ for Sized?//g' **/*.rs
Jan 5, 2015
c26f580
remove unused `Sized` imports
Jan 5, 2015
eb50d3e
undo one `for Sized?` removal that was in a comment
Jan 5, 2015
bbf7e4e
update comment to reflect new `Sized` semantics
Jan 5, 2015
4ed2800
syntax: obsolete the `for Sized?` syntax
Jan 5, 2015
73806dd
Use $crate and macro reexport to reduce duplicated code
kmcallister Sep 16, 2014
fc58479
Stop using macro_escape as an inner attribute
kmcallister Dec 19, 2014
5bf385b
Rename macro_escape to macro_use
kmcallister Dec 19, 2014
5171b32
creader: Convert free functions to Env methods
kmcallister Dec 21, 2014
24aa7f0
creader: Use a single struct
kmcallister Dec 21, 2014
677b7ca
Reformat metadata for exported macros
kmcallister Dec 31, 2014
cd4205a
tweak the obsolete syntax message
Jan 5, 2015
8733b8b
examples added for element access
andrewyli Jan 5, 2015
f7f5d09
removing whitespace
andrewyli Jan 5, 2015
64ec47c
Final alpha stabilization of core::iter
aturon Jan 4, 2015
e921afd
Stabilize core::ops
aturon Jan 4, 2015
121f6c6
Final alpha stabilization of std::slice
aturon Jan 4, 2015
cb765ce
Stabilize collection modules
aturon Jan 5, 2015
6e68fd0
Implement new orphan rule that requires that impls of remote traits m…
nikomatsakis Jan 5, 2015
c6f4a03
Stabilization of impls and fallout from stabilization
aturon Jan 5, 2015
f031671
Remove i suffix in docs
steveklabnik Jan 2, 2015
595a082
Remove the prefix in ObsoleteSyntax variants
nrc Jan 5, 2015
48f50e1
Obsolete `Sized? T`
nrc Jan 5, 2015
e0684e8
Fallout
nrc Jan 5, 2015
8f3a424
Fix the obsolete message
nrc Jan 6, 2015
f314e2c
creader: Load parts of plugin metadata on demand
kmcallister Jan 1, 2015
60be2f5
Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]
kmcallister Jan 1, 2015
0816255
Move #[macro_reexport] to extern crate
kmcallister Jan 2, 2015
aa69cbd
Allow selective macro import
kmcallister Jan 2, 2015
c9f0ff3
Reserve the keyword 'macro'
kmcallister Jan 2, 2015
416137e
Modernize macro_rules! invocations
kmcallister Jan 2, 2015
d0163d3
Pass the #[plugin(...)] meta item to the registrar
kmcallister Jan 3, 2015
c2e2697
Un-gate macro_rules
kmcallister Jan 3, 2015
bbbb85a
Forbid '#[macro_use] extern crate' outside the crate root
kmcallister Jan 3, 2015
34b995d
Add a test case for accidental macro re-export
kmcallister Jan 3, 2015
78e841d
Update docs
kmcallister Jan 3, 2015
d46b8f1
rollup merge of #19235: bjz/reference
alexcrichton Jan 6, 2015
6f7faa0
rollup merge of #19736: steveklabnik/gh19662
alexcrichton Jan 6, 2015
199ebc7
rollup merge of #19888: steveklabnik/gh19861
alexcrichton Jan 6, 2015
b8e404f
rollup merge of #19998: th0114nd/unicode-bottom
alexcrichton Jan 6, 2015
e918a58
rollup merge of #20092: barosl/rustdoc-line-number-clickable
alexcrichton Jan 6, 2015
7f4f79c
rollup merge of #20099: P1start/parse-more-macro-ops
alexcrichton Jan 6, 2015
ba2b79c
rollup merge of #20197: pczarn/ring_buf-collections-reform
alexcrichton Jan 6, 2015
0dd0742
rollup merge of #20258: sanxiyn/show-span-2
alexcrichton Jan 6, 2015
3d9923d
rollup merge of #20424: jroesch/tuple-struct-where-clause-fix
alexcrichton Jan 6, 2015
059566b
rollup merge of #20434: steveklabnik/five_eye
alexcrichton Jan 6, 2015
88b4c8e
rollup merge of #20465: nikomatsakis/assoc-types-regions-20303
alexcrichton Jan 6, 2015
eee6a57
rollup merge of #20472: mneumann/llvm-dragonfly
alexcrichton Jan 6, 2015
38d81ba
rollup merge of #20478: SeanTAllen/master
alexcrichton Jan 6, 2015
ca40fe0
rollup merge of #20483: nagisa/rng-copy
alexcrichton Jan 6, 2015
743d926
rollup merge of #20488: ltratt/nondeterministic_tempdir
alexcrichton Jan 6, 2015
25d5a3a
rollup merge of #20507: alexcrichton/issue-20444
alexcrichton Jan 6, 2015
cc0697e
rollup merge of #20511: csouth3/derive-lint
alexcrichton Jan 6, 2015
3353371
rollup merge of #20517: nikomatsakis/safety-issue-19997
alexcrichton Jan 6, 2015
a73c352
rollup merge of #20518: nagisa/weighted-bool
alexcrichton Jan 6, 2015
6c2263c
rollup merge of #20519: ville-h/rwlock-rename
alexcrichton Jan 6, 2015
308c1ba
rollup merge of #20538: EchoAce/issue-20529
alexcrichton Jan 6, 2015
0ca3a8c
rollup merge of #20548: tshepang/fix-ping-pong-benchmark
alexcrichton Jan 6, 2015
bb5e16b
rollup merge of #20554: huonw/mut-pattern
alexcrichton Jan 6, 2015
2e883a5
rollup merge of #20560: aturon/stab-2-iter-ops-slice
alexcrichton Jan 6, 2015
59bbf56
rollup merge of #20564: bombless/patch-3
alexcrichton Jan 6, 2015
83c890b
rollup merge of #20565: alexcrichton/missing-stability
alexcrichton Jan 6, 2015
cda6acb
rollup merge of #20566: zsiciarz/fix-stdext-docs
alexcrichton Jan 6, 2015
b244319
rollup merge of #20568: huonw/ungate-AT-globs
alexcrichton Jan 6, 2015
de78419
rollup merge of #20581: apasel422/extend
alexcrichton Jan 6, 2015
4c54978
rollup merge of #20583: csouth3/vim-syntax
alexcrichton Jan 6, 2015
f3ad232
rollup merge of #20584: brson/versioning
alexcrichton Jan 6, 2015
cf8a11e
rollup merge of #20594: nikomatsakis/orphan-ordered
alexcrichton Jan 6, 2015
afbce05
rollup merge of #20556: japaric/no-for-sized
alexcrichton Jan 6, 2015
384e218
Merge remote-tracking branch 'nrc/sized-2' into rollup
alexcrichton Jan 6, 2015
563f6d8
rollup merge of #20608: nikomatsakis/assoc-types-method-dispatch
alexcrichton Jan 6, 2015
7975fd9
rollup merge of #20482: kmcallister/macro-reform
alexcrichton Jan 6, 2015
f331c56
Test fixes
alexcrichton Jan 6, 2015
ee9921a
Revert "Remove i suffix in docs"
alexcrichton Jan 6, 2015
4b359e3
More test fixes!
alexcrichton Jan 6, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ impl<T: Clone> Clone for Box<T> {
}

#[stable]
impl<Sized? T: PartialEq> PartialEq for Box<T> {
impl<T: ?Sized + PartialEq> PartialEq for Box<T> {
#[inline]
fn eq(&self, other: &Box<T>) -> bool { PartialEq::eq(&**self, &**other) }
#[inline]
fn ne(&self, other: &Box<T>) -> bool { PartialEq::ne(&**self, &**other) }
}
#[stable]
impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
impl<T: ?Sized + PartialOrd> PartialOrd for Box<T> {
#[inline]
fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering> {
PartialOrd::partial_cmp(&**self, &**other)
Expand All @@ -97,16 +97,16 @@ impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
fn gt(&self, other: &Box<T>) -> bool { PartialOrd::gt(&**self, &**other) }
}
#[stable]
impl<Sized? T: Ord> Ord for Box<T> {
impl<T: ?Sized + Ord> Ord for Box<T> {
#[inline]
fn cmp(&self, other: &Box<T>) -> Ordering {
Ord::cmp(&**self, &**other)
}

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

impl<S: hash::Writer, Sized? T: Hash<S>> Hash<S> for Box<T> {
impl<S: hash::Writer, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
Expand Down Expand Up @@ -143,7 +143,7 @@ impl BoxAny for Box<Any> {
}
}

impl<Sized? T: fmt::Show> fmt::Show for Box<T> {
impl<T: ?Sized + fmt::Show> fmt::Show for Box<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
(**self).fmt(f)
}
Expand All @@ -156,14 +156,14 @@ impl fmt::Show for Box<Any> {
}

#[stable]
impl<Sized? T> Deref for Box<T> {
impl<T: ?Sized> Deref for Box<T> {
type Target = T;

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

#[stable]
impl<Sized? T> DerefMut for Box<T> {
impl<T: ?Sized> DerefMut for Box<T> {
fn deref_mut(&mut self) -> &mut T { &mut **self }
}

Expand Down
22 changes: 11 additions & 11 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub struct Values<'a, K: 'a, V: 'a> {

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

#[stable]
/// A vacant Entry.
pub struct VacantEntry<'a, Sized? Q:'a, K:'a, V:'a> {
pub struct VacantEntry<'a, Q: ?Sized +'a, K:'a, V:'a> {
key: &'a Q,
stack: stack::SearchStack<'a, K, V, node::handle::Edge, node::handle::Leaf>,
}
Expand Down Expand Up @@ -214,7 +214,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// assert_eq!(map.get(&2), None);
/// ```
#[stable]
pub fn get<Sized? Q>(&self, key: &Q) -> Option<&V> where Q: BorrowFrom<K> + Ord {
pub fn get<Q: ?Sized>(&self, key: &Q) -> Option<&V> where Q: BorrowFrom<K> + Ord {
let mut cur_node = &self.root;
loop {
match Node::search(cur_node, key) {
Expand Down Expand Up @@ -246,7 +246,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// assert_eq!(map.contains_key(&2), false);
/// ```
#[stable]
pub fn contains_key<Sized? Q>(&self, key: &Q) -> bool where Q: BorrowFrom<K> + Ord {
pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where Q: BorrowFrom<K> + Ord {
self.get(key).is_some()
}

Expand All @@ -270,7 +270,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// ```
// See `get` for implementation notes, this is basically a copy-paste with mut's added
#[stable]
pub fn get_mut<Sized? Q>(&mut self, key: &Q) -> Option<&mut V> where Q: BorrowFrom<K> + Ord {
pub fn get_mut<Q: ?Sized>(&mut self, key: &Q) -> Option<&mut V> where Q: BorrowFrom<K> + Ord {
// temp_node is a Borrowck hack for having a mutable value outlive a loop iteration
let mut temp_node = &mut self.root;
loop {
Expand Down Expand Up @@ -440,7 +440,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// assert_eq!(map.remove(&1), None);
/// ```
#[stable]
pub fn remove<Sized? Q>(&mut self, key: &Q) -> Option<V> where Q: BorrowFrom<K> + Ord {
pub fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V> where Q: BorrowFrom<K> + Ord {
// See `swap` for a more thorough description of the stuff going on in here
let mut stack = stack::PartialSearchStack::new(self);
loop {
Expand Down Expand Up @@ -878,7 +878,7 @@ impl<K: Show, V: Show> Show for BTreeMap<K, V> {
}

#[stable]
impl<K: Ord, Sized? Q, V> Index<Q> for BTreeMap<K, V>
impl<K: Ord, Q: ?Sized, V> Index<Q> for BTreeMap<K, V>
where Q: BorrowFrom<K> + Ord
{
type Output = V;
Expand All @@ -889,7 +889,7 @@ impl<K: Ord, Sized? Q, V> Index<Q> for BTreeMap<K, V>
}

#[stable]
impl<K: Ord, Sized? Q, V> IndexMut<Q> for BTreeMap<K, V>
impl<K: Ord, Q: ?Sized, V> IndexMut<Q> for BTreeMap<K, V>
where Q: BorrowFrom<K> + Ord
{
type Output = V;
Expand Down Expand Up @@ -1111,7 +1111,7 @@ impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V> {
#[stable]
impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> {}

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

impl<'a, Sized? Q: ToOwned<K>, K: Ord, V> VacantEntry<'a, Q, K, V> {
impl<'a, Q: ?Sized + ToOwned<K>, K: Ord, V> VacantEntry<'a, Q, K, V> {
#[stable]
/// Sets the value of the entry with the VacantEntry's key,
/// and returns a mutable reference to it.
Expand Down Expand Up @@ -1362,7 +1362,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
/// ```
/// The key must have the same ordering before or after `.to_owned()` is called.
#[stable]
pub fn entry<'a, Sized? Q>(&'a mut self, mut key: &'a Q) -> Entry<'a, Q, K, V>
pub fn entry<'a, Q: ?Sized>(&'a mut self, mut key: &'a Q) -> Entry<'a, Q, K, V>
where Q: Ord + ToOwned<K>
{
// same basic logic of `swap` and `pop`, blended together
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ impl<K: Ord, V> Node<K, V> {
/// Searches for the given key in the node. If it finds an exact match,
/// `Found` will be yielded with the matching index. If it doesn't find an exact match,
/// `GoDown` will be yielded with the index of the subtree the key must lie in.
pub fn search<Sized? Q, NodeRef: Deref<Target=Node<K, V>>>(node: NodeRef, key: &Q)
pub fn search<Q: ?Sized, NodeRef: Deref<Target=Node<K, V>>>(node: NodeRef, key: &Q)
-> SearchResult<NodeRef> where Q: BorrowFrom<K> + Ord {
// FIXME(Gankro): Tune when to search linear or binary based on B (and maybe K/V).
// For the B configured as of this writing (B = 6), binary search was *significantly*
Expand All @@ -536,7 +536,7 @@ impl<K: Ord, V> Node<K, V> {
}
}

fn search_linear<Sized? Q>(&self, key: &Q) -> (bool, uint) where Q: BorrowFrom<K> + Ord {
fn search_linear<Q: ?Sized>(&self, key: &Q) -> (bool, uint) where Q: BorrowFrom<K> + Ord {
for (i, k) in self.keys().iter().enumerate() {
match key.cmp(BorrowFrom::borrow_from(k)) {
Greater => {},
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl<T: Ord> BTreeSet<T> {
/// assert_eq!(set.contains(&4), false);
/// ```
#[stable]
pub fn contains<Sized? Q>(&self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
pub fn contains<Q: ?Sized>(&self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
self.map.contains_key(value)
}

Expand Down Expand Up @@ -429,7 +429,7 @@ impl<T: Ord> BTreeSet<T> {
/// assert_eq!(set.remove(&2), false);
/// ```
#[stable]
pub fn remove<Sized? Q>(&mut self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool where Q: BorrowFrom<T> + Ord {
self.map.remove(value).is_some()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ impl<T: Ord> OrdSliceExt<T> for [T] {

#[unstable = "U should be an associated type"]
/// An extension trait for concatenating slices
pub trait SliceConcatExt<Sized? T, U> {
pub trait SliceConcatExt<T: ?Sized, U> {
/// Flattens a slice of `T` into a single value `U`.
#[stable]
fn concat(&self) -> U;
Expand Down
38 changes: 19 additions & 19 deletions src/libcore/borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,52 +54,52 @@ use self::Cow::*;

/// A trait for borrowing data.
#[old_orphan_check]
pub trait BorrowFrom<Sized? Owned> {
pub trait BorrowFrom<Owned: ?Sized> {
/// Immutably borrow from an owned value.
fn borrow_from(owned: &Owned) -> &Self;
}

/// A trait for mutably borrowing data.
#[old_orphan_check]
pub trait BorrowFromMut<Sized? Owned> : BorrowFrom<Owned> {
pub trait BorrowFromMut<Owned: ?Sized> : BorrowFrom<Owned> {
/// Mutably borrow from an owned value.
fn borrow_from_mut(owned: &mut Owned) -> &mut Self;
}

impl<Sized? T> BorrowFrom<T> for T {
impl<T: ?Sized> BorrowFrom<T> for T {
fn borrow_from(owned: &T) -> &T { owned }
}

impl<Sized? T> BorrowFromMut<T> for T {
impl<T: ?Sized> BorrowFromMut<T> for T {
fn borrow_from_mut(owned: &mut T) -> &mut T { owned }
}

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

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

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

impl<'a, T, Sized? B> BorrowFrom<Cow<'a, T, B>> for B where B: ToOwned<T> {
impl<'a, T, B: ?Sized> BorrowFrom<Cow<'a, T, B>> for B where B: ToOwned<T> {
fn borrow_from<'b>(owned: &'b Cow<'a, T, B>) -> &'b B {
&**owned
}
}

/// Trait for moving into a `Cow`
#[old_orphan_check]
pub trait IntoCow<'a, T, Sized? B> {
pub trait IntoCow<'a, T, B: ?Sized> {
/// Moves `self` into `Cow`
fn into_cow(self) -> Cow<'a, T, B>;
}

impl<'a, T, Sized? B> IntoCow<'a, T, B> for Cow<'a, T, B> where B: ToOwned<T> {
impl<'a, T, B: ?Sized> IntoCow<'a, T, B> for Cow<'a, T, B> where B: ToOwned<T> {
fn into_cow(self) -> Cow<'a, T, B> {
self
}
Expand Down Expand Up @@ -133,7 +133,7 @@ impl<T> ToOwned<T> for T where T: Clone {
/// }
/// }
/// ```
pub enum Cow<'a, T, Sized? B: 'a> where B: ToOwned<T> {
pub enum Cow<'a, T, B: ?Sized + 'a> where B: ToOwned<T> {
/// Borrowed data.
Borrowed(&'a B),

Expand All @@ -142,7 +142,7 @@ pub enum Cow<'a, T, Sized? B: 'a> where B: ToOwned<T> {
}

#[stable]
impl<'a, T, Sized? B> Clone for Cow<'a, T, B> where B: ToOwned<T> {
impl<'a, T, B: ?Sized> Clone for Cow<'a, T, B> where B: ToOwned<T> {
fn clone(&self) -> Cow<'a, T, B> {
match *self {
Borrowed(b) => Borrowed(b),
Expand All @@ -154,7 +154,7 @@ impl<'a, T, Sized? B> Clone for Cow<'a, T, B> where B: ToOwned<T> {
}
}

impl<'a, T, Sized? B> Cow<'a, T, B> where B: ToOwned<T> {
impl<'a, T, B: ?Sized> Cow<'a, T, B> where B: ToOwned<T> {
/// Acquire a mutable reference to the owned form of the data.
///
/// Copies the data if it is not already owned.
Expand Down Expand Up @@ -196,7 +196,7 @@ impl<'a, T, Sized? B> Cow<'a, T, B> where B: ToOwned<T> {
}

#[stable]
impl<'a, T, Sized? B> Deref for Cow<'a, T, B> where B: ToOwned<T> {
impl<'a, T, B: ?Sized> Deref for Cow<'a, T, B> where B: ToOwned<T> {
type Target = B;

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

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

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

#[stable]
impl<'a, 'b, T, U, Sized? B, Sized? C> PartialEq<Cow<'b, U, C>> for Cow<'a, T, B> where
impl<'a, 'b, T, U, B: ?Sized, C: ?Sized> PartialEq<Cow<'b, U, C>> for Cow<'a, T, B> where
B: PartialEq<C> + ToOwned<T>,
C: ToOwned<U>,
{
Expand All @@ -230,14 +230,14 @@ impl<'a, 'b, T, U, Sized? B, Sized? C> PartialEq<Cow<'b, U, C>> for Cow<'a, T, B
}

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

impl<'a, T, Sized? B> fmt::Show for Cow<'a, T, B> where B: fmt::Show + ToOwned<T>, T: fmt::Show {
impl<'a, T, B: ?Sized> fmt::Show for Cow<'a, T, B> where B: fmt::Show + ToOwned<T>, T: fmt::Show {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Borrowed(ref b) => fmt::Show::fmt(b, f),
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub trait Clone : Sized {
}

#[stable]
impl<'a, Sized? T> Clone for &'a T {
impl<'a, T: ?Sized> Clone for &'a T {
/// Return a shallow copy of the reference.
#[inline]
fn clone(&self) -> &'a T { *self }
Expand Down
Loading