Commit Graph

24402 Commits

Author SHA1 Message Date
bors
9b9cf9892b auto merge of #10701 : huonw/rust/rm-from_utf8, r=brson
This function had type &[u8] -> ~str, i.e. it allocates a string
internally, even though the non-allocating version that take &[u8] ->
&str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-12-04 11:32:23 -08:00
Guillaume Pinot
e76e83cb10 rewrite of shootout-reverse-complement.rs
This version is inspired by the best version in C by Mr Ledrug,
but without the parallelisation.
2013-12-04 18:15:53 +01:00
Alex Crichton
e0264ff192 Don't dup the stdio file descriptors.
This is just an implementation detail of using libuv, so move the libuv-specific
logic into librustuv.
2013-12-04 08:51:47 -08:00
bors
5fa6bd526e auto merge of #10788 : alexcrichton/rust/fixes, r=pcwalton
I used the wrong condition where I was looking for "is this method public or is
this implementation a trait" rather than what was being checked.
2013-12-04 08:12:11 -08:00
Volker Mische
30a9c6e490 Decode a float into integers
The `integer_decode()` function decodes a float (f32/f64)
into integers containing the mantissa, exponent and sign.

It's needed for `rationalize()` implementation of #9838.

The code got ported from ABCL [1].

[1] http://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/FloatFunctions.java?rev=14465#L94
2013-12-04 16:11:39 +01:00
bors
91695797c2 auto merge of #10794 : alexcrichton/rust/issue-10790, r=alexcrichton
Note entirely sure how this is passing at all today, but regardless this fixes
the problems seen in #10790 

Closes #10790
2013-12-04 05:26:35 -08:00
bors
1191ae87db auto merge of #10793 : chris-morgan/rust/2013-12-04-vim-updates, r=Aatch
- Implement comment nesting (the implementation is quite ugly at present
  and is not quite correct; note the big comment in that area).

- Highlight invalid escape sequences as errors.

- Fix up various inconsistencies and incorrectnesses in number
  highlighting.

- Update prelude items (``std::io::{Buffer, Writer, Reader, Seek}``).

- Highlight the ``proc`` keyword.

- Remove %-formatting sequence highlighting (a relic of old formatting).

- Don't highlight TODO in strings (it's unconventional).
2013-12-04 04:11:26 -08:00
Huon Wilson
b0426edc0a std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter. 2013-12-04 22:35:53 +11:00
Huon Wilson
9d64e46013 std::str: remove from_utf8.
This function had type &[u8] -> ~str, i.e. it allocates a string
internally, even though the non-allocating version that take &[u8] ->
&str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-12-04 22:35:53 +11:00
S Pradeep Kumar
48b289fec4 Add Imenu support for rust-mode.
+ Delete trailing whitespace.
2013-12-04 19:04:47 +09:00
bors
9635c763ba auto merge of #10783 : sfackler/rust/drop, r=alexcrichton
It's a more fitting name for the most common use case of this function.
2013-12-04 01:36:29 -08:00
bors
63c9522c27 auto merge of #10776 : alexcrichton/rust/issue-9725, r=pcwalton
Closes #9725
2013-12-03 23:56:25 -08:00
bors
c22f6d8d44 auto merge of #10785 : alexcrichton/rust/omg-i-hate-windows, r=pcwalton
Turns out LLVM only builds libfoo.a libraries, so we're going to need this logic
to statically link librustc
2013-12-03 21:11:26 -08:00
Steven Fackler
a243360401 Move std::util::ignore to std::prelude::drop
It's a more fitting name for the most common use case of this function.
2013-12-03 20:40:38 -08:00
Alex Crichton
0cd79ee18a Don't infinitely recurse in a process test
Note entirely sure how this is passing at all today, but regardless this fixes
the problems seen in #10790
2013-12-03 19:17:45 -08:00
bors
50e9d4f889 auto merge of #10752 : dhodder/rust/master, r=pcwalton 2013-12-03 18:31:36 -08:00
Chris Morgan
c9eed5742e Improve various Vim syntax highlighting things.
- Implement comment nesting (the implementation is quite ugly at present
  and is not quite correct; note the big comment in that area).

- Highlight invalid escape sequences as errors.

- Fix up various inconsistencies and incorrectnesses in number
  highlighting.

- Update prelude items (``std::io::{Buffer, Writer, Reader, Seek}``).

- Highlight the ``proc`` keyword.

- Remove %-formatting sequence highlighting (a relic of old formatting).

- Don't highlight TODO in strings (it's unconventional).
2013-12-04 12:41:56 +11:00
Kevin Ballard
c00837e90a Fix the comments for libsyntax::parse::parser::parse_sugary_call_expr
The comments on this function date back from when it was used for `for`
expressions in addition to `do` expressions.
2013-12-03 16:55:00 -08:00
Niko Matsakis
23d95f6dc6 Make trait lifetime parameters early bound in static fn type. This is related
to #5121.

Fixes #10391.
2013-12-03 18:17:37 -05:00
Alex Crichton
7a2415f0e4 Fix a bug in exporting trait implementations
I used the wrong condition where I was looking for "is this method public or is
this implementation a trait" rather than what was being checked.
2013-12-03 15:15:17 -08:00
bors
693ec73b9b auto merge of #10747 : alexcrichton/rust/snapshots, r=cmr
This registers new snapshots after the landing of #10528, and then goes on to tweak the build process to build a monolithic `rustc` binary for use in future snapshots. This mainly involved dropping the dynamic dependency on `librustllvm`, so that's now built as a static library (with a dynamically generated rust file listing LLVM dependencies).

This currently doesn't actually make the snapshot any smaller (24MB => 23MB), but I noticed that the executable has 11MB of metadata so once progress is made on #10740 we should have a much smaller snapshot.

There's not really a super-compelling reason to distribute just a binary because we have all the infrastructure for dealing with a directory structure, but to me it seems "more correct" that a snapshot compiler is just a `rustc` binary.
2013-12-03 14:36:59 -08:00
Alex Crichton
acc5e32e53 Register new snapshots 2013-12-03 14:31:54 -08:00
Niko Matsakis
22f14fb27f Issue #9629 -- permit freezing &mut found within an & pointer 2013-12-03 17:26:51 -05:00
bors
69186efc19 auto merge of #10768 : Blei/rust/logging-enabled-macros, r=alexcrichton
This is useful when the information that is needed to do useful logging
is expensive to produce.
2013-12-03 12:11:25 -08:00
bors
899217c11b auto merge of #10757 : TeXitoi/rust/mut-split-iter, r=alexcrichton
I've renamed `MutableVector::mut_split(at)` to `MutableVector::mut_split_at(at)` to be coherent with ImmutableVector.  As specified in the commit log, The `size_hint` method is not optimal because of #9629.
2013-12-03 10:11:25 -08:00
Alex Crichton
cb823b09df Search for libfoo.a on windows as well as foo.lib
Turns out LLVM only builds libfoo.a libraries, so we're going to need this logic
to statically link librustc
2013-12-03 08:59:09 -08:00
Guillaume Pinot
44fc3c6ea8 add MutableVector::mut_split(self, pred) -> DoubleEndedIterator<&mut [T]>
This method is the mutable version of ImmutableVector::split.  It is
a DoubleEndedIterator, making mut_rsplit irrelevent.  The size_hint
method is not optimal because of #9629.

At the same time, clarify *split* iterator doc.
2013-12-03 17:31:15 +01:00
bors
e2d192c9f4 auto merge of #10777 : alexcrichton/rust/issue-10743, r=luqmana
Commit messages have the fun details, the focus of this is closing #10743 though
2013-12-03 08:21:26 -08:00
Alex Crichton
0dc9f62779 Resume propagation of linking to native dylibs
The reasons for this are outlined in issue #10743 as well as the comment I have
now placed in the code.

Closes #10743
2013-12-03 08:19:33 -08:00
Alex Crichton
6437122e64 Tidy up a few problems with run-make tests
Use the correct set of dependencies as well as CFG_PYTHON instead of assuming
'python' is the right one.
2013-12-03 08:13:00 -08:00
Alex Crichton
2bd80758a2 Continue tightening holes in reachability
* Don't flag any address_insignificant statics as reachable because the whole
  point of the address_insignificant optimization is that the static is not
  reachable. Additionally, there's no need for it to be reachable because LLVM
  optimizes it away.

* Be sure to not leak external node ids into our reachable set, this can
  spuriously cause local items to be considered reachable if the node ids just
  happen to line up
2013-12-03 08:13:00 -08:00
bors
6a9db409e5 auto merge of #10782 : alexcrichton/rust/rustdoc-lib, r=thestinger
This makes sure that when generating documentation we don't waste time doing
things like looking for a main function.
2013-12-03 01:51:26 -08:00
bors
f1ef36ea2f auto merge of #10773 : jvns/rust/patch-1, r=cmr
The section on closure types was missing, so I added one. I'm new to Rust, so there are probably important things to say about closure types that I'm missing here.

I tested the example with the latest Rust nightly.
2013-12-02 23:32:33 -08:00
Philipp Brüschweiler
a68917190b Add test to check for debug logging disabled at compile time 2013-12-03 07:44:46 +01:00
bors
18084be316 auto merge of #10772 : alexcrichton/rust/issue-3053, r=alexcrichton
Rebasing #10446 with a `pub fn main`
2013-12-02 21:32:38 -08:00
Alex Crichton
6600ba97c3 rustdoc: Tell rustc we're building a library
This makes sure that when generating documentation we don't waste time doing
things like looking for a main function.
2013-12-02 21:26:40 -08:00
bors
fc3b7c1450 auto merge of #10770 : alexcrichton/rust/static-librustrt, r=alexcrichton
This wasn't uncovered during testing because the librustrt is available locally
in the build directory (and it needs to be for all the tests to link against it
as well).

Closes #10765
2013-12-02 20:16:51 -08:00
bors
8cb59d3868 auto merge of #10771 : pnkfelix/rust/fix-make-check-for-ccacheless-clang, r=acrichto
This fixes a problem with `make check` clang -Werror failing due to an unused -Llib arg.
2013-12-02 19:02:07 -08:00
bors
3a3ffab69b auto merge of #10759 : SiegeLord/rust/placeholder, r=cmr
This makes the search bar more visible.
2013-12-02 17:31:42 -08:00
bors
0e66baf013 auto merge of #10736 : Blei/rust/fix_c_vec, r=alexcrichton
Controversial change: make the constructors safe, but instead mark the
setters and getters as unsafe. This follows the tradition that construction
of *T is safe, but the access is unsafe instead.
2013-12-02 16:06:40 -08:00
Alex Crichton
80055dee3a Disallow duplicate bindings of struct fields
Closes #9725
2013-12-02 14:20:27 -08:00
bors
c8b60a2d9e auto merge of #10742 : alexcrichton/rust/frameworks, r=cmr
Commits have the fun details, and scrutiny on the new documentation would be appreciated!
2013-12-02 13:36:41 -08:00
Philipp Brüschweiler
870fb7d75c c_vec: Modernize
Generally use more modern constructs (such as using `CVec::new()` as
constructor and move to more method usage).

Potentially controversial changes:
* change `get()` to return a reference instead of cloning
* remove `set()`, add `get_mut()` instead
* add an `unwrap()` method that destroys the CVec without running any
  associated destructor
2013-12-02 21:53:23 +01:00
Philipp Brüschweiler
a75f72d45a Add a macro to check if logging at a given label is enabled
This is useful when the information that is needed to do useful logging
is expensive to produce.
2013-12-02 21:47:57 +01:00
bors
fc4540d23e auto merge of #10728 : sanxiyn/rust/proc, r=cmr
Fix #10718.
2013-12-02 12:21:32 -08:00
Julia Evans
94c02af873 Add section on closure types to manual 2013-12-02 14:39:11 -05:00
Alex Crichton
d4c40b519b Bring the linkage documentation up-to-date
This includes documentation for all the previous changes done to linking
in #10582. Additionally, this brings the list of feature-gates up-to-date with
the currently recognized list of features.
2013-12-02 11:10:40 -08:00
Niko Matsakis
7067561189 Add test for #3053. Fixes #3053. 2013-12-02 10:33:17 -08:00
Felix S. Klock II
5e00d5c790 Make the ccache-free case look like the ccache case.
This fixes a problem with `make check` clang -Werror failing due to an
unused -Llib arg.
2013-12-02 19:25:14 +01:00
Alex Crichton
837a770b21 Declare librustrt a static dependency of libextra
This wasn't uncovered during testing because the librustrt is available locally
in the build directory (and it needs to be for all the tests to link against it
as well).

Closes #10765
2013-12-02 09:39:02 -08:00