Commit Graph

24980 Commits

Author SHA1 Message Date
klutzy
fe10c63326 syntax::diagnostic: Remove unnecessary traits
This removes trait `handler` and `span_handler`,
and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.
2014-01-01 19:10:43 +09:00
klutzy
a52cdfdfce rustc::driver: Remove two @s 2014-01-01 19:10:43 +09:00
bors
e61937a6bf auto merge of #11187 : alexcrichton/rust/once, r=brson
Rationale can be found in the first commit, but this is basically the same thing as `pthread_once`
2013-12-31 20:41:56 -08:00
Alex Crichton
c22fed9424 Convert relevant static mutexes to Once 2013-12-31 20:15:03 -08:00
bors
02cec05c55 auto merge of #11137 : g3xzh/rust/benchm, r=cmr
Benchmark testing `is_ancestor_of` and `pop`

ref: https://github.com/mozilla/rust/issues/9694
2013-12-31 18:32:19 -08:00
bors
09a561ac9c auto merge of #11186 : alexcrichton/rust/native-udp, r=brson
I personally do not have huge amounts of experience in this area, so there's likely a thing or two wrong around the edges. I tried to just copy what libuv is doing as closely as possible with a few tweaks in a few places, but all of the `std::io::net::udp` tests are now run in both native and green settings so the published functionality is all being tested.
2013-12-31 16:21:55 -08:00
bors
1dcc986d52 auto merge of #11173 : whitequark/rust/master, r=thestinger
This PR adds `std::unsafe::intrinsics::{volatile_load,volatile_store}`, which map to LLVM's `load volatile` and `store volatile` operations correspondingly.

This would fix #11172.

I have addressed several uncertainties with this PR in the line comments.
2013-12-31 15:06:55 -08:00
bors
bd52e6acc6 auto merge of #11157 : alexcrichton/rust/issue-11154, r=pcwalton
Closes #11154
2013-12-31 13:52:03 -08:00
bors
8ec03b37c0 auto merge of #11155 : SiegeLord/rust/early_deps, r=pcwalton
The `--dep-info` command line option allows a nice way to generate make-style dependencies, but it currently does so alongside building of the output binary. This isn't a problem for make, as it mixes dependency graph generation and actual building, but it is problematic for other tools (e.g. CMake) which keep them separate.

To play more nicely with those tools, I've moved the --dep-info output from phase 6 (linking) up to after phase 2 (expansion of macros). Also, since there was no prior option to do so, I added a command line switch (`--no-analysis`) to stop compilation just before phase 3 (type-checking) which speeds this up even further.

Here's the beginning of a CMake function which is enabled by this change:

~~~cmake
function(get_rust_deps root_file out_var)
	execute_process(COMMAND rustc ${RUSTC_FLAGS} --no-analysis --dep-info "${CMAKE_BINARY_DIR}/.deps" "${root_file}")
	
	# Read and parse the dependency information
	file(READ "${CMAKE_BINARY_DIR}/.deps" crate_deps)
	file(REMOVE "${CMAKE_BINARY_DIR}/.deps")
	# parsing follows...
~~~
2013-12-31 12:37:17 -08:00
SiegeLord
cbe8c61fed Add a --no-analysis command line switch 2013-12-31 15:28:08 -05:00
SiegeLord
a7a9e488a4 Generate --dep-info earlier in the compillation. 2013-12-31 15:28:02 -05:00
Alex Crichton
870024a160 Disallow LTO with a preference to dynamic linking
Closes #11154
2013-12-31 11:48:47 -08:00
Alex Crichton
bba78a2a89 Implement native UDP I/O 2013-12-31 11:34:22 -08:00
bors
5ff7b28373 auto merge of #11208 : alexcrichton/rust/less-c, r=cmr
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-31 09:51:50 -08:00
bors
250ca0eb85 auto merge of #11236 : huonw/rust/sort-rust-log-help, r=sanxiyn
Fixes #8949.
2013-12-31 08:36:52 -08:00
Huon Wilson
d255d4a4ff std: print RUST_LOG=::help in sorted order.
Fixes #8949.
2013-12-31 23:47:15 +11:00
bors
d459e805df auto merge of #11142 : alan-andrade/rust/improve_opts_example, r=cmr
Ran into this in practice, fixing it to improve example correctness.
2013-12-30 23:11:49 -08:00
Alan Andrade
ff801d662e Fix tests 2013-12-31 00:51:11 -06:00
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
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
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