Commit Graph

22888 Commits

Author SHA1 Message Date
Alex Crichton
fb259855dc rustdoc: Use a BufferedWriter when emitting source
This takes the rendering time of source files for libstd from 12.5s to 0.1s,
turns out write! calls the write function *a lot*
2013-09-30 20:31:20 -07:00
Alex Crichton
cc1791584f rustdoc: Detect repeated keys and fix width
When a key is pressed and held, this now does the OS-style repeating after a bit
of a pause. Also fixes the width of search results to be correct (was changed
beforehand and didn't catch this).
2013-09-30 20:31:19 -07:00
Alex Crichton
863555f4fd rustdoc: Update the man page
Closes #9622
2013-09-30 20:31:19 -07:00
Alex Crichton
e523f99fb9 rustdoc: Add the ability to input json
This modifies the command-line usage of rustdoc to intake its own JSON output as
well as a rust source file. This also alters the command line from
`rustdoc input file`  to `rustdoc file` with the input/output formats specified
as -r and -w, respectively.

When using a JSON input, no passes or plugins are re-run over the json, instead
the output is generated directly from the JSON that was provided. Passes and
plugins are still run on rust source input, however.
2013-09-30 20:31:19 -07:00
Jyun-Yan You
350b5438cd add -Z soft-float option
This change adds -Z soft-float option for generating
software floating point library calls.
It also implies using soft float ABI, that is the same as llc.

It is useful for targets that have no FPU.
2013-10-01 11:19:18 +08:00
Alex Crichton
23cb72b459 Clarify format! implicit positional references
It was a little ambiguous before how explicitl positional parameters and
implicit positional parameters intermingled, and this clarifies how the two
intermingle. This also updates a little bit of documentation/code examples
elsewhere as well.
2013-09-30 20:16:23 -07:00
David Creswick
4dd3ccb7ef Add test for issue #9446. 2013-09-30 22:39:53 -04:00
Felix S. Klock II
155857f548 Revise error message to use phrase "all caps" instead of "uppercase".
This is to clarify that the lint is checking for THIS_THING and not This.
2013-10-01 03:10:19 +02:00
Felix S. Klock II
8d6f4c207a Workaround conflict between all-uppercase static and NaN definition. 2013-10-01 02:55:51 +02:00
bors
bc6dd906a9 auto merge of #9640 : catamorphism/rust/rustpkg-test-fix, r=alexcrichton
r? @alexcrichton test output may contain color codes, so check for several small strings
instead of one big one.
2013-09-30 17:46:25 -07:00
Tim Chevalier
2ec2d7dd23 rustpkg: Make test_rustpkg_test_output more permissive
test output may contain color codes, so check for several small strings
instead of one big one.
2013-09-30 17:35:47 -07:00
Felix S. Klock II
e2be7aca08 Expanded test to clarify that the constants *are* matching when they should. 2013-10-01 02:03:43 +02:00
Felix S. Klock II
c0599b1bbb Fix typo in comment. 2013-10-01 01:55:37 +02:00
Felix S. Klock II
924674202e Throwing in another interesting test case: There is no need to warn
about constants that are (non-trivial) paths rather than just
identifiers, regardless of what case their characters are.
2013-10-01 01:51:21 +02:00
Felix S. Klock II
a076fef2b6 Add new lint: non_uppercase_pattern_statics, for #7526.
This tries to warn about code like:
    ```rust
    match (0,0) {
        (0, aha) => { ... },
        ...
    }
    ```
where `aha` is actually a static constant, not a binding.
2013-10-01 01:44:25 +02:00
Daniel Micay
11b7109b7b rm only use of type_is_immediate outside of trans 2013-09-30 18:16:35 -04:00
bors
7ddcd2a745 auto merge of #9628 : alexcrichton/rust/tidy-binaries, r=thestinger
Closes #9621
2013-09-30 15:06:23 -07:00
bors
5c016857b7 auto merge of #9635 : catamorphism/rust/issue-7999, r=catamorphism
Closes #7999
2013-09-30 13:36:32 -07:00
Tim Chevalier
60eb04aea9 testsuite: Un-xfail unit-like-struct-drop-run on Windows
Closes #7999
2013-09-30 13:30:19 -07:00
Alex Crichton
a3ccbdc904 rustdoc: Generate valid code for struct-variants
Closes #9587
2013-09-30 12:32:04 -07:00
bors
5011bbfbb6 auto merge of #9630 : blake2-ppc/rust/de-at-smaller, r=huonw
This is mostly an incremental change, picking off some uses of
@- or @mut-pointers that can be replaced by references.

Almost all of the builder functions in trans::build are updated,
mostly using `&Block` arguments instead of `@mut Block`.
2013-09-30 10:41:20 -07:00
blake2-ppc
f4d8d8c122 trans::build: Change @mut Block to &Block or &mut Block
Use &mut Block and &Block references where possible in the builder
functions in trans::build.

@mut Block remains in a few functions where I could not (not yet at
least) track down the runtime borrowck failures.
2013-09-30 19:37:22 +02:00
blake2-ppc
b88517ec93 trans: Change @ast::Pat and @mut CrateContext in a few places
Use borrowed references in a few locations that were encountered when
working on other changes.
2013-09-30 19:37:17 +02:00
blake2-ppc
948b5ab87a trans: Change @ast::Expr -> &ast::Expr where possible 2013-09-30 19:37:17 +02:00
Alex Crichton
d29b3ac8a7 Expand tidy to prevent binaries from being checked
Closes #9621
2013-09-30 10:15:47 -07:00
bors
8174618a05 auto merge of #9619 : toffaletti/rust/mmap, r=huonw 2013-09-30 05:01:23 -07:00
bors
aafad43ae9 auto merge of #9616 : klutzy/rust/win32-uv-test, r=huonw
Closes #8815.
2013-09-30 03:41:19 -07:00
bors
ca2d5965d1 auto merge of #9614 : blake2-ppc/rust/lang-item-iter, r=alexcrichton
Cleanup in middle::lang_items

Use static string keys in the lang item hashmap, and convert
the traversal function to be an iterator.
2013-09-30 01:56:23 -07:00
Jason Toffaletti
b617569583 reduce heap allocations for MemoryMap 2013-09-29 23:05:40 -07:00
klutzy
f4f6b951d7 std::rt::uv::net: Enable tests on Win32
Closes #8815.
2013-09-30 13:56:55 +09:00
blake2-ppc
abcca1c7d1 rustc: Convert lang_item to use an iterator 2013-09-30 05:13:04 +02:00
blake2-ppc
8e69c05b7c rustc: Convert lang_items hashmap to use &'static str keys 2013-09-30 05:13:04 +02:00
bors
80b6056f5d auto merge of #9612 : alexcrichton/rust/rc-crate2, r=huonw
This patch exposes actual ownership of an `ast::Crate` structure so it's not implicitly copied and reference counted via `@`.

The main purpose for this patch was to get rid of the massive spike in memory during the start of the compiler (this can be seen on isrustfastyet). The reason that this spike exists is that during `phase_2` we're creating many copies of the crate by folding. Because these are reference counted, all instances of the old crates aren't dropped until the end of the function, which is why so much memory is accumulated.

This patch exposes true ownership of the crate, meaning that it will be destroyed ASAP when requested. There are no code changes except for dealing with actual ownership of the crate. The large spike is then avoided: http://i.imgur.com/IO3NENy.png

This shouldn't help our overall memory usage (that still is the highest at the end), but if we ever manage to bring that down it should help us not have a 1GB spike at the beginning of compilation.

(This was to un-stuck bors (hopefully).)
2013-09-29 20:06:13 -07:00
bors
0fd8cb07c1 auto merge of #9609 : alexcrichton/rust/fix-logging-newline, r=catamorphism
Forgot to do this when I was refactoring logging :(
2013-09-29 17:56:13 -07:00
Alex Crichton
7b18976f08 Remove all usage of @ast::Crate 2013-09-29 16:21:25 -07:00
Alex Crichton
22ef7e72f4 Require &Crate instead of @Crate
This help enable some later refactorings.
2013-09-29 16:21:25 -07:00
bors
727d4c306c auto merge of #9603 : sfackler/rust/rustpkg-test, r=catamorphism
Previously, if tests failed, you'd only get stderr which isn't very
useful, especially if the failure didn't happen directly in a test
function (e.g None.unwrap()).
2013-09-29 16:21:13 -07:00
Alex Crichton
c687f6fa92 Put a newline after each logging message 2013-09-29 12:39:49 -07:00
Steven Fackler
c685e0879c Don't redirect output in rustpkg test
Previously, if tests failed, you'd only get stderr which isn't very
useful, especially if the failure didn't happen directly in a test
function (e.g None.unwrap()).
2013-09-28 22:12:24 -07:00
bors
9883a6250b auto merge of #9589 : thestinger/rust/tutorial, r=alexcrichton 2013-09-28 16:21:04 -07:00
bors
92e7bb67a8 auto merge of #9542 : pnkfelix/rust/fsk-fix-issue-9531, r=thestinger
r? strcat 

(please double check that it fixes things on your chroot, if possible, before approval)

Fix #9531
2013-09-28 15:01:38 -07:00
Micah Chalmer
5d24a1ae45 Fix single-line-style paragraph fills with code immediately before or after 2013-09-28 17:40:24 -04:00
Daniel Micay
6c8e6aad73 tutorial: rewrite the sections on boxes/moves 2013-09-28 17:01:46 -04:00
bors
9cc11ca6a3 auto merge of #9577 : alexcrichton/rust/rustdoc, r=cmr
They're getting smaller each time though!

The highlight of this round is source files in documentation. Still trying to figure out the best syntax-highlighting solution.
2013-09-28 13:46:11 -07:00
Alex Crichton
88866a4c20 rustdoc: Show type parameters on external paths
This removes the internal type representation of an `External` type and instead
relies on passing around DefId structures and interpreting them accordingly.

Progress on #9539, but there's still the problem of a crate => url mapping.
2013-09-28 13:43:43 -07:00
bors
c635fba748 auto merge of #9583 : blake2-ppc/rust/connect-vec, r=huonw
std::vec: Sane implementations for connect_vec and concat_vec

Avoid unnecessary copying of subvectors, and calculate the needed space
beforehand. These implementations are simple but better than the
previous.

Also only implement it once, for all `Vector<T>` using:

    impl<'self, T: Clone, V: Vector<T>> VectorVector<T> for &'self [V]

Closes #9581
2013-09-28 07:31:02 -07:00
bors
058a5d97a2 auto merge of #9459 : eliovir/rust/patch-1, r=bstrie
change formula (other solution could be using abs()).
2013-09-28 05:26:04 -07:00
bors
4d81e38512 auto merge of #9574 : FlaPer87/rust/suppress_warnings, r=metajack
Small change that suppresses a warning because of an unused import.
2013-09-27 23:51:03 -07:00
bors
c151d371fc auto merge of #9562 : alexcrichton/rust/snapshots, r=thestinger 2013-09-27 21:56:04 -07:00
blake2-ppc
3709aa78d8 std::vec: Remove functions concat, connect
std::vec::{concat, connect, concat_slices, connect_slices} are replaced
by the already existing trait methods .concat_vec() and .connect_vec().
2013-09-28 05:56:49 +02:00