Commit Graph

21349 Commits

Author SHA1 Message Date
bors
4059b5c4b3 auto merge of #10409 : alexcrichton/rust/issue-10386, r=brson
Turns out the pipe names must have special names on windows. Once we have
special names, all the tests pass just fine.

Closes #10386
2013-11-11 07:46:18 -08:00
bors
c47986b675 auto merge of #10394 : yichoi/rust/make_check_pass_android, r=brson
To enable test on android bot #9120

some tests are disabled and can be fixed further.
2013-11-11 06:21:16 -08:00
Seo Sanghyeon
2337d88339 Fix path parsing 2013-11-11 21:53:14 +09:00
Corey Richardson
fc01f20c42 Implement size_hint for Range
Closes #8606
2013-11-11 07:22:30 -05:00
Corey Richardson
a46b2b8e7a vec: with_capacity: check for overflow
Fixes #10271
2013-11-11 06:09:28 -05:00
Corey Richardson
2c18983ea5 Clean lint on test build 2013-11-11 05:00:48 -05:00
bors
46100c0622 auto merge of #10408 : alexcrichton/rust/snapshots, r=huonw
Mostly just using the `system` abi where possible.
2013-11-10 21:56:08 -08:00
Alex Crichton
681ea93d52 Enable uv pipe tests on windows
Turns out the pipe names must have special names on windows. Once we have
special names, all the tests pass just fine.

Closes #10386
2013-11-10 20:43:08 -08:00
Alex Crichton
7407bcc1a2 Register new snapshots 2013-11-10 17:51:56 -08:00
bors
63cfc9989d auto merge of #10406 : alexcrichton/rust/issue-10405, r=huonw
The logging macros all use libuv-based I/O, and there was one stray debug
statement in task::spawn which was executing before the I/O context was ready.
Remove it and add a test to make sure that we can continue to debug this sort of
code.

Closes #10405
2013-11-10 16:01:12 -08:00
Alex Crichton
64afa4ea22 Only run dsymutil on OSX in debug builds
When there are no debug symbols generated, then the program just prints an
annoying warning otherwise.

Closes #10198
2013-11-10 13:58:11 -08:00
bors
fe48d8fcd1 auto merge of #10399 : huonw/rust/get-opt-doc, r=alexcrichton 2013-11-10 13:36:11 -08:00
Alex Crichton
b71d629744 Remove a debug! statement before I/O is ready
The logging macros all use libuv-based I/O, and there was one stray debug
statement in task::spawn which was executing before the I/O context was ready.
Remove it and add a test to make sure that we can continue to debug this sort of
code.

Closes #10405
2013-11-10 13:05:36 -08:00
Alex Crichton
e38a89d0b0 Fix usage of libuv for windows 2013-11-10 12:23:57 -08:00
Huon Wilson
8e719bdfb5 extra::getopts: update docs for minor renaming. 2013-11-10 23:28:26 +11:00
Alex Crichton
c5fdd69d3e Carefully destroy channels at the right time.
When a channel is destroyed, it may attempt scheduler operations which could
move a task off of it's I/O scheduler. This is obviously a bad interaction, and
some finesse is required to make it work (making destructors run at the right
time).

Closes #10375
2013-11-10 01:37:12 -08:00
Alex Crichton
86a321b65d Another round of test fixes from previous commits 2013-11-10 01:37:12 -08:00
Alex Crichton
3a3eefc5c3 Update to the latest libuv
At this time, also point the libuv submodule to the official repo instead of my
own off to the side.

cc #10246
Closes #10329
2013-11-10 01:37:11 -08:00
Alex Crichton
b652bbc670 Fall back from uv tty instances more aggressively
It appears that uv's support for interacting with a stdio stream as a tty when
it's actually a pipe is pretty problematic. To get around this, promote a check
to see if the stream is a tty to the top of the tty constructor, and bail out
quickly if it's not identified as a tty.

Closes #10237
2013-11-10 01:37:11 -08:00
Alex Crichton
df4c0b8e43 Make the uv bindings resilient to linked failure
In the ideal world, uv I/O could be canceled safely at any time. In reality,
however, we are unable to do this. Right now linked failure is fairly flaky as
implemented in the runtime, making it very difficult to test whether the linked
failure mechanisms inside of the uv bindings are ready for this kind of
interaction.

Right now, all constructors will execute in a task::unkillable block, and all
homing I/O operations will prevent linked failure in the duration of the homing
operation. What this means is that tasks which perform I/O are still susceptible
to linked failure, but the I/O operations themselves will never get interrupted.
Instead, the linked failure will be received at the edge of the I/O operation.
2013-11-10 01:37:11 -08:00
Alex Crichton
5e6bbc6bfa Assorted test fixes and merge conflicts 2013-11-10 01:37:11 -08:00
Alex Crichton
b545751597 Rework the idle callback to have a safer interface
It turns out that the uv implementation would cause use-after-free if the idle
callback was used after the call to `close`, and additionally nothing would ever
really work that well if `start()` were called twice. To change this, the
`start` and `close` methods were removed in favor of specifying the callback at
creation, and allowing destruction to take care of closing the watcher.
2013-11-10 01:37:11 -08:00
Alex Crichton
d08aadcc9a Update all uv tests to pass again 2013-11-10 01:37:11 -08:00
Alex Crichton
0df8b0057c Work around bugs in 32-bit enum FFI
cc #10308
2013-11-10 01:37:11 -08:00
Alex Crichton
1bdaea827e Migrate all streams to synchronous closing 2013-11-10 01:37:11 -08:00
Alex Crichton
f9abd998d6 Add bindings to uv's utime function
This exposes the ability to change the modification and access times on a file.

Closes #10266
2013-11-10 01:37:11 -08:00
Alex Crichton
497d63f0bc Don't overflow in a converting stat times to u64
Closes #10297
2013-11-10 01:37:11 -08:00
Alex Crichton
aa78c3d6f6 Clean up the remaining chunks of uv 2013-11-10 01:37:11 -08:00
Alex Crichton
584b359348 Migrate uv net bindings away from ~fn() 2013-11-10 01:37:11 -08:00
Alex Crichton
5842b606a7 Migrate uv getaddrinfo away from ~fn() 2013-11-10 01:37:10 -08:00
Alex Crichton
be896288a3 Migrate uv file bindings away from ~fn() 2013-11-10 01:37:10 -08:00
Alex Crichton
c1b5c4db8f Start migrating stream I/O away from ~fn() 2013-11-10 01:37:10 -08:00
Alex Crichton
6690bcb101 Fixing rebase conflicts and such
This cleans up the merging of removing ~fn() and removing C++ wrappers to a
compile-able and progress-ready state
2013-11-10 01:37:10 -08:00
Alex Crichton
18ce014e9d Remove usage of ~fn from the scheduler 2013-11-10 01:37:10 -08:00
Alex Crichton
28219fc679 Remove usage of ~fn() from uv async/idle 2013-11-10 01:37:10 -08:00
Alex Crichton
9286d5113d Migrate uv signal handling away from ~fn() 2013-11-10 01:37:10 -08:00
Alex Crichton
ceab326e82 Migrate uv process bindings away from ~fn() 2013-11-10 01:37:10 -08:00
Alex Crichton
24b4223418 Migrate uv timer bindings away from ~fn() 2013-11-10 01:37:10 -08:00
Alex Crichton
653406fcf7 uv: Remove closure-based home_for_io for raii
Using an raii wrapper means that there's no need for a '_self' variant and we
can greatly reduce the amount of 'self_'-named variables.
2013-11-10 01:37:10 -08:00
Alex Crichton
4bcde6bc06 uv: Provide a helper fn to Result<(), IoError> 2013-11-10 01:37:10 -08:00
Alex Crichton
30c885ea52 uv: Remove lots of uv/C++ wrappers 2013-11-10 01:37:10 -08:00
Young-il Choi
9bb1e256d7 temporarily disable tests on android and tagging issue number #10393 2013-11-10 12:02:23 +09:00
Young-il Choi
5daf6b7849 temporarily disable tests on android and tagging issue number #10380 2013-11-10 12:01:22 +09:00
Young-il Choi
d6f7669c78 temporarily disable tests on android and tagging issue number #10379 2013-11-10 11:57:27 +09:00
Young-il Choi
480894796a temporarily disable tests on android and tagging issue number #10378 2013-11-10 11:57:03 +09:00
Young-il Choi
e3f9f45439 disable tests on android since tcp/ip permission cannot be acquired without help of apk 2013-11-10 08:18:12 +09:00
Young-il Choi
ca55317e90 tagging issue number(#10381) 2013-11-10 08:18:12 +09:00
bors
3851f908d1 auto merge of #10367 : alexcrichton/rust/system-abi, r=nikomatsakis
This adds an other ABI option which allows a custom selection over the target
architecture and OS. The only current candidate for this change is that kernel32
on win32 uses stdcall, but on win64 it uses the cdecl calling convention.
Otherwise everywhere else this is defined as using the Cdecl calling convention.

cc #10049
Closes #8774
2013-11-09 12:26:12 -08:00
Alex Crichton
2fcc70ec9d Add a "system" ABI
This adds an other ABI option which allows a custom selection over the target
architecture and OS. The only current candidate for this change is that kernel32
on win32 uses stdcall, but on win64 it uses the cdecl calling convention.
Otherwise everywhere else this is defined as using the Cdecl calling convention.

cc #10049
Closes #8774
2013-11-09 11:16:09 -08:00
bors
8379890c05 auto merge of #10153 : nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-7, r=pnkfelix
Fully support multiple lifetime parameters on types and elsewhere, removing special treatment for `'self`. I am submitting this a touch early in that I plan to push a new commit with more tests specifically targeting types with multiple lifetime parameters -- but the current code bootstraps and passes `make check`.

Fixes #4846
2013-11-09 08:36:09 -08:00
Niko Matsakis
f6e8d49a1a Make irrelevant changes to regions-mock-tcx to convince the pretty printer to emit the same thing twice in a row 2013-11-09 11:34:05 -05:00
Niko Matsakis
a15196c53b Make main public to accommodate check-fast 2013-11-09 09:13:58 -05:00
bors
dc5d9b908f auto merge of #10372 : catamorphism/rust/rustpkg-issue-9311, r=catamorphism
and use opt_str instead of opt_val in rustpkg

Closes #9311
2013-11-09 06:11:10 -08:00
Niko Matsakis
b32845d984 xfail-fast regions-mock-tcx.rs 2013-11-09 07:57:10 -05:00
bors
7bb668defd auto merge of #10371 : catamorphism/rust/rustpkg-issue-9482, r=catamorphism
This bug was already fixed, just needed a test.

Closes #9569
2013-11-09 04:11:13 -08:00
bors
4f68d1365a auto merge of #10368 : tautologico/rust/default_pkgid, r=catamorphism
This Fixes #10265 and paves the way for fixing #9543. It works by adding a 'package_id' attribute by default for library crates that don't specify it. This is necessary to use the 'extern mod foo = "bar"' form instead of 'extern mod foo(name="bar") (as per #9543), because the former adds a required package_id when trying to link with the bar crate. I added a simple test to ensure that the default package_id value is being generated, and also added an explicit package_id in the link attribute in all rust libs to avoid getting warnings about default package_id values when building rust.
2013-11-09 02:11:15 -08:00
bors
162ba894bc auto merge of #10359 : tomassedovic/rust/typeid-iterbytes, r=pcwalton
I'm not sure this is something you're interested in, but I was playing around the Any trait a bit and I wanted to try it as a key in a HashMap. To do that, TypeId needs to implement IterBytes.
2013-11-09 00:51:16 -08:00
bors
785f9b8c16 auto merge of #10358 : cmr/rust/mmap++, r=alexcrichton 2013-11-08 23:41:18 -08:00
Corey Richardson
658e20e2da std: os: Document MemoryMap 2013-11-09 00:58:27 -05:00
Daniel Micay
6943ca8dcd make DeepClone inherit from Clone 2013-11-08 23:26:53 -05:00
Daniel Micay
421c631570 add clone_from and deep_clone_from
Closes #10240
2013-11-08 23:24:46 -05:00
Niko Matsakis
044dec4cf5 Fix pretty printer when there are multiple lifetime parameters 2013-11-08 22:25:22 -05:00
Niko Matsakis
98f79735c3 Merge failures 2013-11-08 20:59:43 -05:00
Niko Matsakis
f4f4a35b5b Add new tests showing multiple lifetime parameters in use 2013-11-08 19:47:57 -05:00
Niko Matsakis
f36a891fe2 Address comments from @pnkfelix (thanks for the detailed review) 2013-11-08 19:47:57 -05:00
Niko Matsakis
bc3e842508 Update FIXMEs with issue numbers 2013-11-08 19:47:57 -05:00
Niko Matsakis
195f1d77bd Rename and modernize region enum names 2013-11-08 19:47:57 -05:00
Niko Matsakis
5e54a7323d Update various tests and libraries that were incorrectly
annotated.
2013-11-08 19:45:50 -05:00
Niko Matsakis
f57a28b2db Improve error reporting for region inference failures to make use of
all the information it has at its disposal. Unfortunately this also
reveals that we need to improve the reporting heuristics further,
as sometimes the errors it chooses to emit seem somewhat mystifying
and are not related to the actual problem.
2013-11-08 19:45:49 -05:00
Niko Matsakis
168ac5290e Move comparing of impl methods against trait from collect to check.
This code fits better in check because it is checking that the impl
matches the interface. This allows us to avoid the awkward constructions
that lazilly collect traits and so forth. It also permits us to make
use of the results of variance inference.
2013-11-08 19:45:49 -05:00
Niko Matsakis
9d3f57ef08 Introduce new variance inference pass that replaces (and generalizes) old
region-parameterization/variance inference. We now compute variance for
type parameters but do not make use of it (most of the way towards #3598).
2013-11-08 19:43:20 -05:00
Niko Matsakis
1f4faaee40 Generalize AST and ty::Generics to accept multiple lifetimes. 2013-11-08 19:42:46 -05:00
Tim Chevalier
06b2905ee1 extra / rustpkg: Make getopts::opt_val private again
and use opt_str instead of opt_val in rustpkg

Closes #9311
2013-11-08 16:20:25 -08:00
Tim Chevalier
b60de8a1f6 rustpkg: Add a test that rustpkg install doesn't copy a non-changed file
This bug was already fixed, just needed a test.

Closes #9569
2013-11-08 16:03:18 -08:00
Tomas Sedovic
0865b4d745 Implement IterBytes for TypeId 2013-11-08 23:32:59 +01:00
Niko Matsakis
85c51d3b02 Introduce ty_fold mechanism and port our various folders to use
it. This should eventually be merged with the Subst trait.
2013-11-08 17:22:38 -05:00
Andrei Formiga
ca22e94772 Added a FIXME with issue number to change package_id 2013-11-08 18:59:44 -03:00
Niko Matsakis
8e1de17757 Create a new pass to resolve named lifetimes; rscope is not only
used to indicate when anonymous regions (i.e., &T) are permitted
2013-11-08 16:52:36 -05:00
Andrei Formiga
455de85163 Specify package_id for rust libs, to avoid spurious warnings 2013-11-08 17:42:46 -03:00
Andrei Formiga
23387b062d Added tests for default generation of package_id meta attribute 2013-11-08 17:42:46 -03:00
Andrei Formiga
cf24280a3c Added default value for package_id attribute when encoding metadata for lib crates 2013-11-08 17:42:46 -03:00
Andrei Formiga
ffcbd8d767 Add default 'package_id' link meta for crates (with value equal to 'name') 2013-11-08 17:42:46 -03:00
bors
a594a999fb auto merge of #10355 : huonw/rust/deriving-field-spans, r=alexcrichton
This rearranges the deriving code so that #[deriving] a trait on a field
that doesn't implement that trait will point to the field in question,
e.g.

    struct NotEq; // doesn't implement Eq

    #[deriving(Eq)]
    struct Foo {
        ok: int,
        also_ok: ~str,
        bad: NotEq // error points here.
    }

Unfortunately, this means the error is disconnected from the `deriving`
itself but there's no current way to pass that information through to
rustc except via the spans, at the moment.

Fixes #7724.
2013-11-08 08:36:08 -08:00
bors
4ce7d573e8 auto merge of #10348 : ksh8281/rust/fix_android_timegm, r=yichoi
fix timegm bug on android
TZ restore not correctly before.
and it cause test case fail (time::tests::run_tests::test_convertions)

with @sammykim
2013-11-08 04:36:12 -08:00
bors
35c3aaf5c5 auto merge of #10346 : klutzy/rust/mingw64-32-fix, r=alexcrichton
Fixes #10327
2013-11-08 03:26:07 -08:00
bors
bfa80f7d6f auto merge of #10344 : brson/rust/atomiccopy, r=alexcrichton
I didn't try to add clone methods since it's not clear to me which types are appropriate to clone or what the memory ordering should be.
2013-11-08 02:11:09 -08:00
Huon Wilson
812ea9e169 syntax::ext: Make type errors in deriving point to the field itself.
This rearranges the deriving code so that #[deriving] a trait on a field
that doesn't implement that trait will point to the field in question,
e.g.

    struct NotEq; // doesn't implement Eq

    #[deriving(Eq)]
    struct Foo {
        ok: int,
        also_ok: ~str,
        bad: NotEq // error points here.
    }

Unfortunately, this means the error is disconnected from the `deriving`
itself but there's no current way to pass that information through to
rustc except via the spans, at the moment.

Fixes #7724.
2013-11-08 20:57:34 +11:00
bors
57d1ed819b auto merge of #10303 : niftynif/rust/master, r=catamorphism
r? @catamorphism
First contribution; contains struct definitions and some useful traits.  Can possibly be improved by removing the dependence on the Clone trait.  This is intended to be the beginning of a long-term project.
2013-11-08 00:11:07 -08:00
niftynif
2f1b4335cb Added proper //! documentation to the beginning of btree.rs. 2013-11-08 02:41:09 -05:00
bors
acbcb9ed2e auto merge of #10341 : willingc/rust/minor-docfix, r=huonw
...rt::io
2013-11-07 23:01:11 -08:00
sh8281.kim
09257df055 fix android timegm 2013-11-08 15:44:36 +09:00
klutzy
d01ba2e824 Define WSAPOLLFD only on mingw 4.x
Fixes #10327
2013-11-08 15:00:40 +09:00
bors
075347b445 auto merge of #10281 : klutzy/rust/rt-timezone, r=alexcrichton
Previously #9418 fixed utf-8 assertion issue by wcsftime,
but the function didn't work as expected: it follows the locale
set by setlocale(), not the system code page.
This patch fixes it by manual multibyte-to-unicode conversion.
2013-11-07 21:41:07 -08:00
klutzy
fe18fe0f88 extra::time: Fix test on Windows
Closes #10307
2013-11-08 14:19:25 +09:00
bors
d26776a775 auto merge of #10340 : eholk/rust/url, r=brson
According to http://tools.ietf.org/html/rfc3986, ~ is a legal character in URLs.
2013-11-07 20:26:10 -08:00
bors
27eb85daed auto merge of #10333 : huonw/rust/ascii, r=alexcrichton
This renames to_str_ascii to as_str_ascii and makes it non-copying,
which is possible now that strings no longer have a hidden extra
byte/null terminator.

Fixes #6120.
2013-11-07 19:16:11 -08:00
Brian Anderson
eabdc8c960 std: Make atomic types non-copyable. Closes #8380 2013-11-07 18:37:56 -08:00
bors
f00bb2ec04 auto merge of #10243 : mattcarberry/rust/master, r=brson
Associated with Issue #6563.

Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
2013-11-07 17:26:12 -08:00
bors
a0593e5045 auto merge of #10335 : ksh8281/rust/update_for_ndk_r9b, r=brson
update for ndk r9b (#10323)

````
Android NDK, Revision 9b (October 2013)
Important changes:
Updated include/android/*h and math.h for all Android API levels up to 18, 
including the addition of levels 13, 15, 16 and 17. 
For information on added APIs, 
see commit messages for Changes 68012 and 68014. (Issues 47150, 58528, and 38423)
````

https://android-review.googlesource.com/#/c/68014/
2013-11-07 15:46:13 -08:00
Carol Willing
e6a1f6d7df Edited comment for docs to show std::io is deleted and replaced by std::rt::io 2013-11-07 15:29:06 -08:00
Huon Wilson
b95a8c63fd std::ascii: Provide a copyless [Ascii] -> str method.
This renames to_str_ascii to as_str_ascii and makes it non-copying,
which is possible now that strings no longer have a hidden extra
byte/null terminator.

Fixes #6120.
2013-11-08 10:20:06 +11:00
Eric Holk
0a478b4ac6 Add ~ to the list of allowable URL characters. 2013-11-07 17:21:33 -05:00
niftynif
fbde419b38 Addressed style concerns in btree.rs and added it to the lib file.
Added documentation within btree.rs.
2013-11-07 13:34:20 -05:00
bors
03f30515f4 auto merge of #10336 : ksh8281/rust/fix_rpass_core-run-destroy_for_android, r=yichoi
fix rpass core-run-destroy for android
2013-11-07 02:41:10 -08:00
sh8281.kim
f1cbb4d566 fix rpass core-run-destroy for android 2013-11-07 19:22:18 +09:00
sh8281.kim
96ec3c11de update for ndk r9b 2013-11-07 18:47:56 +09:00
bors
a5f6f853f1 auto merge of #10322 : thestinger/rust/no_freeze, r=alexcrichton 2013-11-06 23:36:06 -08:00
Daniel Micay
8662141c21 add from_send to Rc, since #9509 is fixed 2013-11-07 02:30:54 -05:00
Alex Crichton
4b770446b4 Register new snapshots 2013-11-06 20:24:36 -08:00
Matt Carberry
6eba332d0e Added positive tests for integer literal base interpretation. 2013-11-06 15:30:12 -08:00
bors
22eb11c09b auto merge of #10227 : kud1ing/rust/ios, r=alexcrichton 2013-11-06 14:01:14 -08:00
kud1ing
2a333ed088 Fixes for compilation to iOS:
- remove /usr/include from the include path since the iOS SDK provides the correct version
- `_NSGetEnviron()` is private and not available on iOS
- `.align` without an argument is not allowed with the Apple tools. 2^2 should be the default alignment
- ignore error messages for XCode < 5
- pass include path to libuv
2013-11-06 22:11:09 +01:00
bors
fdc830df31 auto merge of #10289 : nikomatsakis/rust/issue-10157-TypeContents-refactor, r=pcwalton
See #10157. This compiles now.

Fixes #10278.
2013-11-06 11:51:09 -08:00
bors
dda67dfe27 auto merge of #10314 : ksh8281/rust/fix_some_cfail_test_cases_for_arm, r=yichoi
adding #[cfg(target_arch = "arm")] for asm of cfail test cases
2013-11-06 00:56:08 -08:00
bors
a66b372eb4 auto merge of #10306 : alexcrichton/rust/issue-9970-better, r=huonw
There were a few ambiguous error messages which look like they could have
cropped up from either the rust compiler for the format string parser. To
differentiate, the prefix 'invalid format string' is now added in front of all
format string errors.

cc #9970
2013-11-05 23:36:06 -08:00
sh8281.kim
65d35ac745 fix some cfail test cases for arm 2013-11-06 15:45:37 +09:00
bors
efaf730347 auto merge of #10305 : thestinger/rust/align, r=alexcrichton
Closes #10300
2013-11-05 20:41:07 -08:00
Daniel Micay
1c6ae5c5a2 fix alignment of pthread_attr_t
Closes #10300
2013-11-05 23:15:23 -05:00
bors
b17d4e335d auto merge of #10299 : alexcrichton/rust/osx-loader-path-fix, r=brson
According to apple's documentation of rpath semantics, `@executable_path` means
that the path is relative the the *process executable*, not necessarily the
library in question. On the other hand, `@loader_path` is the path that points to
the library which contains the `@loader_path` reference. All of our rpath usage is
based off the library or executable, not just the executable. This means that on
OSX we should be using `@loader_path` instead of `@executable_path` to achieve the
same semantics as linux's $ORIGIN.

The purpose of this is to unblock the current snapshot from landing. It appears that because we were propagating linker arguments we never saw this before. Now that we're no longer printing linker arguments, we're depending on the libraries to resolve their own references. In using `@executable_path` on OSX, libraries in different locations than the executable were not able to resolve their references (because their rpaths listed were all relative to the location of the library, not the executable).

I'm still a little unclear on how this ever passed locally on my own machine, but it's clear why this is failing on the bots at least.
2013-11-05 18:31:09 -08:00
Alex Crichton
2fc337a7d6 Clarify which errors are format string errors
There were a few ambiguous error messages which look like they could have
cropped up from either the rust compiler for the format string parser. To
differentiate, the prefix 'invalid format string' is now added in front of all
format string errors.

cc #9970
2013-11-05 17:59:40 -08:00
niftynif
058d785369 Re-arranging some things in btree.rs to accommodate testing. 2013-11-05 19:44:21 -05:00
sh8281.kim
4e54828b0d Add make check support(arm-linux-androideabi debuginfo) 2013-11-06 09:41:59 +09:00
Alex Crichton
243c0dac8f Use loader_path instead of executable_path for osx
According to apple's documentation of rpath semantics, @executable_path means
that the path is relative the the *process executable*, not necessarily the
library in question. On the other hand, @loader_path is the path that points to
the library which contains the @loader_path reference. All of our rpath usage is
based off the library or executable, not just the executable. This means that on
OSX we should be using @loader_path instead of @executable_path to achieve the
same semantics as linux's $ORIGIN.
2013-11-05 14:17:30 -08:00
Niko Matsakis
71acc543ca Make TypeContents consider the type T to be reachable via *T pointers
Fixes #9509
2013-11-05 15:51:18 -05:00
Niko Matsakis
3d1f3f4de0 Rename misleading contains_managed to owns_managed 2013-11-05 15:51:18 -05:00
Niko Matsakis
f3191a450c Refactor TypeContents to be more scrutable. In particular, create coarser bits
than the current ones, which were very fine-grained.  Also, cleanly distinguish
when properties must be found in *owned* types vs *reachable* types.

Fixes #10157
Fixes #10278
2013-11-05 14:50:35 -05:00
Dirkjan Bussink
47e0bd403a Move implementation for threads to Rust
This binds to the appropriate pthreads_* and Windows specific functions
and calls them from Rust. This allows for removal of the C++ support
code for threads.

Fixes #10162
2013-11-05 17:49:46 +01:00
bors
92065ceb63 auto merge of #10285 : sfackler/rust/weird-derivings, r=huonw
They seem to have been added by accident.
2013-11-05 01:47:43 -08:00
bors
379bda9e52 auto merge of #10282 : sfackler/rust/rustpkg-test-cfg, r=alexcrichton
Closes #10238
2013-11-05 00:07:20 -08:00
bors
bf98981696 auto merge of #10270 : alexcrichton/rust/no-super-buffer, r=brson
Right now if you're running a program with its output piped to some location and
the program decides to go awry, when you kill the program via some signal none
of the program's last 4K of output will get printed to the screen. In theory the
solution to this would be to register a signal handler as part of the runtime
which then flushes the output stream.

I believe that the current behavior is far enough from what's expected that we
shouldn't be providing this sort of "super buffering" by default when stdout
isn't attached to a tty.
2013-11-04 22:47:00 -08:00
Steven Fackler
6184e844fb Remove #[deriving]s on impls
They seem to have been added by accident.
2013-11-04 22:46:51 -08:00
bors
1c56652640 auto merge of #10064 : luqmana/rust/vvv, r=nikomatsakis
Fixes #2057.

Example:
```Rust
#[no_std];

type c_char = u8;
type c_int = i32;
type size_t = uint;

extern {
    fn printf(format: *c_char, ...) -> c_int;
}

#[lang="fail_bounds_check"]
fn fail_bounds_check(_: *c_char, _: size_t, _: size_t, _: size_t) {}

#[start]
#[fixed_stack_segment]
fn main(_: int, _: **u8) -> int {
    unsafe {
        let msg = bytes!("Hello World!
2013-11-04 21:02:07 -08:00
klutzy
e63ffc1d16 rt: Convert timezone to utf-8 on Windows
Previously #9418 fixed utf-8 assertion issue by wcsftime,
but the function didn't work as expected: it follows the locale
set by setlocale(), not the system code page.
This patch fixes it by manual multibyte-to-unicode conversion.
2013-11-05 13:54:09 +09:00
Luqman Aden
77e0235983 Add tests for variadic foreign functions. 2013-11-04 23:53:11 -05:00
Luqman Aden
c669ccf3d3 libsyntax/librustc: Allow calling variadic foreign functions. 2013-11-04 23:53:11 -05:00
Steven Fackler
4b9c5d6878 Allow --cfg on rustpkg test
Closes #10238
2013-11-04 20:41:32 -08:00
bors
4b04395c11 auto merge of #10182 : alexcrichton/rust/typeid-intrinsic, r=nikomatsakis
This isn't quite as fancy as the struct in #9913, but I'm not sure we should be exposing crate names/hashes of the types. That being said, it'd be pretty easy to extend this (the deterministic hashing regardless of what crate you're in was the hard part).
2013-11-04 19:21:50 -08:00
Alex Crichton
e7a6782948 Relax the constraints on a debuginfo test
The snapshot just failed due to a debuginfo test failing, and according to its
output at
http://buildbot.rust-lang.org/builders/snap3-linux/builds/564/steps/test/logs/stdio
it appears to be because the printed lines has a little less information than
the original lines were checking for. I would suspect that this is just because
of a slightly different version of gdb, but it's not that serious regardless.
2013-11-04 17:11:44 -08:00
niftynif
e6dde28c95 Added skeleton implementation of a B-tree with a few bells and
whistles.  No major functionality added yet (such as insertion and
removal).
2013-11-04 19:45:49 -05:00
Alex Crichton
615444d263 Stop extra buffering when stdout isn't a tty
Right now if you're running a program with its output piped to some location and
the program decides to go awry, when you kill the program via some signal none
of the program's last 4K of output will get printed to the screen. In theory the
solution to this would be to register a signal handler as part of the runtime
which then flushes the output stream.

I believe that the current behavior is far enough from what's expected that we
shouldn't be providing this sort of "super buffering" by default when stdout
isn't attached to a tty.
2013-11-04 15:48:34 -08:00
bors
658637baf4 auto merge of #10179 : alexcrichton/rust/rt-improvements, r=cmr
This fleshes out the io::file module a fair bit more, adding all of the functionality that I can think of that we would want. Some questions about the representation which I'm curious about:

* I modified `FileStat` to be a little less platform-agnostic, but it's still fairly platform-specific. I don't want to hide information that we have, but I don't want to depend on this information being available. One possible route is to have an `extra` field which has all this os-dependent stuff which is clearly documented as it should be avoided.

* Does it make sense for directory functions to be top-level functions instead of static methods? It seems silly to import `std::rt::io::file` and `std::rt::io::File` at the top of files that need to deal with directories and files.
2013-11-04 12:21:11 -08:00
Alex Crichton
3c3ed1499a Move io::file to io::fs and fns out of File
This renames the `file` module to `fs` because that more accurately describes
its current purpose (manipulating the filesystem, not just files).

Additionally, this adds an UnstableFileStat structure as a nested structure of
FileStat to signify that the fields should not be depended on. The structure is
currently flagged with #[unstable], but it's unlikely that it has much meaning.

Closes #10241
2013-11-04 10:28:55 -08:00
bors
70e9b5ab39 auto merge of #10260 : alexcrichton/rust/fix-temp-name, r=thestinger
This file did not respect the #[link(name = "...")] attribute when it was
clearly intended to do so. The problem is that the crate attributes just weren't
passed in. This causes lots of problems in rust today because the object file
for all our libraries is inferred to be 'lib.o' because all of the files are
called 'lib.rs'.

I tried to figure out a good way to test for this, but I wasn't able to come up
with a good way that fit into our current testing framework. Nonetheless, I have
tested this locally and object files get named as they should. This should fix
compiling with `make -jN` again (because the object files are all different
again).
2013-11-04 00:06:18 -08:00
Alex Crichton
c3089a1d31 Fix the temporary name of the object file created
This file did not respect the #[link(name = "...")] attribute when it was
clearly intended to do so. The problem is that the crate attributes just weren't
passed in. This causes lots of problems in rust today because the object file
for all our libraries is inferred to be 'lib.o' because all of the files are
called 'lib.rs'.

I tried to figure out a good way to test for this, but I wasn't able to come up
with a good way that fit into our current testing framework. Nonetheless, I have
tested this locally and object files get named as they should. This should fix
compiling with `make -jN` again (because the object files are all different
again).
2013-11-03 23:56:45 -08:00
bors
94677c18af auto merge of #10254 : sfackler/rust/rustpkg-test-failure, r=alexcrichton
It previously set the exit status, but the main wrapper paved over that
with an exit code of 0.

Closes #9761
2013-11-03 22:56:01 -08:00
Steven Fackler
ff859edb85 Ensure rustpkg test fails if tests failed
It previously set the exit status, but the main wrapper paved over that
with an exit code of 0.

Closes #9761
2013-11-03 22:23:47 -08:00
bors
556088cfb1 auto merge of #10251 : thestinger/rust/ptr, r=alexcritchton
This moves the per-architecture difference into the compiler.
2013-11-03 19:31:11 -08:00
Daniel Micay
67966fa9de simplify memcpy/memmove/memset intrinsics
This moves the per-architecture difference into the compiler.
2013-11-03 20:31:57 -05:00
Alex Crichton
f19d083362 Fill out the remaining functionality in io::file
This adds bindings to the remaining functions provided by libuv, all of which
are useful operations on files which need to get exposed somehow.

Some highlights:

* Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type
* Moved all file-related methods to be static methods under `File`
* All directory related methods are still top-level functions
* Created `io::FilePermission` types (backed by u32) that are what you'd expect
* Created `io::FileType` and refactored `FileStat` to use FileType and
  FilePermission
* Removed the expanding matrix of `FileMode` operations. The mode of reading a
  file will not have the O_CREAT flag, but a write mode will always have the
  O_CREAT flag.

Closes #10130
Closes #10131
Closes #10121
2013-11-03 15:15:42 -08:00
Alex Crichton
9c1851019f Remove all blocking std::os blocking functions
This commit moves all thread-blocking I/O functions from the std::os module.
Their replacements can be found in either std::rt::io::file or in a hidden
"old_os" module inside of native::file. I didn't want to outright delete these
functions because they have a lot of special casing learned over time for each
OS/platform, and I imagine that these will someday get integrated into a
blocking implementation of IoFactory. For now, they're moved to a private module
to prevent bitrot and still have tests to ensure that they work.

I've also expanded the extensions to a few more methods defined on Path, most of
which were previously defined in std::os but now have non-thread-blocking
implementations as part of using the current IoFactory.

The api of io::file is in flux, but I plan on changing it in the next commit as
well.

Closes #10057
2013-11-03 15:15:42 -08:00
Alex Crichton
7bf58c2baa Modify IoFactory's fs_mkdir, and add fs_rename
The invocation for making a directory should be able to specify a mode to make
the directory with (instead of defaulting to one particular mode). Additionally,
libuv and various OSes implement efficient versions of renaming files, so this
operation is exposed as an IoFactory call.
2013-11-03 15:15:41 -08:00
Alex Crichton
d7b6502784 Move rt::io traits into the prelude
These traits belong here, and were simply waiting for the std::io traits to get
removed. It's time they take their rightful positions!
2013-11-03 15:15:41 -08:00
Huon Wilson
da43676e39 docs: Replace std::iterator with std::iter. 2013-11-04 10:01:00 +11:00
bors
702767db65 auto merge of #10219 : alexcrichton/rust/drop-invoke, r=pcwalton
This commit changes drop glue generated for structs to use the invoke LLVM
instruction instead of call. What this means is that if the user destructor
triggers an unwinding, then the fields of the struct will still ge dropped.

This is not an attempt to support failing while failing, as that's mostly a
problem of runtime support. This is more of an issue of soundness in making sure
that destructors are appropriately run. The test included fails before this
commit, and only has one call to fail!(), yet it doesn't destroy its struct
fields.
2013-11-03 11:16:17 -08:00
Chris Morgan
0369a41f0e Rename files to match current recommendations.
New standards have arisen in recent months, mostly for the use of
rustpkg, but the main Rust codebase has not been altered to match these
new specifications. This changeset rectifies most of these issues.

- Renamed the crate source files `src/libX/X.rs` to `lib.rs`, for
  consistency with current styles; this affects extra, rustc, rustdoc,
  rustpkg, rustuv, std, syntax.

- Renamed `X/X.rs` to `X/mod.rs,` as is now recommended style, for
  `std::num` and `std::terminfo`.

- Shifted `src/libstd/str/ascii.rs` out of the otherwise unused `str`
  directory, to be consistent with its import path of `std::ascii`;
  libstd is flat at present so it's more appropriate thus.

While this removes some `#[path = "..."]` directives, it does not remove
all of them, and leaves certain other inconsistencies, such as `std::u8`
et al. which are actually stored in `src/libstd/num/` (one subdirectory
down). No quorum has been reached on this issue, so I felt it best to
leave them all alone at present. #9208 deals with the possibility of
making libstd more hierarchical (such as changing the crate to match the
current filesystem structure, which would make the module path
`std::num::u8`).

There is one thing remaining in which this repository is not
rustpkg-compliant: rustpkg would have `src/std/` et al. rather than
`src/libstd/` et al. I have not endeavoured to change that at this point
as it would guarantee prompt bitrot and confusion. A change of that
magnitude needs to be discussed first.
2013-11-03 23:49:01 +11:00
bors
318e1da4a7 auto merge of #10244 : thestinger/rust/abort, r=alexcrichton
The function is marked `noreturn`, so it shouldn't have this.
2013-11-03 00:46:01 -07:00
Daniel Micay
ddbd89b33e replace RetVoid with Unreachable to fix lint
The function is marked `noreturn`, so it shouldn't return.
2013-11-03 01:39:36 -05:00
bors
4910b7ac28 auto merge of #10242 : thestinger/rust/inline_dtor, r=alexcrichton
Closes #7793
2013-11-02 23:26:00 -07:00
bors
b5c1b48048 auto merge of #10199 : alexcrichton/rust/no-propagate, r=brson
This commit removes the propagation of `link_args` attributes across crates. The first commit message has the reasons as to why. Additionally, this starts statically linking some C/C++ helper libraries that we have to their respective crates instead of throwing then in librustrt and then having everything depend on librustrt.

The major downside of this movement is that we're losing the ability to control visible symbols. I couldn't figure out a way to internalize symbols from a static library during the linking process, so everyone who links to librustdoc will be able to use its sundown implementation (not exactly ideal). I'm not entirely sure how to fix this (beyond generating a list of all public symbols, including rust ones, and passing that to the linker), but we may have a much easier time with this once we start using llvm's linker toolchain.

There's certainly a lot more possibilities in where this can go, but I didn't want to go too deep just yet. The main idea here is to stop propagating linker arguments and then see how we're able to start statically linking libraries as a result.

r? @catamorphism, you're going to be working on linking soon, so feel free to completely throw this away for something else!
2013-11-02 22:16:02 -07:00
Matt Carberry
66abb92a47 Grammar error and vim syntax highlighting mistake fixed. 2013-11-02 21:34:29 -07:00
Alex Crichton
0ce1b2f04d Statically link libuv to librustuv
Similarly to the previous commit, libuv is only used by this library, so there's
no need for it to be linked into librustrt and available to all crates by
default.
2013-11-02 21:28:17 -07:00
Matt Carberry
519b86b8a8 Added octal literal support. 2013-11-02 21:26:29 -07:00
Daniel Micay
e58270219f fix cross-crate destructor inlining
Closes #7793
2013-11-02 23:55:23 -04:00
Michael Letterle
ca2f3028e9 Updated debugging metadata for ty_nil and ty_bot
ty_nil will now report as "()" in gdb
ty_bot will now report as "!" in gdb

Added test to confirm basic types debugging metadata.

This fixes #9226
2013-11-02 19:35:35 -04:00
bors
e0c01ca153 auto merge of #10165 : dcrewi/rust/missing-doc-on-private-trait, r=cmr
Fixes #10069.
2013-11-02 12:11:18 -07:00
bors
3899f8da6b auto merge of #10217 : alexcrichton/rust/less-reachable, r=pcwalton
Previously, all functions called by a reachable function were considered
reachable, but this is only the case if the original function was possibly
inlineable (if it's type generic or #[inline]-flagged).
2013-11-02 11:01:16 -07:00
bors
22dfdc927b auto merge of #10233 : sfackler/rust/private-module, r=alexcrichton
A private module will survive the strip-private pass if it contains
trait implementations, which aren't stripped until a separate pass in
render.
2013-11-02 03:11:10 -07:00
bors
95b18335da auto merge of #10230 : alexcrichton/rust/snapshots, r=brson
Closes #2240
2013-11-02 02:01:25 -07:00
bors
6879c8b382 auto merge of #10225 : Jurily/rust/master, r=alexcrichton 2013-11-01 23:36:10 -07:00
Steven Fackler
ea9432ef00 Rustdoc: Properly strip private modules
A private module will survive the strip-private pass if it contains
trait implementations, which aren't stripped until a separate pass in
render.
2013-11-01 23:32:58 -07:00
Alex Crichton
7f31b079e5 Statically link sundown to librustdoc
Closes #10103
2013-11-01 21:28:48 -07:00
Alex Crichton
2b9c7742b9 Stop propagating link arguments across crates
This is a fairly brittle modle that doesn't scale well across many crates. It's
unlikely that all of the downstream crates will have all of the original native
dependencies of all the upstream crates. In the case that FFI functions are
reachable, then it should be the responsibility of the downstream crate to link
against the correct library, or the upstream crate should prevent the functions
from being reachable.
2013-11-01 21:28:47 -07:00
bors
c15038db08 auto merge of #10223 : huonw/rust/gamma, r=cmr
Implements the [Gamma distribution](https://en.wikipedia.org/wiki/Gamma_distribution), using the algorithm described by Marsaglia & Tsang 2000[1]. I added tests checking that the mean and variance of this implementation is as expected for a range of values of the parameters in 5d87c00a0f (they pass locally, but obviously won't even build on Travis until this is merged).

Also, moves `std::rand::distributions` to a subfolder, and performs a minor clean-up of the benchmarking (makes the number of iterations shared by the whole `std::rand` subtree).

[1]: George Marsaglia and Wai Wan Tsang. 2000. "A Simple Method for Generating Gamma Variables" *ACM Trans. Math. Softw.* 26, 3 (September 2000), 363-372. DOI:[10.1145/358407.358414](http://doi.acm.org/10.1145/358407.358414).
2013-11-01 18:36:42 -07:00
Alex Crichton
9df164c145 Register new snapshots
Closes #2240
2013-11-01 16:51:33 -07:00
bors
894c1f6398 auto merge of #10215 : brson/rust/rustctask, r=thestinger 2013-11-01 16:16:26 -07:00
Alex Crichton
b00449380f Remove unnecessary unwind messages
Now that the type_id intrinsic is working across crates, all of these
unnecessary messages can be removed to have the failure type for a task truly be
~Any and only ~Any
2013-11-01 11:58:25 -07:00
bors
fa2bb970d1 auto merge of #10204 : alexcrichton/rust/better-names, r=brson
Tests now have the same name as the test that they're running (to allow for
easier diagnosing of failure sources), and the main task is now specially named
`<main>` instead of `<unnamed>`.

Closes #10195
Closes #10073
2013-11-01 11:31:32 -07:00
Alex Crichton
61637439dc Add a type_id intrinsic
Closes #9913
2013-11-01 10:31:33 -07:00
bors
7cff3c74b8 auto merge of #10119 : Kimundi/rust/option_and_generic, r=alexcrichton
This takes the last reforms on the `Option` type and applies them to `Result` too. For that, I reordered and grouped the functions in both modules, and also did some refactorings:

- Added `as_ref` and `as_mut` adapters to `Result`.
- Renamed `Result::map_move` to `Result::map` (same for `_err` variant), deleted other map functions. 
- Made the `.expect()` methods be generic over anything you can
  fail with.
- Updated some doc comments to the line doc comment style
- Cleaned up and extended standard trait implementations on `Option` and `Result`
- Removed legacy implementations in the `option` and `result` module
2013-11-01 09:36:25 -07:00
Alex Crichton
e2a68b6867 Give test and main tasks better names
Tests now have the same name as the test that they're running (to allow for
easier diagnosing of failure sources), and the main task is now specially named
<main> instead of <unnamed>.

Closes #10195
Closes #10073
2013-11-01 09:16:11 -07:00
Gyorgy Andrasek
0f66856e53 Fix typo in to_digit 2013-11-01 17:13:43 +01:00
bors
3a15482b9c auto merge of #10218 : alexcrichton/rust/stdio-flush-safe, r=cmr
The previous method was unsound because you could very easily create two mutable
pointers which alias the same location (not sound behavior). This hides the
function which does so and then exports an explicit flush() function (with
documentation about how it works).
2013-11-01 08:26:24 -07:00
Marvin Löbel
415a04315e Fixed unused import warning in tests 2013-11-01 15:37:29 +01:00
Marvin Löbel
45fe20515c Removed legacy implementations 2013-11-01 15:01:56 +01:00
Marvin Löbel
c22e7f02d1 Cleaned up the option and result module in more detail
Made both types implement more standard traits in a nicer way

Derived more traits
2013-11-01 15:01:56 +01:00
Marvin Löbel
0d92c53f4a Reordered the methods in std::Option and std::Result
Cleaned up the source in a few places

Renamed `map_move` to `map`, removed other `map` methods

Added `as_ref` and `as_mut` adapters to `Result`

Added `fmt::Default` impl
2013-11-01 15:00:46 +01:00
bors
a300314827 auto merge of #10213 : telotortium/rust/rand-fill_bytes-stack-overflow, r=huonw
Fix the implementation of `std::rand::Rng::fill_bytes()` for
`std::rand::reseeding::ReseedingRng` to call the `fill_bytes()` method
of the underlying RNG rather than itself, which causes infinite
recursion.

Fixes #10202.
2013-11-01 05:21:24 -07:00
Huon Wilson
3c25baa540 std::rand: share the benchmark counter among the whole module tree. 2013-11-01 22:09:06 +11:00
Huon Wilson
cd50fb39b5 std::rand: Implement the Gamma distribution. 2013-11-01 22:09:06 +11:00
bors
04c58c9f81 auto merge of #10205 : brson/rust/unnamed_addr, r=thestinger 2013-11-01 04:06:23 -07:00
Huon Wilson
701b4d137e std::rand: Move distributions to a subfolder. 2013-11-01 21:47:07 +11:00
bors
986d1f78be auto merge of #10196 : huonw/rust/fix-zig, r=alexcrichton
The code was using (in the notation of Doornik 2005) `f(x_{i+1}) -
f(x_{i+2})` rather than `f(x_i) - f(x_{i+1})`. This corrects that, and
removes the F_DIFF tables which caused this problem in the first place.

They `F_DIFF` tables are a micro-optimisation (in theory, they could
easily be a micro-pessimisation): that `if` gets hit about 1% of the
time for Exp/Normal, and the rest of the condition involves RNG calls
and a floating point `exp`, so it is unlikely that saving a single FP
subtraction will be very useful (especially as more tables means more
memory reads and higher cache pressure, as well as taking up space in
the binary (although only ~2k in this case)).

Closes #10084. Notably, unlike that issue suggests, this wasn't a
problem with the Exp tables. It affected Normal too, but since it is
symmetric, there was no bias in the mean (as the bias was equal on the
positive and negative sides and so cancelled out) but it was visible as
a variance slightly lower than it should be.

New plot:

![exp-density](https://f.cloud.github.com/assets/1203825/1445796/42218dfe-422a-11e3-9f98-2cd146b82b46.png)

I've started writing some tests in [huonw/random-tests](https://github.com/huonw/random-tests) (not in the main repo because they can and do fail occasionally, due to randomness, but it is on Travis and Rust-CI so it will hopefully track the language), unsurprisingly, they're [currently failing](https://travis-ci.org/huonw/random-tests/builds/13313987) (note that both exp and norm are failing, the former due to both mean and variance the latter due to just variance), but pass at the 0.01 level reliably with this change.

(Currently the only test is essentially a quantitative version of the plots I've been showing, which is run on the `f64` `Rand` instance (uniform 0 to 1), and the Normal and Exp distributions.)
2013-11-01 01:16:22 -07:00
Alex Crichton
e35cd962a6 Drop struct fields if the user destructor fails
This commit changes drop glue generated for structs to use the invoke LLVM
instruction instead of call. What this means is that if the user destructor
triggers an unwinding, then the fields of the struct will still ge dropped.

This is not an attempt to support failing while failing, as that's mostly a
problem of runtime support. This is more of an issue of soundness in making sure
that destructors are appropriately run. The test included fails before this
commit, and only has one call to fail!(), yet it doesn't destroy its struct
fields.
2013-10-31 23:31:11 -07:00
bors
41ffc90e98 auto merge of #10187 : pcwalton/rust/remove-mocks, r=pcwalton
r? @alexcrichton
2013-10-31 22:26:24 -07:00
Alex Crichton
8f258ab532 Provide a sound method of flushing stdout
The previous method was unsound because you could very easily create two mutable
pointers which alias the same location (not sound behavior). This hides the
function which does so and then exports an explicit flush() function (with
documentation about how it works).
2013-10-31 22:09:48 -07:00
Alex Crichton
681fda0169 Reduce the aggressiveness of reachability
Previously, all functions called by a reachable function were considered
reachable, but this is only the case if the original function was possibly
inlineable (if it's type generic or #[inline]-flagged).
2013-10-31 20:47:23 -07:00
bors
1bbd4afb4a auto merge of #10181 : brson/rust/managed_boxes, r=thestinger 2013-10-31 20:36:17 -07:00
Brian Anderson
c874e64aa6 Name the rustc task 'rustc' 2013-10-31 20:08:17 -07:00
Robert Irelan
96589e7264 Fix infinite recursion in fill_bytes()
Fix the implementation of `std::rand::Rng::fill_bytes()` for
`std::rand::reseeding::ReseedingRng` to call the `fill_bytes()` method
of the underlying RNG rather than itself, which causes infinite
recursion.

Fixes #10202.
2013-10-31 21:19:47 -05:00
Brian Anderson
2992720c9b Declare all Rust functions as unnamed_addr. Closes #8957 2013-10-31 14:53:22 -07:00