Commit Graph

20890 Commits

Author SHA1 Message Date
blake2-ppc
7ae17e0964 Remove dummy type parameters from iterator adaptors
With the recent fixes to method resolution, we can now remove the
dummy type parameters used as crutches in the iterator module.

For example, the zip adaptor type is just ZipIterator<T, U> now.
2013-07-27 14:37:55 -04:00
Daniel Micay
d7c9bb4b68 vec: add mut_slice_{to,from}
Closes #8066
2013-07-27 14:36:52 -04:00
Daniel Micay
d6bc438bbc make RandomAccessIterator inherit from Iterator 2013-07-27 14:36:52 -04:00
bors
5157e05049 auto merge of #8036 : sfackler/rust/container-impls, r=msullivan
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-27 11:16:31 -07:00
bors
0522955d10 auto merge of #8070 : luqmana/rust/nom, r=alexcrichton
Fixes #5972.
2013-07-27 08:58:33 -07:00
bors
aa8f79d6cf auto merge of #8067 : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however.

Closes #3636
2013-07-27 07:10:36 -07:00
bors
ed20fcc459 auto merge of #8060 : Blei/rust/fix-obsolete-extern-visibility-span, r=pcwalton 2013-07-27 05:25:34 -07:00
bors
e7211948a5 auto merge of #8045 : michaelwoerister/rust/destructuring, r=jdm
As the title says, valid debug info is now generated for any kind of pattern-based bindings like an example from the automated tests: 
```rust
let ((u, v), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue) =
    ((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33);  
```
(Not that you would necessarily want to do a thing like that :P )

Fixes #2533
2013-07-27 03:37:35 -07:00
bors
15310ba7c2 auto merge of #8040 : luqmana/rust/rtn, r=brson
Implements various missing tcp & udp methods.. Also fixes handling ipv4-mapped/compatible ipv6 addresses and addresses the XXX on `status_to_maybe_uv_error`.

r? @brson
2013-07-27 01:49:35 -07:00
Luqman Aden
68b61e8cc9 Add test for #5917. 2013-07-27 04:47:12 -04:00
Luqman Aden
4a85b08e08 librustc: Stop trying to make invalid slice with vec in static. 2013-07-27 04:47:12 -04:00
Graydon Hoare
413446c85b rustc: reorganize driver, replace compile_upto with multiple more-obvious functions. 2013-07-27 00:48:05 -07:00
OGINO Masanori
8d654fc41d Remove unnecessary #[path = "***/mod.rs"] lines.
Fixes #7922.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-27 15:53:30 +09:00
bors
c5194740a7 auto merge of #8001 : crnobog/rust/xfail-win32-7999, r=cmr 2013-07-26 23:52:33 -07:00
Luqman Aden
c32b26be10 librustc: Unify name mangling for functions and statics. 2013-07-27 01:50:20 -04:00
bors
300ba1cc5c auto merge of #8050 : msullivan/rust/cleanup, r=graydon
And a couple other things. Fix up some unused variable warnings, and improve the camel case lint message a little.
2013-07-26 21:43:38 -07:00
Michael Sullivan
07361802a2 Register snapshots. 2013-07-26 20:43:18 -07:00
Luqman Aden
e82394013d librustc: Respect no_mangle attribute on statics. 2013-07-26 23:41:22 -04:00
Tim Chevalier
7079ec6e2e docs: Talk about tags that aren't versions in the "Package identifiers" section 2013-07-26 20:06:41 -07:00
bors
4989799799 auto merge of #7986 : alexcrichton/rust/raw-repr, r=brson
This moves the raw struct layout of closures, vectors, boxes, and strings into a
new `unstable::raw` module. This is meant to be a centralized location to find
information for the layout of these values.

As safe method, `unwrap`, is provided to convert a rust value to its raw
representation. Unsafe methods to convert back are not provided because they are
rarely used and too numerous to write an implementation for each (not much of a
common pattern).

This is progress on #6790. I tried to get a nice interface for a trait to implement in the raw module, but I was unable to come up with one. The hard part is that there are so many different directions to go from one way to another that it's difficult to find a pattern to follow to implement a trait with. Someone else might have some better luck though.
2013-07-26 19:46:36 -07:00
Alex Crichton
b782d42cba Deny all warnings by default in doc tests
Allow some common ones that are good for examples, however.
2013-07-26 18:04:20 -07:00
bors
5c4cd30f80 auto merge of #7979 : crnobog/rust/auxfiles-path-windows, r=cmr 2013-07-26 17:49:40 -07:00
Michael Sullivan
f5721c9334 Eliminate unused variable warnings. 2013-07-26 16:42:03 -07:00
Michael Sullivan
8582fde150 Improve the camel case warning a bit. 2013-07-26 16:42:03 -07:00
Tim Chevalier
c8780511b9 rustpkg: Don't assume a non-numeric refspec is a tag
Just pass it directly to git, without prefixing it with tags/
2013-07-26 12:31:53 -07:00
bors
44808fcee6 auto merge of #7820 : pnkfelix/rust/fill-in-some-missing-rustc-lib-dependences, r=graydon
r? anyone

Fix #8057

This commit fixes some oversights in the Makefile where rustc could be
invoked without some of its dependencies yet in place.  (I encountered
the problem in practice; its not just theoretical.)

As written in Makefile.in, $(STAGE$(1)_T_$(2)_H_$(3)) is the way one
writes an invocation of rustc where $(1) is the stage number $(2) is
the target triple $(3) is the host triple.  (Other uses of the macro
may plug in actual values or different parameters in for those three
formal parameters.)

When you have invocations of $(STAGE...), you need to make sure that
its dependences are satisfied; otherwise, if someone is using `make
-jN` for certain (large-ish) `N`, one can encounter situations where
GNU make attempts to invoke `rustc` before it has actually copied some
of its libraries into place, such as libmorestack.a, which causes a
link failure when the rustc invocation attempts to link in those
libraries.

In this case, the main prerequisite to add is TSREQ$(1)_T_$(2)_H_$(3),
which is described in Makefile.in as "Prerequisites for using the
stageN compiler to build target artifacts"

----

In addition to adding the extra dependences on TSREQ..., I also
replaced occurrences of the pattern:

    TSREQ$(1)_T_$(2)_H_$(3)
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

with:

    SREQ$(1)_T_$(2)_H_$(3)

which is equivalent to the above, as defined in Makefile.in

----

Finally, for the cases where TSREQ was missing in tests.mk, I went
ahead and put in a dependence on SREQ rather than just TSREQ, since it
was not clear to me how one could expect to compile those cases
without stdlib and extralib.

(It could well be that I should have gone ahead and done the same in
 other cases where I saw TSREQ was missing, and put SREQ in those
 cases as well.  But this seemed like a good measure for now, without
 needing to tax my understanding of the overall makefile
 infrastructure much further.)
2013-07-26 11:34:46 -07:00
Alex Crichton
5aaaca0c6a Consolidate raw representations of rust values
This moves the raw struct layout of closures, vectors, boxes, and strings into a
new `unstable::raw` module. This is meant to be a centralized location to find
information for the layout of these values.

As safe method, `repr`, is provided to convert a rust value to its raw
representation. Unsafe methods to convert back are not provided because they are
rarely used and too numerous to write an implementation for each (not much of a
common pattern).
2013-07-26 09:53:03 -07:00
bors
544ef6cf35 auto merge of #8041 : dotdash/rust/const_if_else, r=huonw 2013-07-26 09:46:49 -07:00
bors
15ab6fde7f auto merge of #8039 : Xazax-hun/rust/master, r=brson
Added some more atomic operations. https://github.com/mozilla/rust/issues/7421
2013-07-26 08:02:06 -07:00
Philipp Brüschweiler
2a18c29d67 syntax: fix span for obsolete extern visibility error 2013-07-26 16:02:34 +02:00
bors
382b037252 auto merge of #8037 : graydon/rust/issue-6416, r=cmr
Errors only turn into failures in the parser when you force them.
2013-07-26 06:13:53 -07:00
bors
4c4cf003ea auto merge of #8031 : graydon/rust/emacs-mode-rewrite, r=catamorphism
The previous mode did a lot of very manual char-at-a-time parsing and was quite fragile and difficult to maintain. I talked to Marijn and he suggested I'd have better luck just rewriting it from scratch. This is the result of that effort; it seems to be faster, a bit easier on the eyes and more-or-less as well behaved when indenting. The algorithm is a bit different I suspect (it was hard to tell the previous one) but I tried to keep it simple and pleasant-looking.
2013-07-26 02:04:50 -07:00
Luqman Aden
df67942dcc libstd: Tests for {peer, socket}_name. 2013-07-26 05:02:53 -04:00
bors
5109ce691c auto merge of #7924 : alexcrichton/rust/opt-lang-xcrate2, r=thestinger
This is a reopening of #7874
2013-07-25 23:49:40 -07:00
Alex Crichton
09e49a8e6c Allow linking against crates with #[no_std]
Previously having optional lang_items caused an assertion failure at
compile-time, and then once that was fixed there was a segfault at runtime of
using a NULL crate-map (crates with no_std)
2013-07-25 19:23:17 -07:00
Luqman Aden
037bf3757c libstd: Implement some missing udp methods. 2013-07-25 22:21:46 -04:00
Luqman Aden
a5c6b85091 libstd: Implement some missing tcp methods. 2013-07-25 19:42:19 -04:00
Luqman Aden
005ea3b173 libstd: Add ToStr impl for IpAddr. 2013-07-25 18:27:18 -04:00
Steven Fackler
feb18fe8da Added default impls for container methods
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-25 15:17:30 -07:00
Michael Woerister
d54615528c debuginfo: Fixed a few things for PR. 2013-07-25 23:05:56 +02:00
bors
0012b5008b auto merge of #8030 : thestinger/rust/iterator, r=huonw 2013-07-25 13:49:43 -07:00
Keegan McAllister
d0f54a5cfb Warn about unused RUST_LOG specs 2013-07-25 13:24:32 -07:00
Luqman Aden
d6e1a6b237 libstd: Get rid of duplication in {peer, socket}_name and remove extra *. 2013-07-25 15:50:19 -04:00
bors
b1f5b1ba5f auto merge of #8029 : emillon/rust/issue-6804, r=cmr
Hi,

As noted in #6804, a pattern that contains `NaN` will never match because `NaN != NaN`. This adds a warning for such a case. The first commit handles the basic case and the second one generalizes it to more complex patterns using `walk_pat`.
2013-07-25 10:55:47 -07:00
Michael Woerister
af7b87f69d debuginfo: Minor cleanup now possible with new snapshot. 2013-07-25 19:47:03 +02:00
Michael Woerister
02a0f2822e debuginfo: Support for destructured function arguments. 2013-07-25 19:47:03 +02:00
Michael Woerister
c9e51cef12 debuginfo: Support for function arguments. (WIP) 2013-07-25 19:47:03 +02:00
Michael Woerister
203f96f71d debuginfo: Implemented support for destructured locals.
Conflicts:
	src/librustc/middle/trans/debuginfo.rs
	src/test/debug-info/destructured-local.rs
2013-07-25 19:47:03 +02:00
Björn Steinbrink
7078ab7324 Generate branchless code when "if" can be evaluated at compile time
We already avoid the conditional branch, but still have an
unconditional branch in the generated code. Remove it.
2013-07-25 17:03:46 +02:00
Etienne Millon
f929a49d9c NaN patterns: indicate that is_NaN is a method 2013-07-25 16:40:59 +02:00