Commit Graph

27587 Commits

Author SHA1 Message Date
bors
1cd0a5ed26 auto merge of #13093 : Havvy/rust/master, r=sfackler
This will make the types more readable in the documentation, since the letters correspond with what you should either be sending or expecting to receive.
2014-03-23 06:06:54 -07:00
Huon Wilson
f6db0ef946 std: remove the equals method from TotalEq.
`TotalEq` is now just an assertion about the `Eq` impl of a
type (i.e. `==` is a total equality if a type implements `TotalEq`) so
the extra method is just confusing.

Also, a new method magically appeared as a hack to allow deriving to
assert that the contents of a struct/enum are also TotalEq, because the
deriving infrastructure makes it very hard to do anything but create a
trait method. (You didn't hear about this horrible work-around from me
:(.)
2014-03-23 23:48:10 +11:00
Piotr Czarnecki
f0f5072566 rustc: Change the filename of compressed bitcode
Fixes #12992
Store compressed bitcode files in rlibs with a different extension. Compression doesn't interfere with --emit=bc.
Regression test compares outputs.
2014-03-23 13:36:49 +01:00
bors
06be5f7c44 auto merge of #13092 : sfackler/rust/buffer-vec, r=thestinger
`Vec` is now used for the internal buffer instead of `~[]`. Some module
level documentation somehow ended up attached to `BufferedReader` so I
fixed that as well.
2014-03-23 04:01:59 -07:00
Flavio Percoco
576e36e674 Register new snapshots 2014-03-23 11:37:31 +01:00
bors
11c6817e13 auto merge of #13090 : thestinger/rust/iter, r=Aatch
This has been rendered obsolete by partial type hints. Since the `~[T]`
type is in the process of being removed, it needs to go away.
2014-03-23 02:41:53 -07:00
Daniel Micay
ae429056ff iter: remove to_owned_vec
This needs to be removed as part of removing `~[T]`. Partial type hints
are now allowed, and will remove the need to add a version of this
method for `Vec<T>`. For now, this involves a few workarounds for
partial type hints not completely working.
2014-03-23 05:41:23 -04:00
bors
2ddb605654 auto merge of #13088 : thestinger/rust/hashmap, r=cmr
Closes #5283
2014-03-22 23:46:58 -07:00
Daniel Micay
3829ac2a52 use TotalEq for HashMap
Closes #5283
2014-03-23 01:59:11 -04:00
bors
3d9fdf7165 auto merge of #13089 : thestinger/rust/managed, r=Aatch
This removes two tests built on `managed::refcount`, but these issues
are well-covered elsewhere for non-managed types.
2014-03-22 20:11:55 -07:00
Daniel Micay
31d5ffc5bd make std::managed private
This removes two tests built on `managed::refcount`, but these issues
are well-covered elsewhere for non-managed types.
2014-03-22 22:33:16 -04:00
Ryan Scheel (Havvy)
f62bdfc134 Change types T,U to R (recv), S (sender) in libsync/comm.rs 2014-03-22 17:50:59 -07:00
Steven Fackler
56cf09c69c Some cleanup in std::io::buffered
`Vec` is now used for the internal buffer instead of `~[]`. Some module
level documentation somehow ended up attached to `BufferedReader` so I
fixed that as well.
2014-03-22 17:26:40 -07:00
bors
94e4e91724 auto merge of #13087 : eddyb/rust/fix-autoderef, r=cmr
Implements vtable support for generic Deref impls with trait bounds.
Also fixes cross-crate inlining when using autoderef.
2014-03-22 17:21:51 -07:00
Eduard Burtescu
087ec2aa24 Implement cross-crate support for autoderef.
Closes #13044.
2014-03-23 01:11:39 +02:00
bors
e68550e7ac auto merge of #13085 : edwardw/rust/saddest-cell, r=cmr 2014-03-22 16:06:51 -07:00
Eduard Burtescu
75d7d5210a Implement vtable support for autoderef.
Closes #13042.
2014-03-22 23:31:42 +02:00
bors
6f430c4426 auto merge of #13084 : Havvy/rust/master, r=alexcrichton
The indentation looks off in the guide because the main() function is not shown, so I'm dedenting the visible function.
2014-03-22 14:16:50 -07:00
bors
7e7a5e3d3e auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichton
This PR removes the `Freeze` kind and the `NoFreeze` marker completely.

Fixes #12577

cc @nikomatsakis r?
2014-03-22 13:01:52 -07:00
Ryan Scheel (Havvy)
a73d2c70d4 Unindent stringifier() in tasks guide 2014-03-22 11:54:19 -07:00
Edward Wang
7c3ed86e5a Get rid of @Cell 2014-03-23 02:53:35 +08:00
bors
0e6f90eb89 auto merge of #12995 : Kroisse/rust/vec_ng_mut_slices, r=alexcrichton
These functions are implemented for &mut [T], but std::vec_ng::Vec has not yet.
2014-03-22 11:06:46 -07:00
Eunchong Yu
5b03050f66 Add Vec::mut_slice_from(), mut_slice_to(), and mut_split_at() 2014-03-23 02:26:25 +09:00
bors
403e869571 auto merge of #13053 : alexcrichton/rust/removing-ref-cell-get, r=huonw
This commit removes the `get()` method from `Ref` and `RefMut` in favor of the `*` operator, and removes all usage of the `deref()` function manually from rustc, favoring using `*` instead.

Some of the code is a little wacky, but that's due to either #13044 or #13042
2014-03-22 09:51:49 -07:00
Alex Crichton
02dab5a3e7 rand: Use fill() instead of read()
It's possible for a reader to have a short read, and there's no reason the task
should fail in this scenario. By using fill(), this has a stronger guarantee
that the buffer will get filled with data.
2014-03-22 08:57:58 -07:00
Alex Crichton
5560383071 std: Add an I/O reader method to fill a buffer
I've found a common use case being to fill a slice (not an owned vector)
completely with bytes. It's posible for short reads to happen, and if you're
trying to get an exact number of bytes then this helper will be useful.
2014-03-22 08:57:58 -07:00
Alex Crichton
9dc357b8ed rustuv: Remove usage of get() 2014-03-22 08:56:21 -07:00
Alex Crichton
3fb1ed0e04 rustc: Remove all usage of manual deref()
Favor using '*' instead
2014-03-22 08:48:34 -07:00
Alex Crichton
76f0b1ad1f test: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
Alex Crichton
6a7fd8cfa5 rustdoc: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
Alex Crichton
0dbb909bf7 rustc: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
Alex Crichton
9a37416dbe arena: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
Alex Crichton
f3682b5639 syntax: Fix fallout of removing get() 2014-03-22 08:48:20 -07:00
Alex Crichton
cd510b3382 std: Remove the get() method from RefCell wrappers
This method has been entirely obsoleted by autoderef, so there's no reason for
its existence.
2014-03-22 08:48:20 -07:00
bors
5e8e1b515a auto merge of #13078 : klutzy/rust/issue-13075, r=alexcrichton
`FormatMessageW()` is called by `std::os::last_os_error()` to convert
errno into string, but the function may fail on non-english locale.
I don't know why it fails, but anyway it's better to return errno
than to `fail!()` in the case.

Fixes #13075
Fixes #13073
2014-03-22 08:36:50 -07:00
klutzy
cffe9e041d std::os: Handle FormatMessage failure
`FormatMessageW()` is called by `std::os::last_os_error()` to convert
errno into string, but the function may fail on non-english locale.
I don't know why it fails, but anyway it's better to return errno
than to `fail!()` in the case.

Fixes #13075
Fixes #13073
2014-03-22 23:57:13 +09:00
Flavio Percoco
a1cb2f5d8c doc: Remove Freeze / NoFreeze from docs 2014-03-22 15:47:34 +01:00
Flavio Percoco
90e9d8ee62 test: Remove Freeze / NoFreeze from tests 2014-03-22 15:47:34 +01:00
Flavio Percoco
b4ddee6327 std: Remove the Freeze kind and the NoFreeze marker 2014-03-22 15:47:34 +01:00
Flavio Percoco
034e1382af cell: Remove Freeze / NoFreeze 2014-03-22 15:47:34 +01:00
Flavio Percoco
16e07602f9 std::comm: Remove Freeze / NoFreeze 2014-03-22 15:47:34 +01:00
Flavio Percoco
0169abd91d sync: Remove Freeze / NoFreeze 2014-03-22 15:47:33 +01:00
Flavio Percoco
392348f347 arena: Remove Freeze / NoFreeze 2014-03-22 15:47:33 +01:00
Flavio Percoco
aa7519400e rustc: Remove special treatment for Freeze and NoFreeze
Fixes #12577
2014-03-22 15:44:13 +01:00
bors
e233a43f5a auto merge of #13062 : mbrubeck/rust/doc-edit, r=alexcrichton
This is a very minor edit to the tutorial section on references.

Reading this section for the first time, I stumbled on the phrase "a reference can be borrowed to any object."  Its meaning was clear enough once I got it, but I had to re-read it a couple of times to parse it correctly.  Something about the passive voice plus the way "reference to any object" is split up by the verb phrase.  How about this instead?
2014-03-22 07:21:44 -07:00
bors
30165e059c auto merge of #13052 : sfackler/rust/clean-refcell, r=alexcrichton
These are superfluous now that we have fixed rvalue lifetimes and Deref.

I'd also like to kill off `get` and `set`, but that'll be a large change so I want to make sure that we actually want to do that first.
2014-03-22 04:56:49 -07:00
Alex Crichton
4fdff3e44e native: Fix a possible deadlock in spawn
The OSX bots have been deadlocking recently in the rustdoc tests. I have only
been able to rarely reproduce the deadlock on my local setup. When reproduced,
it looks like the child process is spinning on the malloc mutex, which I
presume is locked with no other threads to unlock it.

I'm not convinced that this is what's happening, because OSX should protect
against this with pthread_atfork by default. Regardless, running as little code
as possible in the child after fork() is normally a good idea anyway, so this
commit moves all allocation to the parent process to run before the child
executes.

After running 6k iterations of rustdoc tests, this deadlocked twice before, and
after 20k iterations afterwards, it never deadlocked. I draw the conclusion that
this is either sweeping the bug under the rug, or it did indeed fix the
underlying problem.
2014-03-22 01:09:23 -07:00
bors
092afdba3c auto merge of #12907 : alexcrichton/rust/issue-12892, r=brson
These methods can be mistaken for general "read some bytes" utilities when
they're actually only meant for reading an exact number of bytes. By renaming
them it's much clearer about what they're doing without having to read the
documentation.

Closes #12892
2014-03-22 00:56:47 -07:00
bors
993dee4f14 auto merge of #13051 : alexcrichton/rust/issue-13047, r=thestinger
It's useful for structures which use deriving(Clone), even though it's
implicitly copyable.

Closes #13047
2014-03-21 22:41:42 -07:00
bors
069cede305 auto merge of #13036 : alexcrichton/rust/atomics, r=alexcrichton
Closes #11583, rebasing of #12430 now that we've got `Share` and better analysis with statics.
2014-03-21 21:31:42 -07:00