Commit Graph

18430 Commits

Author SHA1 Message Date
bors
b0f3686515 auto merge of #6703 : sanxiyn/rust/allocation-lint, r=sanxiyn
Fix #6145. In particular, handle operator overloading.
2013-05-27 12:38:12 -07:00
bors
d98cc9995f auto merge of #6768 : lkuper/rust/3538, r=thestinger
There were several old `#[doc(hidden)]` attributes in libstd and
libextra, left over from when rustdoc didn't hide private
definitions, tagged with `FIXME #3538`.

Since #3538 is now closed, I removed the `#[doc(hidden)]` attributes
as well as the FIXMEs, but I left `#[doc(hidden)]` in
libstd/task/spawn.rs and libstd/task/rt.rs since those two are
apparently `pub`, as well as in libextra/std.rc since std/extra is
`pub`.
2013-05-27 11:41:08 -07:00
Seo Sanghyeon
8f80323f09 Remove unnecessary allocations flagged by lint 2013-05-28 03:14:44 +09:00
Seo Sanghyeon
363e672736 Use adjustments table for allocation lint 2013-05-28 03:12:13 +09:00
Lindsey Kuper
beec6e4b21 Get rid of no-longer-needed #[doc(hidden)] attributes.
There were several old `#[doc(hidden)]` attributes in libstd and
libextra, left over from when rustdoc didn't hide private
definitions, tagged with `FIXME #3538`.

Since #3538 is now closed, I removed the `#[doc(hidden)]` attributes
as well as the FIXMEs, but I left `#[doc(hidden)]` in
libstd/task/spawn.rs and libstd/task/rt.rs since those two are
apparently `pub`, as well as in libextra/std.rc since std/extra is
`pub`.
2013-05-27 13:29:48 -04:00
bors
3941f78a1b auto merge of #6763 : steveklabnik/rust/core_to_std, r=thestinger
When I submitted #6748 yesterday, I used the old name.

r? @thestinger
2013-05-27 07:08:04 -07:00
Steve Klabnik
e2fcb92a6d Fix docs to use std instead of core.
When I submitted #6748 yesterday, I used the old name.
2013-05-27 08:19:57 -05:00
bors
b7294e1f1b auto merge of #6433 : Dretch/rust/run-refactor, r=thestinger
...mentioned in #2625.

This change makes the module more oriented around
Process values instead of having to deal with process ids
directly.

Apart from issues mentioned in #2625, other changes include:
- Changing the naming to be more consistent - Process/process
  is now used instead of a mixture of Program/program and
  Process/process.
- More docs/tests.

Some io/scheduler related issues remain (mentioned in #2625). I am not sure how best to address these.
2013-05-27 06:05:00 -07:00
gareth
04a39359f8 Rename unwrap_input/unwrap_output as suggested by
@brson. Also fix a few documentation bugs.
2013-05-27 13:50:33 +01:00
gareth
49a1ab8745 Make test_change_working_directory change the current
directory to be the parent of the current-current directory,
instead of changing to the tmp directory, which was causing
issues with OS X and its /tmp => /private/tmp symlink.
2013-05-27 13:50:33 +01:00
gareth
76c31217be Refactor core::run in order to address many of the issues
mentioned in #2625.

This change makes the module more oriented around
Process values instead of having to deal with process ids
directly.

Apart from issues mentioned in #2625, other changes include:
- Changing the naming to be more consistent - Process/process
  is now used instead of a mixture of Program/program and
  Process/process.
- More docs/tests.

Some io/scheduler related issues remain (mentioned in #2625).
2013-05-27 13:50:33 +01:00
bors
d577eafff3 auto merge of #6688 : graydon/rust/issue-3396-mystery-bug-in-metadata, r=Aatch
Whatever it was, it is no longer a problem here.
2013-05-27 04:38:04 -07:00
bors
a6b05b385a auto merge of #6761 : ILyoan/rust/ctags, r=thestinger 2013-05-27 02:41:12 -07:00
bors
fa67e091e4 auto merge of #6719 : kud1ing/rust/rustc_w, r=bstrie
Fixes #6697
2013-05-26 22:26:06 -07:00
ILyoan
998cbbd739 update ctags define 2013-05-27 13:58:27 +09:00
bors
f5d4ea84f5 auto merge of #6748 : steveklabnik/rust/bool_docs, r=thestinger
There was some before, but now we have a big header, as well as
lots of individual bits of documentation.
2013-05-26 10:32:02 -07:00
bors
1f8c4b096d auto merge of #6700 : ben0x539/rust/nestvariantdocs, r=thestinger
This indents all but the first line of multi-line annotations for individual enum variants with four spaces so that pandoc will recognize everything as belonging to the same list item.

Since that introduces `<p>` tags for some list items, I've gone ahead and inserted blank lines after each list item so that consistently get `<p>` tags for all `<li>`s documenting variants. It's a bit less compact now but still tolerable, I think.
2013-05-26 09:35:00 -07:00
Steve Klabnik
9bb8077c18 Add documentation for libstd/bool.rs.
There was some before, but now we have a big header, as well as
lots of individual bits of documentation.
2013-05-26 09:39:55 -05:00
bors
f254d119ea auto merge of #6742 : Aatch/rust/mut-noalias, r=thestinger
This marks `&mut` function arguments with the `noalias` attribute. Since the borrow checker enforces this property, this is worth doing.

I'm not sure if the place I'm doing it in is ideal, but it generates the correct code.

Closes #6350
2013-05-26 05:50:00 -07:00
Benjamin Herr
d89a6ceb1b rustdoc: properly nest markup within enum variant lists (fixes #6605)
This indents all but the first line of multi-line annotations for
individual enum variants with four spaces so that pandoc will
recognize everything as belonging to the same list item.

Since that introduces `<p>` tags for some list items, I've gone ahead
and inserted blank lines after each list item so that consistently
get `<p>` tags for all `<li>`s documenting variants. It's a bit less
compact now but still tolerable, I think.
2013-05-26 12:06:32 +02:00
James Miller
2c2346e3d4 Mark &mut parameters as noalias 2013-05-26 17:40:07 +12:00
bors
510d0f221c auto merge of #6687 : catamorphism/rust/list_dir_empty, r=catamorphism
r? @brson (Yes, this did happen in real life...)
2013-05-25 21:16:57 -07:00
Tim Chevalier
a243ea39c3 testsuite: Add a test for listing the root directory...
...and don't treat Path("/") like Path("").
2013-05-25 20:47:44 -07:00
Tim Chevalier
196851c4c9 core: Fail with a better error message when list_dir gets an empty path
(Yes, this did happen in real life...)
2013-05-25 20:47:43 -07:00
bors
e2f8b51dc5 auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=brson
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date.

Closes #4219.
2013-05-25 15:13:54 -07:00
bors
2706271317 auto merge of #6732 : Aatch/rust/atomic-types, r=brson
This pull request is more of an RFC than a finished implementation.

It adds some basic atomic types, with an interface modelled off of C++11's atomic types.

It also adds free functions that provide a slightly nicer interface for atomic operations, though they are unsafe because there isn't a way to be generic over "word-sized" types.

See also #5042
2013-05-25 14:13:55 -07:00
bors
9d37d038fe auto merge of #6737 : dotdash/rust/static_keywords, r=pcwalton
Currently, keywords are stored in hashsets that are recreated for every
Parser instance, which is quite expensive since macro expansion creates
lots of them. Additionally, the parser functions that look for a keyword
currently accept a string and have a runtime check to validate that they
actually received a keyword.

By creating an enum for the keywords and inserting them into the
ident interner, we can avoid the creation of the hashsets and get static
checks for the keywords.

For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
2013-05-25 11:04:58 -07:00
Björn Steinbrink
6c62d77830 Use an enum for keywords and intern them to improve parser performance
Currently, keywords are stored in hashsets that are recreated for every
Parser instance, which is quite expensive since macro expansion creates
lots of them. Additionally, the parser functions that look for a keyword
currently accept a string and have a runtime check to validate that they
actually received a keyword.

By creating an enum for the keywords and inserting them into the
ident interner, we can avoid the creation of the hashsets and get static
checks for the keywords.

For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
2013-05-25 17:57:22 +02:00
bors
6e65a3fa15 auto merge of #6734 : huonw/rust/gitignore, r=thestinger 2013-05-25 03:26:00 -07:00
Huon Wilson
257192c69e Ignore the generated docs for libextra 2013-05-25 17:07:18 +10:00
bors
b238a08725 auto merge of #6728 : alexcrichton/rust/update-linenoise, r=Aatch
This updates the bundled linenoise library, and explicitly builds it with UTF8 support. This way rusti correctly handles utf8 characters when doing line operations.

Closes #6681
2013-05-24 23:34:58 -07:00
James Miller
523360415c Add basic atomic types 2013-05-25 17:51:26 +12:00
Alex Crichton
bf4d3729e8 Fix compilation errors with linenoise 2013-05-25 00:40:12 -05:00
bors
d930b2cafb auto merge of #6730 : hjr3/rust/exit_code, r=z0w0
Scripts need to know if the tests pass or the program ran correctly.
2013-05-24 22:37:54 -07:00
bors
0628c92540 auto merge of #6726 : alexcrichton/rust/filter-blocks, r=z0w0
Among other things, this suppresses a spurious unused import warning in the compiler right now.
2013-05-24 21:25:54 -07:00
Alex Crichton
af27e17992 Set the USE_UTF8 flag for linenoise to handle utf8-input 2013-05-24 22:32:55 -05:00
Alex Crichton
876ce10264 Update the linenoise library 2013-05-24 22:32:55 -05:00
bors
5f90f1ca1d auto merge of #6723 : osaut/rust/arc-remove-get, r=brson
* Remove clone and get functions from ARC.
* Update the tests and bench.
2013-05-24 19:01:51 -07:00
Alex Crichton
ac6c15aece Actually filter view_items in blocks 2013-05-24 17:31:15 -05:00
Olivier Saut
ff28bb7839 Remove the clone function for the method 2013-05-24 22:54:58 +02:00
Olivier Saut
f2125434d8 Remove the get function
Rust is now preferring methods over functions and there is no legacy with ARC
2013-05-24 22:51:24 +02:00
Herman J. Radtke III
264c84b892 Make rust {test, run} exit with appropriate code.
Scripts need to know if the tests pass or the program ran correctly.
2013-05-24 13:41:53 -07:00
bors
9a40c5c8dd auto merge of #6714 : thomaslee/rust/rustrt-stage, r=brson
As discussed with @brson on IRC:

This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by a stage0 rustc.

Example of the _RUST_STAGEN flag in action here: https://gist.github.com/thomaslee/5641890

I'm not sure what tests for this change should look like, so please advise if I need to do some work around that.
2013-05-24 13:40:51 -07:00
Alex Crichton
03ae629259 Remove the #[merge] hack from the parser 2013-05-24 15:32:06 -05:00
Alex Crichton
ec8fb884e9 Remove usage of the #[merge] hack with int modules 2013-05-24 15:31:34 -05:00
Lenny222
1009c21ad7 show options for -W help and -W 2013-05-24 21:32:30 +02:00
bors
b5ab1012f1 auto merge of #6680 : ben0x539/rust/slashslashslash, r=graydon
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes,

    /////////////
    // like so //
    /////////////

Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input.

I figure the best plan here is to just declare that a comment that is exactly `///` is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.
2013-05-24 05:34:45 -07:00
bors
2f69bb9ba9 auto merge of #6712 : thestinger/rust/derive, r=catamorphism 2013-05-24 02:04:47 -07:00
bors
5787bf3093 auto merge of #6711 : catamorphism/rust/issue-5700, r=thestinger
r? @nikomatsakis
2013-05-24 01:04:40 -07:00
Tom Lee
e69e80938b Define _RUST_STAGEN when building rustrt.
This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by stage0.

This should help pave the way to completing #6575, which will likely
require changes to type signatures for spawn_fn & glue_fn in rustrt.
2013-05-24 00:30:01 -07:00