Commit Graph

27137 Commits

Author SHA1 Message Date
bors
e1681df892 auto merge of #12759 : lucab/rust/char-doc, r=alexcrichton
This is mostly a reaction to #12730. If we are going to keep calling them `char`, at least make it clear that they aren't characters but codepoint/scalar.
2014-03-08 17:31:57 -08:00
bors
0017056105 auto merge of #12768 : pnkfelix/rust/fsk-devecing, r=pnkfelix
Change `~[T]` to Vec<T> in librustc.  Rebased and amended version of PR #12716.

Original author (or perhaps I should say meta-author) was @pcwalton, as is reflected in the commits.

I clean up!  :)
2014-03-08 13:01:55 -08:00
Felix S. Klock II
f978c772ba Incorporated review feedback atop pcwalton's original patches.
(Original PR was #12716; feedback was provided by thestinger and me.)
2014-03-08 21:47:12 +01:00
Patrick Walton
15d9acc46c librustdoc: Fix librustdoc for the Vec<T> change. 2014-03-08 21:41:42 +01:00
Felix S. Klock II
43c07244b3 librustc: Fix up fallout from the automatic conversion. 2014-03-08 21:41:32 +01:00
Patrick Walton
3b6e9d4a7a librustc: Automatically change uses of ~[T] to Vec<T> in rustc. 2014-03-08 21:24:27 +01:00
Michael Darakananda
438893b36f Removed DeepClone. Issue #12698. 2014-03-08 15:09:00 -05:00
Patrick Walton
f690cc2c63 libstd: Add some more functionality to Vec<T> 2014-03-08 21:08:59 +01:00
Luca Bruno
331f9077a0 doc: add two missing char methods doc-strings
XID_* property are defined in UAX #31, just reference it here.

Signed-off-by: Luca Bruno <lucab@debian.org>
2014-03-08 09:10:12 +01:00
Luca Bruno
9b3c63bdd5 doc: uniform std::char doc-strings
Uniform and beautify doc-string for current rustdoc output.

Signed-off-by: Luca Bruno <lucab@debian.org>
2014-03-08 09:10:12 +01:00
Luca Bruno
af7c313047 doc: don't refer to 'char' as characters
This seems to be causing some confusion among users. Rust's char are
not 8bit characters, but 32bit UCS-4 codepoint without surrogates
(Unicode Scalar Values as per Unicode glossary).
Make the doc more explicit about it.

Signed-off-by: Luca Bruno <lucab@debian.org>
2014-03-08 09:10:12 +01:00
bors
96e8c00e95 auto merge of #12520 : thestinger/rust/cmp, r=brson
* `Ord` inherits from `Eq`
* `TotalOrd` inherits from `TotalEq`
* `TotalOrd` inherits from `Ord`
* `TotalEq` inherits from `Eq`

This is a partial implementation of #12517.
2014-03-07 20:36:42 -08:00
Daniel Micay
4d7d101a76 create a sensible comparison trait hierarchy
* `Ord` inherits from `Eq`
* `TotalOrd` inherits from `TotalEq`
* `TotalOrd` inherits from `Ord`
* `TotalEq` inherits from `Eq`

This is a partial implementation of #12517.
2014-03-07 22:45:22 -05:00
bors
4c90a7f018 auto merge of #12748 : liigo/rust/rust-birthday, r=brson
Rust v0.1 was released on January 20, 2012:
https://mail.mozilla.org/pipermail/rust-dev/2012-January/001256.html
2014-03-07 19:21:51 -08:00
bors
3ade32145b auto merge of #12752 : edwardw/rust/rdoc, r=alexcrichton
A structure's definition and implementation may be cross-module. If the
implementing module is parsed before defining module, the fully
qualified name of the structure won't be present for the implementation
to use when being indexed. So caches such 'orphan' implementation and
indexes it at the end of crate parsing.

Closes #10284.
2014-03-07 17:16:52 -08:00
Edward Wang
a337592db6 Index cross-mod type definition and implementation properly in rustdoc
A structure's definition and implementation may be cross-module. If the
implementing module is parsed before defining module, the fully
qualified name of the structure won't be present for the implementation
to use when being indexed. So caches such 'orphan' implementation and
indexes it at the end of crate parsing.

Closes #10284.
2014-03-08 03:09:12 +08:00
bors
33768c46ec auto merge of #12753 : huonw/rust/vec-macro, r=cmr
If no arguments are given to `vec!` then no pushes are emitted and
so the compiler (rightly) complains that the mutability of `temp` is
never used.

This behaviour is rather annoying for users.
2014-03-07 02:51:39 -08:00
bors
b1d104c644 auto merge of #12750 : liigo/rust/De-extern-mod, r=alexcrichton
rename ast::ViewItemExternMod to ast::ViewItemExternCrate
rename rustdoc::clean::ExternMod to rustdoc::clean::ExternCrate
because `extern mod` is out.
2014-03-07 01:01:40 -08:00
Liigo Zhuang
2271860af1 rename ast::ViewItemExternMod to ast::ViewItemExternCrate, and clean::ExternMod to clean::ExternCrate 2014-03-07 15:57:45 +08:00
bors
85ab68eed0 auto merge of #12749 : tedhorst/rust/master, r=huonw
Minor change to the FVN hashing function based on recommendation on: http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash

cc @alexcrichton
2014-03-06 23:46:40 -08:00
Ted Horst
0bdd31cc61 change FVN hash function to the FVN-1a variant 2014-03-07 01:25:25 -06:00
Liigo Zhuang
1c86179dba Explicitly write down 0.1 release date in RELEASES.txt, to confirm Rust's birthday. 2014-03-07 15:08:42 +08:00
Huon Wilson
ba05ca6962 std: stop vec!() warning about unused mutability.
If no arguments are given to `vec!` then no pushes are emitted and
so the compiler (rightly) complains that the mutability of `temp` is
never used.

This behaviour is rather annoying for users.
2014-03-07 18:07:25 +11:00
bors
28e7631d8b auto merge of #12746 : alexcrichton/rust/issue-12743, r=brson
The arguments were accidentally swapped in the wrong order.

Closes #12743
2014-03-06 19:31:37 -08:00
bors
5862c0c28b auto merge of #12635 : alexcrichton/rust/speedy-hash, r=brson
This leverages the new hashing framework and hashmap implementation to provide a
much speedier hashing algorithm for node ids and def ids. The hash algorithm
used is currentl FNV hashing, but it's quite easy to swap out.

I originally implemented hashing as the identity function, but this actually
ended up in slowing down rustc compiling libstd from 8s to 13s. I would suspect
that this is a result of a large number of collisions.

With FNV hashing, we get these timings (compiling with --no-trans, in seconds):

|           |  before  |  after  |
|-----------|---------:|--------:|
| libstd    |   8.324  |  6.703  |
| stdtest   |  47.674  | 46.857  |
| libsyntax |   9.918  |  8.400  |
2014-03-06 18:16:39 -08:00
Alex Crichton
0a84132928 syntax: Conditionally deriving(Hash) with Writers
If #[feature(default_type_parameters)] is enabled for a crate, then
deriving(Hash) will expand with Hash<W: Writer> instead of Hash<SipState> so
more hash algorithms can be used.
2014-03-06 18:11:02 -08:00
Alex Crichton
42389b7069 collections: Correct with_capacity_and_hasher
The arguments were accidentally swapped in the wrong order.

Closes #12743
2014-03-06 18:07:52 -08:00
Alex Crichton
bec7b766fb rustc: Move to FNV hashing for node/def ids
This leverages the new hashing framework and hashmap implementation to provide a
much speedier hashing algorithm for node ids and def ids. The hash algorithm
used is currentl FNV hashing, but it's quite easy to swap out.

I originally implemented hashing as the identity function, but this actually
ended up in slowing down rustc compiling libstd from 8s to 13s. I would suspect
that this is a result of a large number of collisions.

With FNV hashing, we get these timings (compiling with --no-trans, in seconds):

|           |  before  |  after  |
|-----------|---------:|--------:|
| libstd    |   8.324  |  6.703  |
| stdtest   |  47.674  | 46.857  |
| libsyntax |   9.918  |  8.400  |
2014-03-06 17:45:48 -08:00
bors
0e95b086db auto merge of #12738 : alexcrichton/rust/needstest, r=brson,just
Closes #6738
Closes #7061
Closes #7899
Closes #9719
Closes #10028
Closes #10228
Closes #10401
Closes #11192
Closes #11508
Closes #11529
Closes #11873
Closes #11925
2014-03-06 15:11:42 -08:00
bors
bd47f679fa auto merge of #12737 : alexcrichton/rust/issue-12736, r=brson
Turns out sundown has already escaped this content for us, so there's no need
for us to escape it again.

Closes #12736
2014-03-06 13:56:41 -08:00
bors
987de29865 auto merge of #12732 : klutzy/rust/this-is-windows, r=alexcrichton
On Windows, `LLVMRustGetLastError()` may return non-utf8 mojibake string
if system uses non-English locale. It caused ICE when llvm fails.
This patch doesn't fix the real problem, but just make rustc not die.
2014-03-06 12:37:01 -08:00
Alex Crichton
13e10f5b7e test: Add some tests for closed issues
Closes #6738
Closes #7061
Closes #7899
Closes #9719
Closes #10028
Closes #10228
Closes #10401
Closes #11192
Closes #11508
Closes #11529
Closes #11873
Closes #11925
2014-03-06 10:45:08 -08:00
bors
1eb3f63d9d auto merge of #12720 : iliekturtles/rust/master, r=alexcrichton 2014-03-06 10:36:50 -08:00
Alex Crichton
9f6bcedb67 rustdoc: Don't escape contents of headers
Turns out sundown has already escaped this content for us, so there's no need
for us to escape it again.

Closes #12736
2014-03-06 09:34:04 -08:00
Mike Boutin
19ae05fa64 Added missing possessive apostrophe. 2014-03-06 12:27:31 -05:00
klutzy
f6afd40fc1 rustc: Get LLVM error message safely
On Windows, `LLVMRustGetLastError()` may return non-utf8 mojibake string
if system uses non-English locale. It caused ICE when llvm fails.
This patch doesn't fix the real problem, but just make rustc not die.
2014-03-07 00:18:32 +09:00
bors
fb80b384f4 auto merge of #12727 : lifthrasiir/rust/buffalo-buffalo, r=huonw
Cosmetic changes at best, but there are so many such typos that I couldn't ignore them. :) Some occurrences of typos are linked to the generated documentations but no changes should break the builds.
2014-03-06 06:51:35 -08:00
bors
0a7b06e955 auto merge of #12726 : alexcrichton/rust/travis, r=brson
This version is slightly more up to date and is closer to the 3.5 that we're
using. This also updates the travis config to have a build matrix which tests
rust against LLVM 3.3 and 3.4. For pull requests only LLVM 3.4 is tested to
reduce the load on travis.

This is mostly just fluff, there's no real reason to gate rust on these results,
it's more of just a nice thing to know when we break compatibility with LLVM 3.3
and 3.4 (and eventually 3.5). This turns off notifications of failed commits
(which are sent out for pushes to master).
2014-03-06 05:06:39 -08:00
Kang Seonghoon
1c52c81846 fix typos with with repeated words, just like this sentence. 2014-03-06 20:19:14 +09:00
bors
68903f2cdf auto merge of #12719 : alexcrichton/rust/fix-llvm-33, r=brson
The llvm.copysign and llvm.round intrinsics weren't added until LLVM 3.4, so if
we're on LLVM 3.3 we lower these to calls in libm instead of LLVM intrinsics.

This should fix our travis failures.
2014-03-06 03:11:39 -08:00
bors
14c620719c auto merge of #12714 : michaelwoerister/rust/limited-debuginfo, r=alexcrichton
This PR brings back limited debuginfo which allows for nice backtraces and breakpoints, but omits any info about variables and types.

The `-g` and `--debuginfo` command line options have been extended to take an optional argument:
`-g0` means no debug info.
`-g1` means line-tables only.
`-g2` means full debug info.

Specifying `-g` without argument is equivalent to `-g2`.

Fixes #12280
2014-03-06 01:56:43 -08:00
bors
2fba2fea12 auto merge of #12705 : alexcrichton/rust/issue-12692, r=brson
Details are in the commit messages, but this closes a few issues seen with `libnative` recently.
2014-03-06 00:41:48 -08:00
Alex Crichton
37b3a60b78 travis: Use LLVM 3.4 instead of LLVM 3.3
This version is slightly more up to date and is closer to the 3.5 that we're
using. This also updates the travis config to have a build matrix which tests
rust against LLVM 3.3 and 3.4. For pull requests only LLVM 3.4 is tested to
reduce the load on travis.

This is mostly just fluff, there's no real reason to gate rust on these results,
it's more of just a nice thing to know when we break compatibility with LLVM 3.3
and 3.4 (and eventually 3.5). This turns off notifications of failed commits
(which are sent out for pushes to master).
2014-03-06 00:25:19 -08:00
bors
2153293ae4 auto merge of #12687 : alexcrichton/rust/issue-12681, r=huonw
This commit adds a appear-on-over link to all section headers to generated
documentation. Each header also receives an id now, even those generated through
markdown. The purpose of this is to provide easy to link to sections.

This modifies the default header markdown generation because the default id
added looks like "toc_NN" which is difficult to reconcile among all sections (by
default each section gets a "toc_0" id), and it's also not very descriptive of
where you're going.

This chooses to adopt the github-style anchors by taking the contents of the
title and hyphen-separating them (after lower casing).

Closes #12681
2014-03-05 23:26:40 -08:00
Michael Woerister
a5b4d94e3d debuginfo: Add test case for limited debuginfo 2014-03-06 07:59:47 +01:00
Michael Woerister
e15fd400ba debuginfo: Expose limited debuginfo in command line options 2014-03-06 07:59:37 +01:00
Michael Woerister
1938e87393 debuginfo: Re-introduce the notion of line-table-only debuginfo. 2014-03-06 07:57:18 +01:00
Alex Crichton
31e7e676e1 rustdoc: Add anchors to section headers
This commit adds a appear-on-over link to all section headers to generated
documentation. Each header also receives an id now, even those generated through
markdown. The purpose of this is to provide easy to link to sections.

This modifies the default header markdown generation because the default id
added looks like "toc_NN" which is difficult to reconcile among all sections (by
default each section gets a "toc_0" id), and it's also not very descriptive of
where you're going.

This chooses to adopt the github-style anchors by taking the contents of the
title and hyphen-separating them (after lower casing).

Closes #12681
2014-03-05 22:51:56 -08:00
bors
253dbcb8c0 auto merge of #12703 : jld/rust/issue-8506, r=alexcrichton
Closes #8506.
2014-03-05 22:11:42 -08:00
Alex Crichton
9668ab58f3 std: Move libnative task count bookkeeping to std
When using tasks in Rust, the expectation is that the runtime does not exit
before all tasks have exited. This is enforced in libgreen through the
`SchedPool` type, and it is enforced in libnative through a `bookkeeping` module
and a global count/mutex pair. Unfortunately, this means that a process which
originates with libgreen will not wait for spawned native tasks.

In order to fix this problem, the bookkeeping module was moved from libnative to
libstd so the runtime itself can wait for native tasks to exit. Green tasks do
not manage themselves through this bookkeeping module, but native tasks will
continue to manage themselves through this module.

Closes #12684
2014-03-05 21:48:08 -08:00