Commit Graph

26716 Commits

Author SHA1 Message Date
bors
b88138a3ec auto merge of #11231 : brson/rust/rust_fail, r=alexcrichton
Closes #11219
2013-12-30 20:46:49 -08:00
Alan Andrade
6bc278c8c6 Remove features from librustdoc 2013-12-30 22:37:44 -06:00
Alan Andrade
a60f12d84c Avoid compiler error about glob imports in getopts example 2013-12-30 22:37:43 -06:00
bors
a1d3cc5386 auto merge of #11221 : vadimcn/rust/revert-manifest, r=alexcrichton
In view of the problems outlined in #11207, I think manifest embedding should be removed, until we find a better solution.  :-(
2013-12-30 18:56:54 -08:00
Brian Anderson
705f472c55 Add rust_fail. #11219 2013-12-30 18:44:57 -08:00
Steven Fackler
b74613bdc4 Rewrite SyntaxEnv
I'd really like to be able to do something like

struct MapChain<'next, K, V> {
    info: BlockInfo,
    map: HashMap<K, V>,
    next: Option<&'next mut MapChain<'next, K, V>
}

but I can't get the lifetimes to work out.
2013-12-30 17:50:05 -08:00
Peter Zotov
f98f83a15d Implement volatile_load and volatile_store intrinsics. 2013-12-31 02:54:25 +04:00
Alex Crichton
726091fea5 Convert some C functions to rust functions
Right now on linux, an empty executable with LTO still depends on librt becaues
of the clock_gettime function in rust_builtin.o, but this commit moves this
dependency into a rust function which is subject to elimination via LTO.

At the same time, this also drops libstd's dependency on librt on unices that
are not OSX because the library is only used by extra::time (and now the
dependency is listed in that module instead).
2013-12-30 14:35:55 -08:00
bors
df25bb65eb auto merge of #11125 : vmx/rust/rational, r=huonw
The Ratio::rational() converts a float (f32 and f64) into a
Ratio<BigInt>.

Closes #9838
2013-12-30 14:31:57 -08:00
Vadim Chugunov
856222987d Revert "Embed Windows application manifest." 2013-12-30 13:22:54 -08:00
g3xzh
9f1adf07ad Add more benchmark tests to path/posix
Benchmark testing `is_ancestor_of` and `path_relative_from`
2013-12-30 22:59:48 +02:00
bors
1502b1197b auto merge of #11199 : alexcrichton/rust/windows-isnt-waiting, r=pcwalton
Turns out with an argument of 0 the function always returns immediately!

Closes #11003
2013-12-30 09:51:49 -08:00
bors
f7fd61876a auto merge of #11194 : kballard/rust/gitignore-doc-green-native, r=alexcrichton 2013-12-30 08:36:48 -08:00
Alex Crichton
fe30087080 Add metadata from a tempdir instead of a build dir
Right now if you have concurrent builds of two libraries in the same directory
(such as rustc's bootstrapping process), it's possible that two libraries will
stomp over each others' metadata, producing corrupt rlibs.

By placing the metadata file in a tempdir we're guranteed to not conflict with
ay other builds happening concurrently. Normally this isn't a problem because
output filenames are scoped to the name of the crate, but metadata is special in
that it has the same name across all crates.
2013-12-30 08:21:41 -08:00
Volker Mische
e0a6910f70 Implement Ratio:from_float()
The Ratio::from_float() converts a float (f32 and f64) into a
Ratio<BigInt>.

Closes #9838
2013-12-30 16:55:13 +01:00
bors
6db7e35c59 auto merge of #11190 : eliovir/rust/patch-3, r=alexcrichton
#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
replace `pkgid` by `crate_id`
add `comment`
2013-12-30 07:16:48 -08:00
bors
a4f30bf0c0 auto merge of #11185 : huonw/rust/doc-ignore, r=cmr
Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
2013-12-30 05:51:51 -08:00
bors
f37b746699 auto merge of #11182 : luisbg/rust/crateid, r=cmr
Issue #11048
2013-12-30 04:32:09 -08:00
bors
ac0c376c36 auto merge of #11169 : alexcrichton/rust/snapshots, r=sanxiyn
Hurray trait coercion!
2013-12-30 03:11:56 -08:00
bors
28a091fc7c auto merge of #10885 : kballard/rust/as_mut_slice, r=cmr
This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].
2013-12-30 01:41:55 -08:00
bors
adc5eefa23 auto merge of #11168 : sfackler/rust/de-at-extctxt, r=alexcrichton
* Pass `&ExtCtxt` instead of `@ExtCtxt`.
* Stop passing duplicate parameters around in `expand`.
* Make `ast_fold` methods take `&mut self`.

After these, it should be possible to remove the `@mut` boxes from `ExtCtxt` altogether, though #11167 is doing some of that so I'm holding off on that for now. This will probably conflict with that PR, so I'm guessing that one will have to be rebased on top of the other.

r? @pcwalton
2013-12-30 00:11:55 -08:00
Steven Fackler
dc830345e8 Remove @muts from ExtCtxt 2013-12-29 23:41:09 -08:00
Steven Fackler
8143662836 Start passing around &mut ExtCtxt 2013-12-29 23:41:09 -08:00
Steven Fackler
3965dddf49 Make ast_fold take &mut self 2013-12-29 23:41:05 -08:00
Huon Wilson
dedc29f128 rustdoc: Unify the handling of the hidden example lines. 2013-12-30 16:55:49 +11:00
Huon Wilson
582ad8ffc2 rustdoc: only filter lines starting with '# ' from the shown code.
Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
2013-12-30 16:55:49 +11:00
bors
0cbb44aff9 auto merge of #11181 : luqmana/rust/up-llvm, r=alexcrichton
No longer need to handle GNUEABIHF and hard floats since LLVM should now choose the right default. Fixes #11164.
2013-12-29 21:51:56 -08:00
Luqman Aden
d9eaeda21c Update llvm. 2013-12-29 23:38:43 -05:00
bors
b5b570b6be auto merge of #11204 : alexcrichton/rust/issue-11200, r=cmr
Turns out when you grab an OS mutex, you need to be careful about when and where
things are scheduled!

I've confirmed that I could fairly reliably get a deadlock (1 in 100 times ish) before this, and I cannot get a deadlock after this (after 1000+ runs).

Closes #11200
2013-12-29 18:46:57 -08:00
Alex Crichton
b27c53b15f Fix a deadlock in a libgreen test
Turns out when you grab an OS mutex, you need to be careful about when and where
things are scheduled!
2013-12-29 17:34:15 -08:00
Alex Crichton
0da86ba48b Actually block in a windows cvar
Turns out with an argument of 0 the function always returns immediately!

Closes #11003
2013-12-29 15:23:15 -08:00
Alex Crichton
5580b4c74f Register new snapshots. 2013-12-29 14:06:34 -08:00
Luis de Bethencourt
51b5f32d33 Update Docs to use crateid 2013-12-29 15:25:43 -05:00
Luis de Bethencourt
016d52ed50 Rename uses of PkgId to CrateId in librustpkg 2013-12-29 15:25:37 -05:00
Luis de Bethencourt
f872c47278 Rename PkgId to CrateId 2013-12-29 15:25:32 -05:00
Luis de Bethencourt
4bc09713df Rename pkgid variables 2013-12-29 15:25:26 -05:00
Kevin Ballard
1db746474d Add /doc/{rustc,syntax} to .gitignore 2013-12-29 14:30:34 -05:00
Kevin Ballard
01209f1e3a Add method .as_mut_slice() to MutableVector
This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].
2013-12-29 13:27:59 -05:00
Kevin Ballard
b3ae7b13ec Add /doc/{green,native} to .gitignore 2013-12-29 13:24:48 -05:00
bors
aa5d779a35 auto merge of #11134 : lucab/rust/lucab/libstd-doc, r=cmr
Uniform the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index.
2013-12-29 08:22:04 -08:00
eliovir
466065946f rust.md : update crate attributes.
#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
2013-12-29 12:37:51 +01:00
bors
afe8f6e106 auto merge of #11177 : cmr/rust/native_and_green_docs, r=alexcrichton
Some people have requested this, and I think it's quite useful to have
documentation for the compiler libraries. libnative and libgreen are
self-explanatory I think.
2013-12-28 21:36:59 -08:00
Corey Richardson
7b382e58b1 Fix rustdoc bug involving PatLit 2013-12-29 00:13:29 -05:00
Corey Richardson
e53e86a3f3 Add a compiler-docs target 2013-12-29 00:13:19 -05:00
Steven Fackler
933def408c Stop passing duplicate parameters in expand 2013-12-28 21:16:03 -07:00
Steven Fackler
711d5106bc Remove unecessary extern "Rust" specifiers 2013-12-28 21:16:03 -07:00
Steven Fackler
0607c138ca Stop using @ExtCtxt 2013-12-28 21:16:03 -07:00
Alex Crichton
f3370295b7 Implement a Once primitive for initialization
Of the 8 static mutexes that are currently in-use by the compiler and its
libraries, 4 of them are currently used for one-time initialization. The
unforunate side effect of using a static mutex is that the mutex is leaked.

This primitive should provide the basis for efficiently keeping track of
one-time initialization as well as ensuring that it does not leak the internal
mutex that is used.

I have chosen to put this in libstd because libstd is currently making use of a
static initialization mutex (rt::local_ptr), but I can also see a more refined
version of this type being suitable to initialize FFI bindings (such as
initializing LLVM and initializing winsock networking on windows). I also intend
on adding "helper threads" to libnative, and those will greatly benefit from a
simple "once" primitive rather than always reinventing the wheel by using
mutexes and bools.

I would much rather see this primitive built on a mutex that blocks green
threads appropriately, but that does not exist at this time, so it does not
belong outside of `std::unstable`.
2013-12-28 19:44:02 -08:00
bors
38a5edbfe6 auto merge of #11180 : alexcrichton/rust/fix-deferred-send, r=cmr
I forgot to add this back in after I removed can_resched and then realized I had
to add it back.
2013-12-28 19:06:57 -08:00
bors
b90989a728 auto merge of #11179 : alexcrichton/rust/update-gyp, r=cmr
Closes #11152
2013-12-28 17:37:06 -08:00