Commit Graph

1104 Commits

Author SHA1 Message Date
JeremyLetang
dd21a51d29 move concurrent stuff from libextra to libsync 2014-02-05 11:56:04 -05:00
bors
acb1ec0b67 auto merge of #11230 : csherratt/rust/cow, r=alexcrichton
This allows patch adds a new arc type that allows for creation of copy-on-write data structures. The idea is that it is safe to mutate any data structure as long as it has only one reference to it. If there are multiple, it requires cloning of the data structure before mutation is possible.
2014-02-04 14:41:36 -08:00
bors
ef53b7a97c auto merge of #12026 : alexcrichton/rust/snapshots, r=cmr 2014-02-04 06:31:34 -08:00
bors
cdc678945f auto merge of #11951 : dmanescu/rust/reserve-rename, r=huonw
Changes in std::{str,vec,hashmap} and extra::{priority_queue,ringbuf}.
Fixes #11949
2014-02-04 04:31:34 -08:00
Alex Crichton
6c41192c41 Register new snapshots 2014-02-04 00:06:08 -08:00
Birunthan Mohanathas
f8afc9a5c1 extra: Move uuid to libuuid
cc #8784
2014-02-04 06:44:02 +02:00
David Manescu
65f3578148 Rename reserve to reserve_exact and reserve_at_least to reserve
Changes in std::{str,vec,hashmap} and extra::{priority_queue,ringbuf}.
Fixes #11949
2014-02-04 12:33:41 +11:00
bors
2877928b22 auto merge of #12016 : FlaPer87/rust/remove-non-copyable, r=alexcrichton
cc #10834
2014-02-03 16:31:33 -08:00
Flavio Percoco
c6b1bce96f Replace NonCopyable usage with NoPod
cc #10834
2014-02-04 00:15:27 +01:00
bors
fde11e7ae5 auto merge of #12012 : omasanori/rust/semver, r=alexcrichton
Done as a part of #8784.
2014-02-03 15:11:44 -08:00
Alex Crichton
acacfb20fd Various bug fixes and rebase conflicts 2014-02-03 12:05:16 -08:00
Alex Crichton
984727ff87 extra: Introduce a mutex type for native/green threads 2014-02-03 12:05:16 -08:00
Alex Crichton
21e8466eca extra: Re-add the Once primitve to extra::sync
This originally lived in std::unstable::mutex, but now it has a new home (and a
more proper one).
2014-02-03 12:04:30 -08:00
Alex Crichton
24631c8bcd extra: Add an intrusive MPSC to be used soon 2014-02-03 12:04:30 -08:00
Alex Crichton
a417de94a9 extra: Make room for more sync primitives 2014-02-03 12:04:30 -08:00
Alex Crichton
41cde566bb extra: Fix tests with io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
ef00c6a278 extra: Remove io_error usage 2014-02-03 09:32:33 -08:00
OGINO Masanori
fdb820a1be Move semver out of libextra.
Done as a part of #8784.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-02-03 17:18:27 +09:00
xales
51260f69cd Move term, terminfo out of extra.
cc #8784
2014-02-02 18:35:35 -05:00
bors
2bcd951749 auto merge of #11974 : huonw/rust/no-at-vec, r=pcwalton
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find.

I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship.

Closes #11967
2014-02-01 11:16:24 -08:00
Huon Wilson
2ed980fe25 std,extra: remove use of & support for @[]. 2014-02-02 02:59:03 +11:00
bors
df044ea4ac auto merge of #11944 : nathanielherman/rust/vec_opt, r=alexcrichton
Closes #11733
2014-02-01 07:21:23 -08:00
Patrick Walton
449a7a817f libextra: Remove @str from all the libraries 2014-02-02 01:44:50 +11:00
Virgile Andreani
b9a026afba Fix minor doc typos 2014-01-31 21:43:07 -08:00
Niko Matsakis
81d8328517 Introduce marker types for indicating variance and for opting out
of builtin bounds.

Fixes #10834.
Fixes #11385.
cc #5922.
2014-01-31 21:18:48 -05:00
Nathaniel Herman
339603426e Make pop_ref and mut_pop_ref return Option instead of failing on empty vectors 2014-01-30 18:41:43 -05:00
Nathaniel Herman
d451c15057 Make shift_ref and mut_shift_ref return Option instead of failing 2014-01-30 18:41:20 -05:00
bors
b3003e1e1a auto merge of #11895 : xales/rust/libstd, r=alexcrichton
Fixes #11814
2014-01-30 13:36:41 -08:00
Brendan Zabarauskas
729060dbb9 Remove Times trait
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-30 14:52:25 +11:00
xales
f17d972014 Remove seldom-used std::reference functions. 2014-01-29 20:31:03 -05:00
xales
d7f97e3018 Rename std::borrow to std::reference.
Fixes #11814
2014-01-29 20:31:03 -05:00
bors
e1580f6d09 auto merge of #11868 : bytbox/rust/remove-do, r=alexcrichton
Fixes #10815.
2014-01-29 08:21:38 -08:00
Scott Lawrence
badc580416 Removing do keyword from libextra 2014-01-29 09:15:41 -05:00
David Manescu
93398d16ec extra: move glob to libglob
In line with the dissolution of libextra - moves glob to its own library libglob.
Changes based on PR #11787. Updates .gitignore to ignore doc/glob.
2014-01-29 17:23:28 +11:00
David Manescu
4d0d3da9e4 extra: move arena to libarena
In line with the dissolution of libextra - #8784 - moves arena to its own library libarena.
Changes based on PR #11787. Updates .gitignore to ignore doc/arena.
2014-01-29 13:54:38 +11:00
bors
d21b18306c auto merge of #11826 : huonw/rust/7621-deriving-errors, r=alexcrichton
cc #7621.

See the commit message. I'm not sure if we should merge this now, or wait until we can write `Clone::clone(x)` which will directly solve the above issue with perfect error messages.
2014-01-27 20:26:35 -08:00
Huon Wilson
cb02a37042 syntax: make deriving have slightly less cryptic error messages.
This unfortunately changes an error like

    error: mismatched types: expected `&&NotClone` but found `&NotClone`

into

    error: type `NotClone` does not implement any method in scope named `clone`
2014-01-28 11:07:45 +11:00
Eduard Burtescu
15ba0c310a Demote self to an (almost) regular argument and remove the env param.
Fixes #10667 and closes #10259.
2014-01-27 14:31:24 +02:00
bors
0119e46204 auto merge of #11823 : derekchiang/rust/fix-barrier-doc, r=alexcrichton
The original comments weren't rendered correctly by Markdown.
2014-01-26 19:16:44 -08:00
bors
74fedf325a auto merge of #11787 : alexcrichton/rust/refactor, r=brson
It was decided a long, long time ago that libextra should not exist, but rather its modules should be split out into smaller independent libraries maintained outside of the compiler itself. The theory was to use `rustpkg` to manage dependencies in order to move everything out of the compiler, but maintain an ease of usability.

Sadly, the work on `rustpkg` isn't making progress as quickly as expected, but the need for dissolving libextra is becoming more and more pressing. Because of this, we've thought that a good interim solution would be to simply package more libraries with the rust distribution itself. Instead of dissolving libextra into libraries outside of the mozilla/rust repo, we can dissolve libraries into the mozilla/rust repo for now.

Work on this has been excruciatingly painful in the past because the makefiles are completely opaque to all but a few. Adding a new library involved adding about 100 lines spread out across 8 files (incredibly error prone). The first commit of this pull request targets this pain point. It does not rewrite the build system, but rather refactors large portions of it. Afterwards, adding a new library is as simple as modifying 2 lines (easy, right?). The build system automatically keeps track of dependencies between crates (rust *and* native), promotes binaries between stages, tracks dependencies of installed tools, etc, etc.

With this newfound buildsystem power, I chose the `extra::flate` module as the first candidate for removal from libextra. While a small module, this module is relative complex in that is has a C dependency and the compiler requires it (messing with the dependency graph a bit). Albeit I modified more than 2 lines of makefiles to accomodate libflate (the native dependency required 2 extra lines of modifications), but the removal process was easy to do and straightforward.

---

Testing-wise, I've cross-compiled, run tests, built some docs, installed, uninstalled, etc. I'm still working out a few kinks, and I'm sure that there's gonna be built system issues after this, but it should be working well for basic use!

cc #8784
2014-01-26 16:46:34 -08:00
Alex Crichton
cdfdc1eb6b Move extra::flate to libflate
This is hopefully the beginning of the long-awaited dissolution of libextra.
Using the newly created build infrastructure for building libraries, I decided
to move the first module out of libextra.

While not being a particularly meaty module in and of itself, the flate module
is required by rustc and additionally has a native C dependency. I was able to
very easily split out the C dependency from rustrt, update librustc, and
magically everything gets installed to the right locations and built
automatically.

This is meant to be a proof-of-concept commit to how easy it is to remove
modules from libextra now. I didn't put any effort into modernizing the
interface of libflate or updating it other than to remove the one glob import it
had.
2014-01-26 15:42:15 -08:00
bors
d3f70f5a7d auto merge of #11817 : salemtalha/rust/master, r=brson
Fixes Issue #11815
2014-01-26 15:26:30 -08:00
Salem Talha
cc61fc0994 Removed all instances of XXX in preparation for relaxing of FIXME rule 2014-01-26 14:42:53 -05:00
Derek Chiang
711726e518 Fix barrier docs 2014-01-26 14:18:25 -05:00
Alex Crichton
4d6836f418 Fix privacy fallout from previous change 2014-01-26 11:03:13 -08:00
bors
e36032e9e1 auto merge of #11808 : huonw/rust/std-visible-types, r=brson
These are either returned from public functions, and really should
appear in the documentation, but don't since they're private, or are
implementation details that are currently public.
2014-01-25 20:41:36 -08:00
Huon Wilson
0aef487a5c std,extra: Make some types public and other private.
These are either returned from public functions, and really should
appear in the documentation, but don't since they're private, or are
implementation details that are currently public.
2014-01-26 13:33:05 +11:00
Brian Anderson
2d27ad19fa Stop allocating so much in arena tests
Android bots are OOMing.
2014-01-25 15:38:44 -08:00
bors
b85fe01b94 auto merge of #11725 : derekchiang/rust/add-barrier, r=alexcrichton 2014-01-25 11:16:29 -08:00
Derek Chiang
a937d1875e Implement barrier. 2014-01-25 11:59:29 -05:00