Commit Graph

25256 Commits

Author SHA1 Message Date
bors 4329fc6730 auto merge of #11045 : jhasse/rust/patch-libdir, r=alexcrichton
See https://github.com/mozilla/rust/issues/5223#issuecomment-30455086
2014-01-07 12:26:32 -08:00
bors 1d40fd4a95 auto merge of #11263 : niftynif/rust/btree, r=catamorphism
Apologies for junking up the feed with all of these separate pull requests.  I'm still getting the hang of git and will hopefully be doing less of this nonsense soon.  I opened up another PR and closed the one from earlier today because the first PR was coming from the wrong branch of my repo.
Anyway, this contains a fleshed-out implementation of TotalEq/TotalOrd/Clone/ToStr for the whole B-tree structure and relevant tests, integrating suggestions and comments from several community members.
r? @catamorphism
2014-01-07 11:01:41 -08:00
bors 7dbd12a4fa auto merge of #11353 : alexcrichton/rust/improve-logging, r=brson
This will allow capturing of common things like logging messages, stdout prints
(using stdio println), and failure messages (printed to stderr).  Any new prints
added to libstd should be funneled through these task handles to allow capture
as well.

Additionally, this commit redirects logging back through a `Logger` trait so the
log level can be usefully consumed by an arbitrary logger.

This commit also introduces methods to set the task-local stdout handles:

* std::io::stdio::set_stdout
* std::io::stdio::set_stderr
* std::io::logging::set_logger

These methods all return the previous logger just in case it needs to be used
for inspection.

I plan on using this infrastructure for extra::test soon, but we don't quite
have the primitives that I'd like to use for it, so it doesn't migrate
extra::test at this time.

Closes #6369
2014-01-07 09:41:35 -08:00
Jan Niklas Hasse 116773a4eb Make CFG_LIBDIR configurable. Fixes #5223 2014-01-07 17:51:15 +01:00
Jan Niklas Hasse 7b7d7a041a Remove trailing whitespace 2014-01-07 17:45:41 +01:00
bors 3912a8779e auto merge of #11350 : kchmck/rust/fix-pdf-glitches, r=alexcrichton
I was reading through the tutorial and manual pdfs and noticed some of the code blocks have glitches in their formatting:

![](http://i.imgur.com/9HXZ4dW.png)
![](http://i.imgur.com/Ds2By6j.png)

Putting empty lines around the blocks fixes this. I did a search through the other markdown files and made the change there as well.
2014-01-07 08:26:33 -08:00
bors 983f307e12 auto merge of #11348 : alexcrichton/rust/snapshots, r=brson 2014-01-07 07:11:36 -08:00
bors 5f39d64f21 auto merge of #11342 : huonw/rust/trie-mut, r=alexcrichton
- Add `mut_iter`, `mut_lower_bound`, `mut_upper_bound`
- Remove some internal iterators
- Add benchmarks
- Improve performance of `{mut_,}{lower,upper}_bound`
- Minor clean-up of `extra::treemap` after I realised I wasn't exploiting macros to their full DRY potential.
2014-01-07 05:56:36 -08:00
Huon Wilson 167d533fe0 extra::treemap: use the dummy-macro trick with items to make the
iterator macro properly hygiene.

Requires less repetition of `mut` or not too.
2014-01-08 00:31:24 +11:00
Huon Wilson 7e446af759 std::trie: make lower_bound and upper_bound about 15% faster.
I believe this is mainly due to code-size reduction.

Before:

    test [...]::bench_lower_bound ... bench:       818 ns/iter (+/- 100)
    test [...]::bench_upper_bound ... bench:       939 ns/iter (+/- 34)

After:

    test [...]::bench_lower_bound ... bench:       698 ns/iter (+/- 60)
    test [...]::bench_upper_bound ... bench:       817 ns/iter (+/- 20)
2014-01-08 00:31:24 +11:00
Huon Wilson 3395f9d6a1 std::trie: Add some iteration/search benchmarks. 2014-01-08 00:31:24 +11:00
Huon Wilson fe03caedf0 std::trie: use macros to share code between the iterator implementations. 2014-01-08 00:31:24 +11:00
Huon Wilson f07c74d93a std::trie: remove some obsolete internal iterators. 2014-01-08 00:31:24 +11:00
Huon Wilson a0643ee9ae std::trie: add an mutable-values iterator. 2014-01-08 00:31:23 +11:00
bors ba6ed004b0 auto merge of #11347 : alexcrichton/rust/issue-11346, r=brson
This ends up causing weird errors like those seen in #11346

Closes #11346
2014-01-07 04:41:39 -08:00
bors bc395bc71e auto merge of #11329 : fhahn/rust/unused-cast-lint2, r=alexcrichton
Updates as mentioned in #11135
2014-01-07 01:51:39 -08:00
bors 777f1e8d24 auto merge of #11355 : alexcrichton/rust/read-waits-forever, r=brson
All the fun is down below.
2014-01-06 23:36:46 -08:00
Alex Crichton 89f8bc2561 Fix parallel makefile builds
All the copying of files amongst one another was apparently causing something to
get corrupted. Instead of having files fly around, just update the directories
to link to.
2014-01-06 21:55:15 -08:00
bors 07950e740c auto merge of #11296 : brson/rust/anti-cond, r=alexcrichton
In preparation for removing conditions.
2014-01-06 21:51:38 -08:00
bors 5efac2bee1 auto merge of #11356 : brson/rust/0.9relnotes, r=alexcrichton 2014-01-06 19:41:42 -08:00
Nif Ward 20ccfdecd4 Added in Clone/TotalEq/TotalOrd/ToStr traits to all parts of btree.
Equals is now compact and uses vec's equals method.  Cmp compares
all elements on branches and leaves (Nodes).
2014-01-06 21:19:36 -05:00
Alex Crichton 03e91573c7 Don't read forever on a file descriptor
Similarly to the recent commit to do this for networking, there's no reason that
a read on a file descriptor should continue reading until the entire buffer is
full. This makes sense when dealing with literal files, but when dealing with
things like stdin this doesn't make sense.
2014-01-06 16:32:51 -08:00
bors b6602cb74b auto merge of #11354 : brson/rust/versionwin, r=alexcrichton
The makefiles and the windows installer disagree on the name of this file. In practical terms this change only means that the '-pre' installers will be named 'rust-0.9-pre-install.exe' instead 'rust-0.9-install.exe'.
2014-01-06 16:31:52 -08:00
Brian Anderson f28aa662d2 Update AUTHORS.txt 2014-01-06 15:01:34 -08:00
Brian Anderson 79def2ca69 More 0.9 release notes 2014-01-06 14:52:16 -08:00
bors 1f1838ea3e auto merge of #11123 : alan-andrade/rust/move_wiki_to_internal_docs, r=brson
This is not done yet but I'm posting it to get feedback.

The wiki has a ton of different tutorials/manuals/faq and so forth. Instead of migrating all of them right now, I just migrated the following:

* The general main wiki page
* Language FAQ
* Project FAQ

If this feels reasonable, please comment so that I can continue with confidence.
2014-01-06 14:26:38 -08:00
Brian Anderson 21f9fa4850 Delete the installer exe when cleaning 2014-01-06 14:18:35 -08:00
Brian Anderson 2297b08009 Use the full version string for the windows installer exe 2014-01-06 14:02:35 -08:00
Alan Andrade 7de2379013 rust_version.html is a HTML_DEPS and every html has it as dependecy 2014-01-06 15:38:20 -06:00
Alan Andrade e53b5661a7 First phase of migrating the wiki to the internal docs #11078 2014-01-06 15:27:49 -06:00
Alex Crichton ac2a24ecc9 Support arbitrary stdout/stderr/logger handles
This will allow capturing of common things like logging messages, stdout prints
(using stdio println), and failure messages (printed to stderr).  Any new prints
added to libstd should be funneled through these task handles to allow capture
as well.

Additionally, this commit redirects logging back through a `Logger` trait so the
log level can be usefully consumed by an arbitrary logger.

This commit also introduces methods to set the task-local stdout handles:

* std::io::stdio::set_stdout
* std::io::stdio::set_stderr
* std::io::logging::set_logger

These methods all return the previous logger just in case it needs to be used
for inspection.

I plan on using this infrastructure for extra::test soon, but we don't quite
have the primitives that I'd like to use for it, so it doesn't migrate
extra::test at this time.

Closes #6369
2014-01-06 13:19:53 -08:00
bors 400070ae55 auto merge of #10826 : SimonSapin/rust/str-insert, r=brson
I could not run the tests because of unrelated building issue, sorry about that.
2014-01-06 13:11:38 -08:00
Florian Hahn 8236550104 Remove some unnecessary type casts
Conflicts:
	src/librustc/middle/lint.rs
2014-01-06 21:28:54 +01:00
Florian Hahn 6be2bc817b Add lint for unnecessary casts 2014-01-06 21:28:49 +01:00
bors 3afa0b97c4 auto merge of #11335 : rlane/rust/fix-vector-doc, r=alexcrichton 2014-01-06 11:56:37 -08:00
bors 0da105a8b7 auto merge of #11334 : alexcrichton/rust/fix-native-tcp, r=pcwalton
libnative erroneously would attempt to fill the entire buffer in a call to
`read` before returning, when rather it should return immediately because
there's not guaranteed to be any data that will ever be received again.

Close #11328
2014-01-06 10:31:46 -08:00
Mick Koch 5464d48e90 Fix formatting of some code blocks in pdf docs
Code blocks apparently need to be surrounded by whitespace to be output
correctly when generating pdfs
2014-01-06 12:56:41 -05:00
Alex Crichton 6b2a6cb3fe Register new snapshots 2014-01-06 09:26:47 -08:00
Alex Crichton b7e58ce554 Don't attempt duplicate outputs
This ends up causing weird errors like those seen in #11346

Closes #11346
2014-01-06 09:23:24 -08:00
bors 8b71b6415d auto merge of #11333 : cmr/rust/triage2, r=alexcrichton 2014-01-06 08:41:45 -08:00
bors bae091e517 auto merge of #11332 : sfackler/rust/de-at-se, r=huonw
This is necessary for #11151 to make sure dtors run before the libraries
are unloaded.
2014-01-06 07:26:48 -08:00
bors 55bb5e584c auto merge of #11327 : nielsle/rust/rustpkg_argparse, r=alexcrichton
Rearrange some code in rustpkg:

* Move command line argument parsing to  parse_args.rs
* Introduce an enum to descibe commands such as Build, Install, and Clean.
* Move sysroot from Context to BuildContext, to make parse_args  more modular.

This is my first pull request, so please tell me if there is anything I need to do.
2014-01-06 05:56:52 -08:00
bors 03a38b9aff auto merge of #11161 : eddyb/rust/de-at-visitor, r=huonw
The primary user of `@T`/`P<T>` references from `Visitor` was `ast_map`, which in turn had two users (phase 3 in rustc and a step in loading items from metadata).
Both of them have been rewritten to use `ast_map` as a folder (this might speed up the compilation time of stage2 rustc by 100-200ms just because a fold + a visit are merged together).
2014-01-06 04:41:38 -08:00
Eduard Burtescu 3119d18e55 Disowned the Visitor. 2014-01-06 14:00:46 +02:00
bors e5eab2c7b6 auto merge of #11321 : huonw/rust/treemap-mut, r=alexcrichton
This requires a single `*mut` pointer to implement; I've justified its existence & correctness in the code.

Also, converts the mutable and immutable iterators to share code with some macro ~~madness~~ manipulation.
2014-01-06 03:21:40 -08:00
bors 4e622becdc auto merge of #11118 : jhasse/rust/patch-rustlibdir, r=alexcrichton
...stlib. Fixes #3319
2014-01-06 02:01:49 -08:00
bors c58bb23521 auto merge of #11315 : alexcrichton/rust/issue-11309, r=huonw
There was a scheduling race where a child may not increment the global task
count before the parent exits, and the parent would then think that there are no
more tasks left.

Closes #11039
2014-01-06 00:31:57 -08:00
Alex Crichton 11e568c886 Don't wait for a full buffer when reading TCP
libnative erroneously would attempt to fill the entire buffer in a call to
`read` before returning, when rather it should return immediately because
there's not guaranteed to be any data that will ever be received again.

Close #11328
2014-01-06 00:08:18 -08:00
Rich Lane 8bd52024ae doc: update reference to new vector size syntax 2014-01-05 22:38:16 -08:00
Alex Crichton 9c8813f006 Guarantee that native tasks wait for children
There was a scheduling race where a child may not increment the global task
count before the parent exits, and the parent would then think that there are no
more tasks left.
2014-01-05 22:28:23 -08:00