Commit Graph

28154 Commits

Author SHA1 Message Date
bors
4af69f204e auto merge of #13344 : eddyb/rust/kill-unboxed-vec, r=cmr
Removes the special `ty_unboxed_vec` type from the type system.
It was previously used only during translating `~[T]`/`~str` allocation and drop glue.
2014-04-06 05:46:38 -07:00
Eduard Burtescu
2d22243b0c rustc: remove ty_unboxed_vec. 2014-04-06 14:05:32 +03:00
bors
f1f50565a1 auto merge of #13315 : alexcrichton/rust/libc, r=alexcrichton,me
Rebasing of #12526 with a very obscure bug fixed on windows.
2014-04-06 02:56:39 -07:00
bors
667f82a79b auto merge of #13268 : alexcrichton/rust/parse-closure, r=cmr
In summary these are some example transitions this change makes:

    'a ||       => ||: 'a
    proc:Send() => proc():Send

The intended syntax for closures is to put the lifetime bound not at the front
but rather in the list of bounds. Currently there is no official support in the
AST for bounds that are not 'static, so this case is currently specially handled
in the parser to desugar to what the AST is expecting. Additionally, this moves
the bounds on procedures to the correct position, which is after the argument
list.

The current grammar for closures and procedures is:

    procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
                        [ ':' bound-list ] [ '->' type ]
    closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|'
                        [ ':' bound-list ] [ '->' type ]
    lifetime-list := lifetime | lifetime ',' lifetime-list
    arg-list := ident ':' type | ident ':' type ',' arg-list
    bound-list := bound | bound '+' bound-list
    bound := path | lifetime

This does not currently handle the << ambiguity in `Option<<'a>||>`, I am
deferring that to a later patch. Additionally, this removes the support for the
obsolete syntaxes of ~fn and &fn.

Closes #10553
Closes #10767 
Closes #11209
Closes #11210
Closes #11211
2014-04-06 01:36:39 -07:00
Alex Crichton
b5ef3afd50 std: Ignore a flaky std::comm test
This test relies on the parent to be descheduled before the child sends its
data. This has proved to be unreliable on libnative on the bots. It's a fairly
trivial test regardless, so ignoring it for now won't lose much.
2014-04-06 00:41:25 -07:00
Alex Crichton
d1c584e41b syntax: Tweak parsing lifetime bounds on closures
In summary these are some example transitions this change makes:

    'a ||       => ||: 'a
    proc:Send() => proc():Send

The intended syntax for closures is to put the lifetime bound not at the front
but rather in the list of bounds. Currently there is no official support in the
AST for bounds that are not 'static, so this case is currently specially handled
in the parser to desugar to what the AST is expecting. Additionally, this moves
the bounds on procedures to the correct position, which is after the argument
list.

The current grammar for closures and procedures is:

    procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
                        [ ':' bound-list ] [ '->' type ]
    closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|'
                        [ ':' bound-list ] [ '->' type ]
    lifetime-list := lifetime | lifetime ',' lifetime-list
    arg-list := ident ':' type | ident ':' type ',' arg-list
    bound-list := bound | bound '+' bound-list
    bound := path | lifetime

This does not currently handle the << ambiguity in `Option<<'a>||>`, I am
deferring that to a later patch. Additionally, this removes the support for the
obsolete syntaxes of ~fn and &fn.

Closes #10553
Closes #10767
Closes #11209
Closes #11210
Closes #11211
2014-04-06 00:08:21 -07:00
Alex Crichton
137e648edd std: Fix a doc example on io::signal
This also makes the listener struct sendable again by explicitly putting the
Send bound on the relevant Rtio object.

cc #13352
2014-04-05 22:13:32 -07:00
bors
4e9e25907b auto merge of #13319 : alexcrichton/rust/rustdoc-fields, r=brson
The calculation for whether a field is public or private was tweaked in #13184,
but I forgot to update rustdoc.

Closes #13310
2014-04-05 20:21:37 -07:00
Alex Crichton
38f7a1b41b rustc: Pass --enable-long-section-names to gcc
This was quite a curious bug on windows, and the details can be found in the
comment I added to src/librustc/back/link.rs
2014-04-05 17:53:44 -07:00
Benjamin Herr
d4b73a7411 name struct in "field ... is private" error 2014-04-06 02:37:25 +02:00
HeroesGrave
c6e19ae956 fix kate syntax highlighting 2014-04-06 09:52:08 +12:00
bors
0651d2790c auto merge of #13260 : pnkfelix/rust/fsk-fix-13247, r=alexcrichton
Fix #13247.

r? @alexcrichton  (or anyone else, really).
2014-04-05 14:51:32 -07:00
bors
b2b2bbb628 auto merge of #13112 : ktt3ja/rust/issue-13058, r=pnkfelix
Previously, Rebuilder did not visit type parameters when rebuilding
generics and path, so in some cases the suggestion turns out to be
erroneous.
2014-04-05 13:31:33 -07:00
Brendan Zabarauskas
f94453cc3d Mention more IRC channels on the documentation homepage
This adds links to `#rust-gamedev`, `#rust-internals`, and `#rust-osdev`.
2014-04-06 06:01:42 +10:00
Felix S. Klock II
4edf7b8c34 Fix android problems with newly fixed rpass-full variable definition.
First, documented the existing `CTEST_DISABLE_$(TEST_GROUP)` pattern
for conditionally disabling tests based on missing host features.

Added variant of above, `CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP)`,
which is only queried in contexts where the target is not on the
CFG_HOST list (which I interpret as the list of targets that our host
can compatibly emulate; e.g. the example that i686 and x86_64 can in
theory run each others' tests).

Driveby fix: Remove redundant copy of
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec dependency declaration.
2014-04-05 21:40:36 +02:00
bors
9539be6d74 auto merge of #13343 : tbu-/rust/pr_smallfix, r=pcwalton
Fix an unnecessary use of `cast::transmute`

Wherever possible, more specialized variants of said functions should be used,
such as in this case `cast::transmute_mmut_unsafe`.
2014-04-05 12:11:32 -07:00
Tobias Bucher
dbeea147ad Fix an unnecessary use of cast::transmute
Wherever possible, more specialized variants of said functions should be used,
such as in this case `cast::transmute_mmut_unsafe`.
2014-04-05 20:38:35 +02:00
bors
5dacd1174d auto merge of #13339 : mozilla-servo/rust/semver-pub, r=cmr 2014-04-05 10:01:34 -07:00
bors
94a055c729 auto merge of #13333 : Ryman/rust/improve_incompatible_type_error, r=alexcrichton
This can be a frustrating error message, ideally we should print the signature mismatch, but hinting that it's a trait incompatibility helps tracking root cause. Also beefed up the testcases for this.

Ideally we would print the signature mismatch in the error helper?
2014-04-05 08:41:32 -07:00
bors
2dcdc75c6c auto merge of #13332 : mbrubeck/rust/doc-edit, r=huonw
Also add the new `proc` keyword to the documentation.
2014-04-05 07:21:36 -07:00
bors
60d3c082e8 auto merge of #13331 : pongad/rust/remove-wrapper, r=thestinger
Fixes #12713
2014-04-05 06:01:36 -07:00
Ms2ger
d9a1af2741 Make the fields of semver::Version public again. 2014-04-05 13:44:50 +02:00
bors
e7148592ad auto merge of #13330 : huonw/rust/loop-error, r=alexcrichton
rustc: move the check_loop pass earlier.

This pass is purely AST based, and by running it earlier we emit more
useful error messages, e.g. type inference fails in the case of 
`let r = break;` with few constraints on `r`, but it's more useful to be told that
the `break` is outside the loop (rather than a type error) when it is.

Closes #13292.
2014-04-05 04:41:33 -07:00
bors
3bfa05021d auto merge of #13329 : ckendell/rust/remmanaged_tutorial, r=brson
Fixes #13287
Completes work started in #13298

Removed all reference to and sample code using managed boxes/pointers.
2014-04-05 03:21:34 -07:00
bors
339d400261 auto merge of #13284 : pnkfelix/rust/more-fs-info-on-crate-mismatch, r=alexcrichton
Fix #13266.

There is a little bit of acrobatics in the definition of `crate_paths`
to avoid calling `clone()` on the dylib/rlib unless we actually are
going to need them.

The other oddity is that I have replaced the `root_ident: Option<&str>`
parameter with a `root: &Option<CratePaths>`, which may surprise one
who was expecting to see something like: `root: Option<&CratePaths>`.
I went with the approach here because I could not come up with code for
the alternative that was acceptable to the borrow checker.
2014-04-04 21:06:34 -07:00
Felix S. Klock II
f4cde4eddc Rough regression test for #13266.
All it checks, unfortunately, is that you actually printed at least
two lines for crateA paths and at least one line for crateB paths.
But that's enough to capture the spirit of the bug, I think.  I did
not bother trying to verify that the paths themselves reflected where
the crates end up.
2014-04-05 03:53:28 +02:00
Felix S. Klock II
4afd060a59 Accumulate list of paths for crate hash mismatch.
(i.e. semi-generalized version of prior errorinfo gathering.)

Also revised presentation to put each path on its own line, prefixed
by file:linenum information.
2014-04-05 03:49:03 +02:00
Felix S. Klock II
1599d22603 Added session.fileline_note() method and support infrastucture for it.
Add way to print notes with just file:linenum prefix (preserving
integration with source lookup for e.g. vi and emacs) but don't repeat
the other span info.
2014-04-05 03:46:43 +02:00
Kevin Butler
28938d08a0 librustc: Improve error message for incompatible trait method signatures. 2014-04-05 02:22:00 +01:00
Matt Brubeck
fbba696a46 Remove references to obsolete do keyword
Also add the new `proc` keyword to the documentation.
2014-04-04 17:33:20 -07:00
Michael Darakananda
d27dd8251d Removed cmath and instrinsic wrapper. 2014-04-04 20:32:50 -04:00
Huon Wilson
3766453a42 rustc: move the check_loop pass earlier.
This pass is purely AST based, and by running it earlier we emit more
useful error messages, e.g. type inference fails in the case of `let r =
break;` with few constraints on `r`, but its more useful to be told that
the `break` is outside a loop (rather than a type error) when it is.

Closes #13292.
2014-04-05 10:52:28 +11:00
Christopher Kendell
dab5de268d Removed all instance of @ in code examples. 2014-04-04 16:26:33 -07:00
Christopher Kendell
51ea4fb17f Small change to example to make variable values more sensible. 2014-04-04 16:25:52 -07:00
bors
4cf8d8ce69 auto merge of #13326 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13313 (Fix typo in README.md)
Closes #13311 (Fix inner attribute syntax from `#[foo];` to `#![foo]`)
Closes #13309 (Add stdlib docs to the Linux binary tarball.)
Closes #13308 (syntax: remove obsolete mutability from ExprVec and ExprRepeat.)
Closes #13306 (TrieSet should impl Set/MutableSet; add with_capacity to PriorityQueue/SmallIntMap)
Closes #13303 (Register new snapshots)
Closes #13274 (Added grow_fn and retain to Vec)

*Issues Closed*

Closes #13249
2014-04-04 16:01:44 -07:00
Alex Crichton
6d43138b75 Test fixes from rollup 2014-04-04 15:57:45 -07:00
Michael Darakananda
bf1ffaf5f4 Added grow_fn and retain to Vec 2014-04-04 13:23:21 -07:00
Alex Crichton
d250ec0bdd Register new snapshots 2014-04-04 13:23:08 -07:00
Erick Tryzelaar
58ac1c3563 extra: Add with_capacity to PriorityQueue and SmallIntMap 2014-04-04 13:23:07 -07:00
Erick Tryzelaar
8057faa2d3 std: TrieSet should implement container::{,Mutable}Set 2014-04-04 13:23:07 -07:00
Eduard Burtescu
7c48e53c1e syntax: remove obsolete mutability from ExprVec and ExprRepeat. 2014-04-04 13:23:03 -07:00
Huon Wilson
b236f45e35 Add stdlib docs to the Linux binary tarball.
These are not installed anywhere, but are included under `./doc` for
those who want an offline copy with their nightlies. This increases the
size of the (compressed) tarball from 76 to 83 MB.
2014-04-04 13:23:00 -07:00
Timothée Ravier
73b0186290 Fix inner attribute syntax from #[foo]; to #![foo]
From the 0.10 changelog:
 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
2014-04-04 13:22:57 -07:00
Falco Hirschenberger
ba9c51d20f Update README.md
Fix typo
2014-04-04 13:22:52 -07:00
bors
e5f1b9f6dc auto merge of #13272 : ipetkov/rust/rustdoc-ignored-tests, r=alexcrichton
librustdoc: instead of skipping ignored tests, pass them to libtest
so it can report them as such.  If a test is marked as `notrust`,
however, it will not show up in the final report.

Fix #12939
2014-04-04 11:56:53 -07:00
Alex Crichton
2344c6c12d rustdoc: Fix hiding of private fields
The calculation for whether a field is public or private was tweaked in #13184,
but I forgot to update rustdoc.

Closes #13310
2014-04-04 10:20:00 -07:00
bors
2b27a5ad91 auto merge of #12956 : killerswan/rust/docs, r=alexcrichton 2014-04-04 10:01:57 -07:00
Corey Richardson
0459ee77d0 Fix fallout from std::libc separation 2014-04-04 09:31:44 -07:00
Corey Richardson
06ad5eb459 Change how the readdir/opendir hack works 2014-04-04 09:31:21 -07:00
Corey Richardson
308c03501a Remove libc from std
These wrappers are bound to a specific libc, and they don't need to be part of
libstd.
2014-04-04 09:31:21 -07:00