Commit graph

18556 commits

Author SHA1 Message Date
Ben Blum
5113f68a86 Add simple tests for Sized 2013-05-30 21:41:41 -04:00
Ben Blum
32cd9b3274 Highlight Sized in vim and kate 2013-05-30 21:41:41 -04:00
Ben Blum
b8a53b5a4c Add 'Sized' builtin kind; doesn't do anything yet 2013-05-30 21:41:41 -04:00
bors
237dce12c9 auto merge of #6689 : graydon/rust/issue-5661-doc-test-targets, r=graydon
Re-enables `make check-stage2-doc-tutorial` and friends. r? @brson
2013-05-30 17:22:49 -07:00
bors
308774e05b auto merge of #6340 : graydon/rust/issue-2994, r=graydon 2013-05-30 16:04:47 -07:00
Graydon Hoare
858ca2e3c8 fix the check-stageN-doc-$doc targets, close #5661 2013-05-30 15:49:53 -07:00
bors
9bfe296eb7 auto merge of #6836 : pnkfelix/rust/fsk-issue6805-ccache-rewrite-basedir, r=catamorphism
Attempt to get reuse of common object code from multiple clones in different directories.

This is a followup to issue #6805.
2013-05-30 14:58:47 -07:00
Graydon Hoare
2bed5dc528 rustc: change 'use' to 'add' in error message, fix #2994 2013-05-30 13:45:53 -07:00
bors
784a8495d2 auto merge of #6835 : cmr/rust/clang, r=thestinger
current svn version is 3.4
2013-05-30 12:41:09 -07:00
bors
a39429887a auto merge of #6831 : Xazax-hun/rust/incoming, r=graydon
Minor doc enhancement for: https://github.com/mozilla/rust/issues/4543
2013-05-30 10:37:46 -07:00
Corey Richardson
594f40ecbe bump clang version 2013-05-30 13:33:52 -04:00
Felix S. Klock II
7f410b326c Attempt to get reuse of common code from multiple clones in different directories. 2013-05-30 16:26:12 +02:00
Gábor Horváth
0d9ea4e2d1 Minor grammar fix. 2013-05-30 15:26:25 +02:00
Gábor Horváth
9fd18a93b7 Minor style fix. 2013-05-30 15:24:08 +02:00
Gábor Horváth
e583d5a6b6 Minor documentation addition. 2013-05-30 15:20:30 +02:00
bors
682afcac52 auto merge of #6829 : dotdash/rust/allocs, r=sanxiyn 2013-05-30 04:49:37 -07:00
Björn Steinbrink
1720d9f663 Remove a bunch of unnecessary allocations and copies 2013-05-30 11:49:04 +02:00
bors
ca74cbdc5c auto merge of #6798 : alexcrichton/rust/doc-lints, r=pcwalton
These commits perform a variety of actions:

1. The linting of missing documentation has been consolidated under one `missing_doc` attribute, and many more things are linted about.
2. A test was added for linting missing documentation, which revealed a large number of corner cases in both linting and the `missing_doc` lint pass. Some notable edge cases:
  * When compiling with `--test`, all `missing_doc` warnings are suppressed
  * If any parent of the current item has `#[doc(hidden)]`, then the `missing_doc` warning is suppressed
3. Both the std and extra libraries were modified to `#[deny(missing_doc)]` by default.

I believe that the libraries are getting to the point where they're fairly well documented, and they should definitely stay that way. If developing a particular new module, it's easy enough to add `#[allow(missing_doc)]` at the top, but those should definitely be flags for removal in favor of actual documentation.

I added as much documentation as I could throughout std/extra, although I avoided trying to document things that I knew nothing about. I can't say that this lint pass will vouch for the quality of the documentation of std/extra, but it will certainly make sure that there's at least some describing words.

That being said, I may have a different opinion, so I don't mind amending these commits to turn off the lint by default for std/extra if people think otherwise.
2013-05-30 00:37:35 -07:00
Alex Crichton
395685079a libextra: Require documentation by default 2013-05-30 01:03:15 -05:00
Alex Crichton
007651cd26 Require documentation by default for libstd
Adds documentation for various things that I understand.
Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-30 01:02:55 -05:00
Alex Crichton
4a5d887b58 Allow doc(hidden) and --test to disable doc linting 2013-05-30 01:02:55 -05:00
Alex Crichton
af995ce1e7 Make missing documentation linting more robust
Add some more cases for warning about missing documentation, and also add a test
to make sure it doesn't die in the future.
2013-05-30 01:02:55 -05:00
bors
31b2804fda auto merge of #6825 : caitp/rust/issue-6824, r=Aatch
Show `int_suffix_size` to appear 0 or 1 times
Show `exponent | . dec_lit` to appear 0 or 1 times, to show why `3f;` is a valid number
2013-05-29 22:58:35 -07:00
James Miller
3a3bf8bdef Remove all of the #[inline(always)] attributes from bigint 2013-05-29 22:21:55 -07:00
Patrick Walton
e67bfabbf7 etc: Fix more check-fast breakage. rs=burningtree 2013-05-29 22:17:21 -07:00
Caitlin Potter
bfe141c4e1 Fixes #6824 - Correct scan_number() grammar
Show `int_suffix_size` to appear 0 or 1 times
Show `exponent | . dec_lit` to appear 0 or 1 times, to show why `3f;` is a valid number
2013-05-30 00:51:16 -04:00
Patrick Walton
5fa788415f test: Fix problem with check-fast. rs=burningtree 2013-05-29 21:21:33 -07:00
Erick Tryzelaar
b916e65f3e librustc: add some imports to back/passes.rs rs=burningtree 2013-05-29 20:00:43 -07:00
Patrick Walton
206ab89629 librustc: Stop reexporting the standard modules from prelude. 2013-05-29 19:04:53 -07:00
Patrick Walton
4e3d4b36dc libsyntax: Stop parsing mutable fields 2013-05-29 19:04:51 -07:00
Patrick Walton
481d4ca43f libsyntax: Make drop no longer a keyword 2013-05-29 19:04:50 -07:00
Patrick Walton
aeda178011 librustc: Redo the unsafe checker and make unsafe methods not callable from safe code 2013-05-29 19:04:50 -07:00
bors
b5da389d36 auto merge of #6799 : Aatch/rust/pass-refactor, r=graydon
This refactors pass handling to use the argument names, so it can be used
in a similar manner to `opt`. This may be slightly less efficient than the
previous version, but it is much easier to maintain.

It also adds in the ability to specify a custom pipeline on the command
line, this overrides the normal passes, however. This should completely
close #2396.
2013-05-29 16:58:44 -07:00
bors
bd30285c84 auto merge of #6813 : pnkfelix/rust/fsk-issue-6805-ccache-support, r=catamorphism
Fix #6805: add --enable-ccache configure option to prefix compiler invocations with `ccache` to attempt to reuse common results, e.g. for LLVM (re)builds.

The information at developer [Note-ccache](../../wiki/Note-ccache) and at [ccache and clang concerns](http://petereisentraut.blogspot.fr/2011/09/ccache-and-clang-part-2.html) were what drove my introduction of the `-Qunused-arguments` and `CCACHE_CPP2` options.  (Though I did confirm first-hand that at least the first really is necessary.)

Yes, one certainly can re-route how `gcc` and `clang` are resolved in one's PATH and use that as a way to invoke `ccache`.  But I personally do not want to introduce that change to my own PATH, and this seems like a small enough change that it does not hurt to add it, at least for now.  (I don't know what form it would take when we move over to `rustpkg`.)
2013-05-29 15:10:42 -07:00
Felix S. Klock II
2b083373e4 Fix #6805: add --enable-ccache configure option to prefix compiler invocations with ccache to attempt to reuse common results, e.g. for LLVM (re)builds. 2013-05-29 23:18:09 +02:00
bors
35655a0fb3 auto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brson
Calls to the libc versions of fmin and fmax were relatively slow (perhaps because they could not be inlined?). This pull request provides f32 and f64 with fmin and fmax written in Rust, and shows a significant speed increase on my system; I used https://github.com/thiez/rustray as my benchmark, with --opt-level 3 it brings the ray-tracing time down from 10.8 seconds to about 9.2, which seemed significant to me.

r?
2013-05-29 13:29:06 -07:00
bors
d2957091c4 auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)
2013-05-29 12:13:49 -07:00
Matthijs Hofstra
3141acf674 Changed to a more efficient implementation. 2013-05-29 20:21:04 +02:00
bors
562069c12f auto merge of #6800 : june0cho/rust/issue5984, r=pcwalton
Fix #5984.
Resolve the problem which exists in #6780.
2013-05-29 10:55:53 -07:00
Matthijs Hofstra
6cc9a26a2d Replaced calls to external fmin/fmax by a Rust implementation. 2013-05-29 18:26:50 +02:00
bors
a037fa4da3 auto merge of #6796 : sfackler/rust/FromBase64-type-fix, r=bstrie
Previously, FromBase64 was only implemented on ~[u8] and ~str when
any pointer would do. The implementations of FromBase64 are now
consistent with the implementations of ToBase64.
2013-05-29 08:49:53 -07:00
bors
844b5cff36 auto merge of #6794 : thestinger/rust/align_zero, r=pcwalton
This is unlikely to alter optimized codegen much but there's no point in downgrading the known alignment to 1.
2013-05-29 07:32:06 -07:00
James Miller
faf1afee16 Further refactor optimization pass handling
This refactors pass handling to use the argument names, so it can be used
in a similar manner to `opt`. This may be slightly less efficient than the
previous version, but it is much easier to maintain.

It also adds in the ability to specify a custom pipeline on the command
line, this overrides the normal passes, however. This should completely
close #2396.
2013-05-29 20:08:20 +12:00
bors
e3e55c5c04 auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch 2013-05-29 00:52:47 -07:00
bors
149960e0cf auto merge of #6789 : luqmana/rust/compiletest-fix, r=thestinger
Can be removed after a snapshot I believe.
2013-05-28 23:34:48 -07:00
june0cho
14d59af0a3 Fix vec::mut_slice 2013-05-29 15:04:34 +09:00
bors
d80642b519 auto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwalton
Move the computation of what data is moved out of `liveness` and into `borrowck`. The resulting code is cleaner, since before we had a split distribution of responsibilities, and also this avoids having multiple implementations of the dataflow code. Liveness is still used to report warnings about useless writes. This will go away when we get the control-flow graph code landed (working on that).

Also adds borrow checker documentation.

Fixes #4384.
Required to support once fns and to properly fix closures (#2202).
First step to generalize our treatment of moves somewhat as well.
2013-05-28 22:16:50 -07:00
bors
e946b4fa3f auto merge of #6778 : Aatch/rust/pass-refactor, r=graydon
Refactor the optimization passes to explicitly use the passes. This commit just re-implements the same passes as were already being run.

It also adds an option (behind `-Z`) to run the LLVM lint pass on the unoptimized IR.

This should close #2812. It is also the first step towards #2396

----------------

This is pretty much just an initial "get it out there" PR. With finer control over the optimization passes coming later. I also just blindly copied the passes we were already doing, so there could almost certainly be some more work in paring it down.

The other thing is the addition of the `mergefunctions` pass, which is currently enabled at `--opt-level=3` and does have a small impact on the code size. However the fact that it is at the end of the optimization pipeline is probably not ideal, so some more experimentation is in order.
2013-05-28 21:01:53 -07:00
James Miller
4ad0b8ac58 Remove extraneous defs from export file 2013-05-29 15:15:42 +12:00
bors
e0d6486ed6 auto merge of #6780 : june0cho/rust/issue5984, r=brson
Fix #5984. Also, I found a problem on type inference and left a comment.
2013-05-28 19:58:52 -07:00