Commit Graph

25967 Commits

Author SHA1 Message Date
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
Alex Crichton
31ac9c4288 Change private structs to have private fields by default
This was the original intention of the privacy of structs, and it was
erroneously implemented before. A pub struct will now have default-pub fields,
and a non-pub struct will have default-priv fields. This essentially brings
struct fields in line with enum variants in terms of inheriting visibility.

As usual, extraneous modifiers to visibility are disallowed depend on the case
that you're dealing with.

Closes #11522
2014-01-26 10:37:08 -08:00
Virgile Andreani
4004493f8a Unhide lines in rustdoc's doc -- Closes #11645 2014-01-26 13:39:39 +01:00
Huon Wilson
0b7f823156 syntax: Fix a missing closing code tag in docs. 2014-01-26 23:39:32 +11:00
Alex Crichton
2611483894 Refactor the build system for easily adding crates
Before this patch, if you wanted to add a crate to the build system you had to
change about 100 lines across 8 separate makefiles. This is highly error prone
and opaque to all but a few. This refactoring is targeted at consolidating this
effort so adding a new crate adds one line in one file in a way that everyone
can understand it.
2014-01-26 00:53:41 -08:00
bors
838b5a4cc0 auto merge of #11762 : alexcrichton/rust/guard_pages, r=alexcrichton
Rebasing of the previous PRs, I believe I've found the problems.
2014-01-26 00:51:35 -08:00
Alex Crichton
8c43ce6d94 Bring in the line-length police 2014-01-26 00:49:23 -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
bors
e139b49eef auto merge of #11805 : brson/rust/smallerarenas, r=brson
Android bots are OOMing.
2014-01-25 19:11:34 -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
bors
897a0a388f auto merge of #11803 : sfackler/rust/simple-mac, r=brson
Now that procedural macros can be implemented outside of the compiler,
it's more important to have a reasonable API to work with. Here are the
basic changes:

* Rename SyntaxExpanderTTTrait to MacroExpander, SyntaxExpanderTT to
    BasicMacroExpander, etc. I think "procedural macro" is the right
    term for these now, right? The other option would be SynExtExpander
    or something like that.

* Stop passing the SyntaxContext to extensions. This was only ever used
    by macro_rules, which doesn't even use it anymore. I can't think of
    a context in which an external extension would need it, and removal
    allows the API to be significantly simpler - no more
    SyntaxExpanderTTItemExpanderWithoutContext wrappers to worry about.
2014-01-25 17:51:32 -08:00
bors
d2b44b6600 auto merge of #11799 : comex/rust/patch-2, r=brson 2014-01-25 16:31:47 -08:00
Brian Anderson
2d27ad19fa Stop allocating so much in arena tests
Android bots are OOMing.
2014-01-25 15:38:44 -08:00
Steven Fackler
ab5bbd3c17 Simplify and rename macro API
Now that procedural macros can be implemented outside of the compiler,
it's more important to have a reasonable API to work with. Here are the
basic changes:

* Rename SyntaxExpanderTTTrait to MacroExpander, SyntaxExpanderTT to
    BasicMacroExpander, etc. I think "procedural macro" is the right
    term for these now, right? The other option would be SynExtExpander
    or something like that.

* Stop passing the SyntaxContext to extensions. This was only ever used
    by macro_rules, which doesn't even use it anymore. I can't think of
    a context in which an external extension would need it, and removal
    allows the API to be significantly simpler - no more
    SyntaxExpanderTTItemExpanderWithoutContext wrappers to worry about.
2014-01-25 13:55:39 -08:00
comex
75af1e504a Grammatical fixes. 2014-01-25 15:35:28 -05:00
bors
b85fe01b94 auto merge of #11725 : derekchiang/rust/add-barrier, r=alexcrichton 2014-01-25 11:16:29 -08:00
bors
60260b6d43 auto merge of #11795 : xales/rust/master, r=cmr 2014-01-25 09:16:31 -08:00
Derek Chiang
a937d1875e Implement barrier. 2014-01-25 11:59:29 -05:00
xales
5d2ef31af9 Fix spacing in example comment. 2014-01-25 11:16:55 -05:00
bors
0f637ebd06 auto merge of #11790 : lfairy/rust/rename-num-consts, r=alexcrichton
The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

All tests pass, except for `run-pass/phase-syntax-link-does-resolve.rs`. I doubt that failure is related, though.

Fixes #10010.
2014-01-25 07:56:27 -08:00
bors
caabbb8388 auto merge of #11788 : salemtalha/rust/master, r=huonw
Fixes #11785.
2014-01-25 06:31:31 -08:00
bors
b0ef2d56a8 auto merge of #11775 : alexcrichton/rust/select-fix, r=pcwalton
The race here happened when a port had its deschedule in select() canceled, but
the other chan had already been dropped. This meant that the DISCONNECTED case
was hit in abort_selection, but the to_wake cell hadn't been emptied yet (this
was done after aborting), causing an assert in abort_selection to trip.

To fix this, the to_wake cell is just emptied before abort_selection is called
(we know that we're the owner of it already).
2014-01-25 05:11:28 -08:00
bors
6516b303b5 auto merge of #11570 : derekchiang/rust/fix-rt-docs, r=alexcrichton 2014-01-25 02:21:32 -08:00
Chris Wong
988e4f0a1c Uppercase numeric constants
The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

Fixes #10010.
2014-01-25 21:38:25 +13:00
Salem Talha
1b4623d1dd Fixed iter's is_empty to use is_none() and added relevant test flag 2014-01-25 02:44:06 -05:00
Derek Chiang
e8baed0b2d Fix some docs about rt 2014-01-25 02:16:17 -05:00
Corey Richardson
bf5152f486 Fix zero-sized memory mapping 2014-01-24 22:30:01 -08:00
Corey Richardson
7499e2dd45 Add benchmarks 2014-01-24 22:30:00 -08:00
Corey Richardson
69afce64c7 Update task-perf-one-million 2014-01-24 22:30:00 -08:00
Corey Richardson
dee7fa58dd Use mmap to map in task stacks and guard page
Also implement caching of stacks.
2014-01-24 22:30:00 -08:00
Corey Richardson
462f09e949 Add support for arbitrary flags to MemoryMap.
This also fixes up the documentation a bit, it was subtly incorrect.
2014-01-24 22:30:00 -08:00
bors
de57a22b9a auto merge of #11774 : sfackler/rust/move-macros, r=pcwalton
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes #2247
cc #11763
2014-01-24 20:31:37 -08:00
bors
7c028c9ba7 auto merge of #11772 : sanxiyn/rust/reexport, r=cmr
The field is always set to true.
2014-01-24 19:11:39 -08:00
bors
72e888960f auto merge of #11764 : Armavica/rust/doc_patmatch, r=pcwalton
I also removed the obsolete '*' wildcard from the manual.
2014-01-24 17:51:31 -08:00
Andrew Chin
506c71c980 Use an absolute path in test_process_output_fail_to_start
This test is designed to ensure that running a non-existent executable
results in a correct error message (FileNotFound in this case of this
test).  However, if you try to run an executable that doesn't exist, and
that requires searching through the $PATH, and one of the $PATH components
is not readable, then a PermissionDenied error will be returned, instead
of FileNotFound.
2014-01-24 19:15:06 -05:00
bors
dc48adc69f auto merge of #11748 : brson/rust/timerfdandroid, r=alexcrichton
It doesn't seem to exist.
2014-01-24 16:11:31 -08:00
bors
8de3fab82a auto merge of #11732 : luqmana/rust/native-getaddrinfo, r=alexcrichton
The last bit I needed to be able to use libnative :P
2014-01-24 14:51:36 -08:00
Luqman Aden
adb5128020 libnative: Avoid gai_strerror on windows. 2014-01-24 16:44:16 -05:00
Luqman Aden
a04cc4db2c libstd: Use iotest! for for get_host_addresses. 2014-01-24 16:44:16 -05:00
bors
a1d9d9e6d2 auto merge of #11744 : alexcrichton/rust/issue-5219, r=thestinger
By default, the compiler and libraries are all still built with rpaths, but this
can be opted out of with --disable-rpath to ./configure or --no-rpath to rustc.

Closes #5219
2014-01-24 10:26:33 -08:00
Alex Crichton
35e26e94d8 Fix a spuriously tripped assert in select()
The race here happened when a port had its deschedule in select() canceled, but
the other chan had already been dropped. This meant that the DISCONNECTED case
was hit in abort_selection, but the to_wake cell hadn't been emptied yet (this
was done after aborting), causing an assert in abort_selection to trip.

To fix this, the to_wake cell is just emptied before abort_selection is called
(we know that we're the owner of it already).
2014-01-24 10:05:58 -08:00
Alex Crichton
e715cdba31 Allow opting-out of rpath usage
By default, the compiler and libraries are all still built with rpaths, but this
can be opted out of with --disable-rpath to ./configure or --no-rpath to rustc.

cc #5219
2014-01-24 09:24:45 -08:00
bors
8c805fa70b auto merge of #11760 : dmac/rust/addressable-search, r=alexcrichton
This change adds two improvements to docs searching functionality.

First, search results will immediately be displayed when a ?search=searchterm
query string parameter is provided to any docs url.

Second, search results are now inserted into the browser history, allowing for
easier navigation between search results and docs pages.
2014-01-24 08:46:33 -08:00
Steven Fackler
3ba916ddff Delete ignore! macro
This was a holdover from when we didn't allow nested comment blocks
(think #if 0). It isn't used anywhere.
2014-01-24 08:46:31 -08:00
Steven Fackler
86a8b031f5 Move macro_rules! macros to libstd
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes #2247
cc #11763
2014-01-24 08:35:39 -08:00
bors
1ea0947c5d auto merge of #11753 : misfo/rust/patch-1, r=pcwalton 2014-01-24 07:26:31 -08:00
bors
a5ab960d2e auto merge of #11750 : bnoordhuis/rust/follow-rustc-symlink, r=thestinger
Before this commit, rustc looked in `dirname $0`/../lib for libraries
but that doesn't work when rustc is invoked through a symlink.

This commit makes rustc look in `dirname $(readlink $0)`/../lib, i.e.
it first canonicalizes the symlink before walking up the directory tree.

Fixes #3632.
2014-01-24 06:06:33 -08:00
Seo Sanghyeon
0f36438a8e Remove reexport field 2014-01-24 20:46:19 +09:00
bors
5675f2813f auto merge of #11742 : eminence/rust/dylib-test-fix, r=alexcrichton
On my Gentoo Linux machine, the c-dynamic-dylib test is failing, because libcfoo can't be found.  bar has a correct rpath for finding libfoo.so, but libfoo.so's rpath doesn't contain the right entries for finding libcfoo.


Below is the test failure on my machine.  This test pass with this commit:

```
maketest: c-dynamic-dylib
----- /storage/home/achin/devel/rust/src/test/run-make/c-dynamic-dylib/ --------------------
------ stdout ---------------------------------------------
make[1]: Entering directory `/storage/home/achin/devel/rust/src/test/run-make/c-dynamic-dylib'
gcc -Wall -Werror -g -fPIC -m64 -L /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib -c -o /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib/libcfoo.o cfoo.c
gcc -Wall -Werror -g -fPIC -m64 -L /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib -o /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib/libcfoo.so /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib/libcfoo.o -shared
/storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/stage2/bin/rustc --out-dir /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib -L /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib foo.rs
/storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/stage2/bin/rustc --out-dir /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib -L /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib bar.rs
/storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib/bar
rm /storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib/libcfoo.o
make[1]: Leaving directory `/storage/home/achin/devel/rust/src/test/run-make/c-dynamic-dylib'

------ stderr ---------------------------------------------
/storage/home/achin/devel/rust/x86_64-unknown-linux-gnu/test/run-make/c-dynamic-dylib/bar: error while loading shared libraries: libcfoo.so: cannot open shared object file: No such file or directory
make[1]: *** [all] Error 127

------        ---------------------------------------------

```
2014-01-24 03:16:31 -08:00