Commit Graph

23690 Commits

Author SHA1 Message Date
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
bors
7fc689305c auto merge of #10328 : alexcrichton/rust/snapshots, r=thestinger 2013-11-06 20:31:08 -08: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
bors
99e866392f auto merge of #10261 : ksh8281/rust/makecheck_debuginfo_arm-linux-androideabi, r=brson
In order to pass make check on android target

credit to @ksh8281
2013-11-05 17:06:11 -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
bors
7fb583be7b auto merge of #10290 : dbussink/rust/thread_in_rust, r=alexcrichton
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.

This needs to be reviewed for the Windows parts, I've tested on OS X and Linux.

Fixes #10162
2013-11-05 08:56:08 -08: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
bors
72e432df9d auto merge of #10276 : alexcrichton/rust/fix-debug-info, r=jdm
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:22:03 -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