Commit Graph

22420 Commits

Author SHA1 Message Date
Luqman Aden
2d22c0c8e4 Fix unresolved symbol error for the crate_map in libstd on os x. 2013-09-19 18:17:29 -04:00
Luqman Aden
d3309eb432 tests: Remove crate_map from start. 2013-09-18 19:18:53 -04:00
Luqman Aden
133200a6e2 libstd/librustc: Make the crate_map a weak symbol that libstd links against. 2013-09-18 17:44:04 -04:00
Luqman Aden
9621156fc3 librustc/libstd: No longer pass crate_map to start. 2013-09-18 16:51:27 -04:00
bors
d2b0b11aeb auto merge of #9296 : alexcrichton/rust/snapshots, r=cmr
huzzah!
2013-09-18 11:46:37 -07:00
Alex Crichton
817576ee70 Register new snapshots 2013-09-18 11:07:22 -07:00
bors
b43ee6cd2e auto merge of #9277 : crabtw/rust/mips, r=brson
This patch fixes some errors of MIPS target, however, MIPS C ABI is still broken. I will send another PR to fix the problem.

Because MIPS target has no "generic" CPU name, I add --target-cpu and --target-feature to RUST_FLAGS. In order to workaround the "compact frame descriptions incompatible with DWARF2 .eh_frame" problem, the linker I used is CXX but not CC.
2013-09-18 09:15:56 -07:00
bors
e02313a172 auto merge of #9275 : blake2-ppc/rust/float-from-str, r=thestinger
std: Remove {float,f64,f32}::from_str in favor of from_str in the prelude

Like issue #9209, remove float::{from_str, from_str_radix} in favor of
the two corresponding traits. The same for modules f64 and f32.

New usage is:

    from_str::<float>("1.2e34")
2013-09-18 08:01:00 -07:00
bors
9e636f106d auto merge of #9272 : luqmana/rust/esln, r=catamorphism
Fixes #9270
2013-09-18 06:45:53 -07:00
bors
10d26f8daf auto merge of #9271 : brson/rust/extra-help, r=catamorphism
Look like this now

```
    -Z FLAG             Set internal debugging options
    -v --version        Print version info and exit

Additional help:
    -W help             Print 'lint' options and default settings
    -Z help             Print internal options for debugging rustc

```
2013-09-18 05:30:58 -07:00
bors
b8d3496528 auto merge of #9264 : ben0x539/rust/pp-work, r=alexcrichton
Since 3b6314c the pretty printer seems to only print trait bounds for `ast::ty_path(...)`s that have a generics arguments list. That seems wrong, so let's always print them.

Closes #9253, un-xfails test for #7673.
2013-09-18 04:15:56 -07:00
bors
adb638f54d auto merge of #9254 : vadimcn/rust/fix-mingw-v4, r=brson
Fix Rust build on mingw v4.0
See #9246 for details.
2013-09-18 02:25:57 -07:00
bors
7dd9344b03 auto merge of #9248 : DanRosenwasser/rust/master, r=alexcrichton
Since `
2013-09-18 00:15:55 -07:00
bors
cbd1eefbd3 auto merge of #9281 : brson/rust/multistring, r=alexcrichton
When `count` is `Some` this function was reading a byte past the end
of the buffer.
2013-09-17 22:20:57 -07:00
Brian Anderson
fd0fcba9f5 std: Fix an invalid read in from_c_multistring
When `count` is `Some` this function was reading a byte past the end
of the buffer.
2013-09-17 21:25:18 -07:00
Daniel Rosenwasser
604667fa82 Added support for a \0 escape sequence.
This commit adds support for `\0` escapes in character and string literals.

Since `\0` is equivalent to `\x00`, this is a direct translation to the latter
escape sequence. Future builds will be able to compile using `\0` directly.

Also updated the grammar specification and added a test for NUL characters.
2013-09-17 23:52:29 -04:00
bors
4c6bf48720 auto merge of #9133 : dcrewi/rust/bigint-random-range, r=huonw 2013-09-17 20:35:54 -07:00
Jyun-Yan You
d11f746cc1 fix compilation errors of mips target 2013-09-18 10:10:32 +08:00
blake2-ppc
b5d560a9e0 std: Remove {float,f64,f32}::from_str in favor of from_str
Like issue #9209, remove float::{from_str, from_str_radix} in favor of
the two corresponding traits. The same for modules f64 and f32.

New usage is

	from_str::<float>("1.2e34")
2013-09-18 04:02:42 +02:00
bors
4dc3a97698 auto merge of #9258 : thestinger/rust/doc, r=catamorphism
Closes #9144
2013-09-17 18:55:48 -07:00
David Creswick
af72e4108d Generate random big integers within a range
Thanks to @huonw for feedback
2013-09-17 20:48:04 -05:00
Luqman Aden
1ce657aa1f librustc: Respect #[link_name] on extern statics. Fixes #9270 2013-09-17 21:03:56 -04:00
Brian Anderson
34ac5b05f6 Add an extra line before the "Additional Help" in rustc's --help output 2013-09-17 17:55:18 -07:00
bors
460021bdf2 auto merge of #9269 : alexcrichton/rust/ignore-rustpkg-test, r=brson
@catamorphism says he has a fix coming soon, so I didn't allocate an issue for
it. If it festers for more than a few days I'll open something up though.
2013-09-17 17:15:45 -07:00
Alex Crichton
3b07f1efe5 Ignore a test which is blocking a snapshot
@catamorphism says he has a fix coming soon, so I didn't allocate an issue for
it. If it festers for more than a few days I'll open something up though.
2013-09-17 17:11:15 -07:00
Daniel Micay
e12c3bfbf9 document what unsafety means
Closes #9144
2013-09-17 19:13:14 -04:00
bors
0efc4822e9 auto merge of #9257 : alexcrichton/rust/better-address-insignificant, r=thestinger
If a static is flagged as address_insignificant, then for LLVM to actually
perform the relevant optimization it must have an internal linkage type. What
this means, though, is that the static will not be available to other crates.
Hence, if you have a generic function with an inner static, it will fail to link
when built as a library because other crates will attempt to use the inner
static externally.

This gets around the issue by inlining the static into the metadata. The same
relevant optimization is then applied separately in the external crate. What
this ends up meaning is that all statics tagged with #[address_insignificant]
will appear at most once per crate (by value), but they could appear in multiple
crates.

This should be the last blocker for using format! ...
2013-09-17 15:20:44 -07:00
Benjamin Herr
823ebb14ba pp: also print bounds in paths with no generic params
Since 3b6314c3 the pretty printer seems to only print trait bounds for
`ast::ty_path(...)`s that have a generics arguments list. That seems
wrong, so let's always print them.

Closes #9253, un-xfails test for #7673.
2013-09-17 23:41:42 +02:00
bors
c135cb2683 auto merge of #9235 : olsonjeffery/rust/newrt_file_io_1, r=thestinger
A quick rundown:

- added `file::{readdir, stat, mkdir, rmdir}`
- Added access-constrained versions of `FileStream`; `FileReader` and `FileWriter` respectively
- big rework in `uv::file` .. most actions are by-val-self methods on `FsRequest`; `FileDescriptor` has gone the way of the dinosaurs
- playing nice w/ homing IO (I just copied ecr's work, hehe), etc
- added `FileInfo` trait, with an impl for `Path`
  - wrapper for file-specific actions, with the file path always implied by self's value
  - has the means to create `FileReader` & `FileWriter` (this isn't exposed in the top-level free function API)
  - has "safe" wrappers for `stat()` that won't throw in the event of non-existence/error (in this case, I mean `is_file` and `exists`)
  - actions should fail if done on non-regular-files, as appropriate
- added `DirectoryInfo` trait, with an impl for `Path`
  - pretty much ditto above, but for directories
  - added `readdir` (!!) to iterate over entries in a dir as a `~[Path]` (this was *brutal* to get working)

...<del>and lots of other stuff</del>not really. Do your worst!
2013-09-17 14:05:45 -07:00
Benjamin Herr
aa406c151e pp: typo in comment 2013-09-17 22:27:12 +02:00
bors
9e8fb4ad61 auto merge of #9256 : thestinger/rust/drop, r=alexcrichton 2013-09-17 12:50:46 -07:00
Alex Crichton
9adcbac30d Prevent a rare linkage issue with an xcrate static
If a static is flagged as address_insignificant, then for LLVM to actually
perform the relevant optimization it must have an internal linkage type. What
this means, though, is that the static will not be available to other crates.
Hence, if you have a generic function with an inner static, it will fail to link
when built as a library because other crates will attempt to use the inner
static externally.

This gets around the issue by inlining the static into the metadata. The same
relevant optimization is then applied separately in the external crate. What
this ends up meaning is that all statics tagged with #[address_insignificant]
will appear at most once per crate (by value), but they could appear in multiple
crates.

This should be the last blocker for using format! ...
2013-09-17 11:24:05 -07:00
Jeff Olson
70152ff557 std: fix win32 build issue re: multistring parsing 2013-09-17 11:15:33 -07:00
bors
023aab453c auto merge of #9236 : steveklabnik/rust/rustpkg_init, r=catamorphism
Closes #9045

Built on top of #9235, which isn't strictly needed for now, but I imagine I will use part of. Unsure.

I mostly wanted to start this off to get some feedback from @catamorphism and others. These are the directories that actually need made, but I was thinking about adding a few other things:

1. an `examples` directory, since it seems like that's a common pattern
2. a `.gitignore` file that ignores `build`. And anything else that makes sense
3. a sample module that'd actually compile


Feedback?
2013-09-17 11:00:46 -07:00
Steve Klabnik
77bbf23b4a Implementing 'rustpkg init'.
This will initialize a new workspace.
2013-09-17 10:53:32 -07:00
Jeff Olson
a5275ffd5c std: whitespace clean up io::file docs 2013-09-17 10:14:15 -07:00
Daniel Micay
befc561fa4 remove unnecessary transmutes 2013-09-17 11:54:37 -04:00
bors
72e7c62ec4 auto merge of #9245 : kballard/rust/bytes-span, r=catamorphism
This constrains the span to the appropriate argument, so you know which
one caused the problem. Instead of

    foo.rs:2:4: 2:21 error: Too large integer literal in bytes!
    foo.rs:2    bytes!(1, 256, 2)
                ^~~~~~~~~~~~~~~~~

it will say

    foo.rs:2:14 2:17 error: Too large integer literal in bytes!
    foo.rs:2    bytes!(1, 256, 2)
                          ^~~
2013-09-17 08:45:44 -07:00
Jeff Olson
5d9932fddb std: fix win32 build error in os::env() 2013-09-17 08:40:31 -07:00
Jeff Olson
3067ee6373 std: remove RtioStream 2013-09-17 08:01:44 -07:00
bors
29cdf58861 auto merge of #9244 : thestinger/rust/drop, r=catamorphism
This doesn't close any bugs as the goal is to convert the parameter to by-value, but this is a step towards being able to make guarantees about `&T` pointers (where T is Freeze) to LLVM.
2013-09-17 07:15:42 -07:00
bors
f45c6406bc auto merge of #9241 : alexcrichton/rust/build-rustdoc-ng, r=catamorphism
Now rustdoc_ng will be built as both a binary and a library (using the same
rules as all the other binaries that rust has). Furthermore, this will also
start building rustdoc_ng unit tests (and running them).

Note that some `rustdoc_ng` tests were removed, but @cmr says they weren't supposed to be there in the first place. The rustdoc_ng code should also be included in `make install` and `make dist` now.
2013-09-17 06:00:45 -07:00
bors
7ea85333ff auto merge of #9239 : steveklabnik/rust/rustpkg_tutorial, r=catamorphism
First shot at a new tutorial for rustpkg. /cc @catamorphism

Right now, I'm linking to my sample package on GitHub, I'm not sure that everyone would be comfortable with me having that there. Maybe under the mozilla org? I think having one to install and hold up as a default makes sense.
2013-09-17 04:45:45 -07:00
bors
2a706aab1c auto merge of #9234 : steveklabnik/rust/rustpkg_manpage, r=cmr
Closes #9221.

"rustpkg test" isn't implemented yet, so it shouldn't be in the manpage. Referring interested parties to the manual is probably
the right thing for now; eventually, these documents should merge.

/cc @catamorphism
2013-09-17 03:30:48 -07:00
bors
07e821aa6b auto merge of #9225 : huonw/rust/closing-time, r=alexcrichton
Closes #2074.
Closes #5008.
Closes #7519.
Closes #7673.
Closes #7770.
Closes #8171.
2013-09-17 02:15:49 -07:00
Vadim Chugunov
e6832e6b96 Disabled tests which now fail on Windows+mingw4.0 due to GCC 4.8 ABI change (#9205).
These really should have been marked xfail-win32, but that doesn't exist, so xfail-fast it is.
2013-09-17 01:06:02 -07:00
Vadim Chugunov
c3fd430603 The purpose of these headers is to fix issues with mingw v4.0, as described in #9246.
This works by adding this directory to GCC include search path before mingw system headers directories,
so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
2013-09-17 01:06:01 -07:00
Huon Wilson
4f92f452bd Tests for fixed issues.
Closes #2074.
Closes #5008.
Closes #7519.
Closes #7673.
Closes #7770.
Closes #8171.
2013-09-17 18:02:44 +10:00
bors
6055611af6 auto merge of #9214 : adridu59/rust/issue-7723, r=thestinger
This avoids default CRLF on msysgit for Windows which can cause trouble.
Cf. https://help.github.com/articles/dealing-with-line-endings#text-eollf

Closes #7723.
2013-09-17 01:00:47 -07:00
bors
d1c05504ba auto merge of #9130 : alexcrichton/rust/inline-globals, r=thestinger
In #8185 cross-crate condition handlers were fixed by ensuring that globals
didn't start appearing in different crates with different addressed. An
unfortunate side effect of that pull request is that constants weren't inlined
across crates (uint::bits is unknown to everything but libstd).

This commit fixes this inlining by using the `available_eternally` linkage
provided by LLVM. It partially reverts #8185, and then adds support for this
linkage type. The main caveat is that not all statics could be inlined into
other crates. Before this patch, all statics were considered "inlineable items",
but an unfortunate side effect of how we deal with `&static` and `&[static]`
means that these two cases cannot be inlined across crates. The translation of
constants was modified to propogate this condition of whether a constant
should be considered inlineable into other crates.

Closes #9036
2013-09-16 23:45:49 -07:00