Commit Graph

23454 Commits

Author SHA1 Message Date
Brian Anderson 3675e42334 std: Move sys::log_str to repr::repr_to_str. Further work on #2240. 2013-10-21 11:59:23 -07:00
Alex Crichton 41f6e97a44 rustdoc: Render default methods for impls as well
This does not work for cross-crate implementations of traits. Cross-crate
implementations are a separate issue that should be addressed separately.
Basically when an implementation of an external trait is detected, the trait
would have to be loaded at that time (or possibly sooner...). Rustdoc currently
doesn't have the proper infrastructure for adding this.

Closes #9985
cc #9999
2013-10-21 11:43:14 -07:00
Corey Richardson 1122d6ab4a Register snapshots 2013-10-21 14:43:11 -04:00
Daniel Micay 462a28d003 fix the new floating point intrinsics 2013-10-21 14:26:07 -04:00
bors cf7b9eb51f auto merge of #9736 : catamorphism/rust/rustpkg-issue-8520, r=cmr
r? @cmr As per #8520, find crates in the current working directory even
if it's not a workspace.

Closes #8520
2013-10-21 10:51:29 -07:00
Alex Crichton bf6bb01a22 rustdoc: Don't overflow long type/module names
Closes #9862
2013-10-21 10:48:57 -07:00
Tim Chevalier 5412794192 rustpkg: Search for crates in the current directory
As per #8520, find crates in the current working directory even
if it's not a workspace.

Closes #8520
2013-10-21 10:43:42 -07:00
Alex Crichton a25bbcc27f Propagate reachability through reexported impls
When re-exporting a trait/structure/enum, then we need to propagate the
reachability of the type through the methods that are defined on it.

Closes #9906
Closes #9968
2013-10-21 10:37:36 -07:00
Leah Hanson 9ced953b12 Remove rusti reference from pp.mk 2013-10-21 10:57:20 -05:00
bors ebb9b46191 auto merge of #9986 : thestinger/rust/float, r=cmr
copysign, ring, nearbyint, round
2013-10-21 08:56:28 -07:00
Dan Luu 3503d0bcd1 Make fn pub for windows compatibility 2013-10-21 07:45:16 -05:00
bors 6e6981c3eb auto merge of #9991 : LeoTestard/rust/asm-feature-gate, r=huonw
Fixes #9882
Note that the actual checking code is inside a if false in order to compile libstd properly.
libstd uses asm! in rt. If we put ```#[feature(asm)]``` in libstd, it fails to build at stage0 beacause the
asm feature is not known yet by the snapshot compiler.
We must wait that this PR arrives into the snapshot in order to actually activate the checking code.
2013-10-21 05:21:27 -07:00
Léo Testard c5346fea38 Add a feature flag for ASM 2013-10-21 14:04:29 +02:00
bors 04ac697f52 auto merge of #9979 : alexcrichton/rust/print-no-alloc, r=huonw
Instead use format_args! to pass around a struct to pass along into std::fmt
2013-10-21 02:26:24 -07:00
Daniel Micay 4533432612 expose new floating point intrinsics
copysign, ring, nearbyint, round
2013-10-21 04:17:03 -04:00
bors cd59a7c464 auto merge of #9976 : thestinger/rust/typo, r=thestinger 2013-10-20 21:11:19 -07:00
Adrien Tétar 22465e9561 doc: fix links to comply with the new rustdoc
Closes #9911.
2013-10-21 04:13:22 +02:00
Adrien Tétar 694b624305 rustdoc: nitpicks & cleanup 2013-10-21 04:13:09 +02:00
Adrien Tétar 3995495c4a doc: expand tutorial/manual CSS
Cleanup, edit, add some Bootstrap v3.0.0 elements.
2013-10-21 04:12:58 +02:00
Adrien Tétar 8d97db48d4 doc: tidy and cleanup CSS deps, add tutorial PDF generation 2013-10-21 04:12:12 +02:00
Dan Luu 47fc24bd8f Use updated local declaration syntax. 2013-10-20 17:54:53 -05:00
Alex Crichton df6225b8c3 Don't allocate a string when calling println
Instead use format_args! to pass around a struct to pass along into std::fmt
2013-10-20 15:42:24 -07:00
Daniel Micay 93b95dd394 fix typo 2013-10-20 15:12:13 -04:00
bors 69860b79b8 auto merge of #9812 : HNO3/rust/windows-utf8, r=alexcrichton
This fixes #9418 and #9618, and potential problems related to directory walking.
2013-10-20 10:31:17 -07:00
bors 424c171da5 auto merge of #9973 : huonw/rust/7580, r=luqmana
Fixed by the privacy changes that allowed the `mod std {}` at the top
level of `std` to be non-`pub`.
2013-10-20 02:26:17 -07:00
Huon Wilson ab045fa797 testsuite: test for fixed issue. Closes #7580.
Fixed by the privacy changes that allowed the `mod std {}` at the top
level of `std` to be non-`pub`.
2013-10-20 20:19:29 +11:00
LEE Wondong 3e53c929a2 Fix unicode errors on Windows in path_is_dir, path_exists, getcwd and rust_localtime.
This make these functions use wchar_t version of APIs, instead of char version.
2013-10-20 15:02:03 +09:00
bors 69e46f3aa9 auto merge of #9956 : sfackler/rust/more-more-visibility, r=alexcrichton 2013-10-19 14:01:10 -07:00
bors 9d047cdead auto merge of #9952 : huonw/rust/fmt-doc, r=alexcrichton
Cf. the concern raised in https://github.com/mozilla/rust/pull/9938#issuecomment-26648696.
2013-10-19 12:11:13 -07:00
Adrien Tétar 5d1fc864c7 doc/rust.HTML: proper version box 2013-10-19 20:31:53 +02:00
Adrien Tétar f69795e443 doc: switch pandoc to html5 2013-10-19 20:29:34 +02:00
bors 310f7a5f52 auto merge of #9949 : Heather/rust/driver-rs-cleanup-pullrequest, r=thestinger 2013-10-19 10:56:15 -07:00
bors 31a209ca42 auto merge of #9834 : alexcrichton/rust/morestack, r=brson
This commit re-introduces the functionality of __morestack in a way that it was
not originally anticipated. Rust does not currently have segmented stacks,
rather just large stack segments. We do not detect when these stack segments are
overrun currently, but this commit leverages __morestack in order to check this.

This commit purges a lot of the old __morestack and stack limit C++
functionality, migrating the necessary chunks to rust. The stack limit is now
entirely maintained in rust, and the "main logic bits" of __morestack are now
also implemented in rust as well.

I put my best effort into validating that this currently builds and runs successfully on osx and linux 32/64 bit, but I was unable to get this working on windows. We never did have unwinding through __morestack frames, and although I tried poking at it for a bit, I was unable to understand why we don't get unwinding right now.

A focus of this commit is to implement as much of the logic in rust as possible. This involved some liberal usage of `no_split_stack` in various locations, along with some use of the `asm!` macro (scary). I modified a bit of C++ to stop calling `record_sp_limit` because this is no longer defined in C++, rather in rust.

Another consequence of this commit is that `thread_local_storage::{get, set}` must both be flagged with `#[rust_stack]`. I've briefly looked at the implementations on osx/linux/windows to ensure that they're pretty small stacks, and I'm pretty sure that they're definitely less than 20K stacks, so we probably don't have a lot to worry about.

Other things worthy of note:
* The default stack size is now 4MB instead of 2MB. This is so that when we request 2MB to call a C function you don't immediately overflow because you have consumed any stack at all.
* `asm!` is actually pretty cool, maybe we could actually define context switching with it?
* I wanted to add links to the internet about all this jazz of storing information in TLS, but I was only able to find a link for the windows implementation. Otherwise my suggestion is just "disassemble on that arch and see what happens"
* I put my best effort forward on arm/mips to tweak __morestack correctly, we have no ability to test this so an extra set of eyes would be useful on these spots.
* This is all really tricky stuff, so I tried to put as many comments as I thought were necessary, but if anything is still unclear (or I completely forgot to take something into account), I'm willing to write more!
2013-10-19 09:46:18 -07:00
Alex Crichton 6d8330afb6 Use __morestack to detect stack overflow
This commit resumes management of the stack boundaries and limits when switching
between tasks. This additionally leverages the __morestack function to run code
on "stack overflow". The current behavior is to abort the process, but this is
probably not the best behavior in the long term (for deails, see the comment I
wrote up in the stack exhaustion routine).
2013-10-19 09:43:31 -07:00
Huon Wilson 759b20da87 std::fmt: fix markdown peculiarity, unicodify some arrows, ` some trait names. 2013-10-19 23:37:50 +11:00
bors 5751794d97 auto merge of #9946 : sfackler/rust/enum-doc, r=alexcrichton
Struct fields with inherited visibility were previously stripped.

Closes #9899
2013-10-19 05:06:17 -07:00
bors 0b1fb461d6 auto merge of #9941 : alexcrichton/rust/rustdoc, r=huonw
Beforehand the id of a method was the id of the 'self' argument, but this is not
the id which privacy was using (the id of the ast::method) struct, so by moving
the ids over to the privacy-target ones the methods are now stripped correctly.
2013-10-19 03:56:19 -07:00
bors 404a4619dc auto merge of #9939 : sinma/rust/doc, r=alexcrichton
Recently, the float type, and the rust and rusti tools have been removed from master.

float replaced by f64 in code examples, removed mentions of float, f suffix, rust and rusti in explanations.

(+ some stupid things like rust -> Rust)
2013-10-19 02:46:25 -07:00
Sébastien Chauvel 62cb92d4ea doc (en & ja): remove mentions of type float, rust and rusti tools 2013-10-20 01:00:22 +02:00
Heather 8c5f584567 remove rust and rusti from driver.rs 2013-10-19 13:31:39 +04:00
bors 8f2480420e auto merge of #9932 : alexcrichton/rust/better-fmt-errors, r=cmr
Instead of just saying "unterminated format string" and friends, instead print
information about what was expected and what was found.

Closes #9931
2013-10-19 01:31:21 -07:00
Steven Fackler c18afcd83a Check unnecessary visibility for struct variants 2013-10-18 22:44:11 -07:00
Steven Fackler 590b50f71a Fix struct field visibility and add enum field doc
Struct fields with inherited visibility were previously stripped.

Closes #9899
2013-10-18 22:03:14 -07:00
Alex Crichton a447c3ca16 Try to improve format! error messages
Instead of just saying "unterminated format string" and friends, instead print
information about what was expected and what was found.

Closes #9931
2013-10-18 21:28:00 -07:00
bors 34a1e3dc9a auto merge of #9938 : alexcrichton/rust/fmtdox, r=huonw
Closes #9865
Closes #9808
2013-10-18 21:21:22 -07:00
bors 3a7337ff17 auto merge of #9437 : catamorphism/rust/rustpkg-dates, r=alexcrichton
r? @alexcrichton On most platforms, the time granularity is 1 sec or more, so comparing
dates in tests that check whether rebuilding did or didn't happen leads
to spurious failures. Instead, test the same thing by making an output
file read-only and trapping attempts to write to it.
2013-10-18 19:36:22 -07:00
Tim Chevalier e779313b07 rustpkg: invoke touch with a portable set of args 2013-10-18 18:36:27 -07:00
Tim Chevalier 4dbef017dd rustc: Check that the output file is writeable before linking
This is because on Linux, the linker will silently overwrite
a read-only file.
2013-10-18 18:36:23 -07:00
Tim Chevalier 1cf029c229 rustpkg: Make rustpkg tests stop comparing dates
Instead of scrutinizing modification times in rustpkg tests,
change output files to be read-only and detect attempts to write
to them (hack suggested by Jack). This avoids time granularity problems.

As part of this change, I discovered that some dependencies weren't
getting written correctly (involving built executables and library
files), so this patch fixes that too.

This partly addresses #9441, but one test (test_rebuild_when_needed)
is still ignored on Linux.
2013-10-18 18:36:17 -07:00
bors cd623e3e36 auto merge of #9919 : alexcrichton/rust/fmt-begone, r=huonw
It lived a good life, but its time has come. The groundwork is set for the
official transition after the next snapshot (removal of XXX2 macros)
2013-10-18 18:26:23 -07:00