]> git.lizzy.rs Git - rust.git/log
rust.git
11 years agolibrustc: Stop trying to make invalid slice with vec in static.
Luqman Aden [Sat, 27 Jul 2013 08:38:55 +0000 (04:38 -0400)]
librustc: Stop trying to make invalid slice with vec in static.

11 years agoauto merge of #8001 : crnobog/rust/xfail-win32-7999, r=cmr
bors [Sat, 27 Jul 2013 06:52:33 +0000 (23:52 -0700)]
auto merge of #8001 : crnobog/rust/xfail-win32-7999, r=cmr

11 years agoauto merge of #8050 : msullivan/rust/cleanup, r=graydon
bors [Sat, 27 Jul 2013 04:43:38 +0000 (21:43 -0700)]
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.

11 years agoRegister snapshots.
Michael Sullivan [Thu, 25 Jul 2013 23:26:54 +0000 (16:26 -0700)]
Register snapshots.

11 years agoauto merge of #7986 : alexcrichton/rust/raw-repr, r=brson
bors [Sat, 27 Jul 2013 02:46:36 +0000 (19:46 -0700)]
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.

11 years agoauto merge of #7979 : crnobog/rust/auxfiles-path-windows, r=cmr
bors [Sat, 27 Jul 2013 00:49:40 +0000 (17:49 -0700)]
auto merge of #7979 : crnobog/rust/auxfiles-path-windows, r=cmr

11 years agoEliminate unused variable warnings.
Michael Sullivan [Thu, 25 Jul 2013 19:49:25 +0000 (12:49 -0700)]
Eliminate unused variable warnings.

11 years agoImprove the camel case warning a bit.
Michael Sullivan [Thu, 25 Jul 2013 19:26:38 +0000 (12:26 -0700)]
Improve the camel case warning a bit.

11 years agoauto merge of #7820 : pnkfelix/rust/fill-in-some-missing-rustc-lib-dependences, r...
bors [Fri, 26 Jul 2013 18:34:46 +0000 (11:34 -0700)]
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.)

11 years agoConsolidate raw representations of rust values
Alex Crichton [Mon, 22 Jul 2013 00:20:52 +0000 (17:20 -0700)]
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).

11 years agoauto merge of #8041 : dotdash/rust/const_if_else, r=huonw
bors [Fri, 26 Jul 2013 16:46:49 +0000 (09:46 -0700)]
auto merge of #8041 : dotdash/rust/const_if_else, r=huonw

11 years agoauto merge of #8039 : Xazax-hun/rust/master, r=brson
bors [Fri, 26 Jul 2013 15:02:06 +0000 (08:02 -0700)]
auto merge of #8039 : Xazax-hun/rust/master, r=brson

Added some more atomic operations. https://github.com/mozilla/rust/issues/7421

11 years agoauto merge of #8037 : graydon/rust/issue-6416, r=cmr
bors [Fri, 26 Jul 2013 13:13:53 +0000 (06:13 -0700)]
auto merge of #8037 : graydon/rust/issue-6416, r=cmr

Errors only turn into failures in the parser when you force them.

11 years agoauto merge of #8031 : graydon/rust/emacs-mode-rewrite, r=catamorphism
bors [Fri, 26 Jul 2013 09:04:50 +0000 (02:04 -0700)]
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.

11 years agoauto merge of #7924 : alexcrichton/rust/opt-lang-xcrate2, r=thestinger
bors [Fri, 26 Jul 2013 06:49:40 +0000 (23:49 -0700)]
auto merge of #7924 : alexcrichton/rust/opt-lang-xcrate2, r=thestinger

This is a reopening of #7874

11 years agoAllow linking against crates with #[no_std]
Alex Crichton [Thu, 18 Jul 2013 03:27:20 +0000 (20:27 -0700)]
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)

11 years agoauto merge of #8030 : thestinger/rust/iterator, r=huonw
bors [Thu, 25 Jul 2013 20:49:43 +0000 (13:49 -0700)]
auto merge of #8030 : thestinger/rust/iterator, r=huonw

11 years agoauto merge of #8029 : emillon/rust/issue-6804, r=cmr
bors [Thu, 25 Jul 2013 17:55:47 +0000 (10:55 -0700)]
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`.

11 years agoGenerate branchless code when "if" can be evaluated at compile time
Björn Steinbrink [Thu, 25 Jul 2013 15:03:46 +0000 (17:03 +0200)]
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.

11 years agoNaN patterns: indicate that is_NaN is a method
Etienne Millon [Thu, 25 Jul 2013 14:40:59 +0000 (16:40 +0200)]
NaN patterns: indicate that is_NaN is a method

11 years agoauto merge of #8027 : nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-1...
bors [Thu, 25 Jul 2013 14:37:45 +0000 (07:37 -0700)]
auto merge of #8027 : nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-1, r=pcwalton

Small step towards #4846. r? @msullivan

11 years agoauto merge of #8026 : poiru/rust/issue-8024, r=alexcrichton
bors [Thu, 25 Jul 2013 12:22:44 +0000 (05:22 -0700)]
auto merge of #8026 : poiru/rust/issue-8024, r=alexcrichton

Closes #8024.

11 years agoMake omission of impossible if-else branches work with constants
Björn Steinbrink [Thu, 25 Jul 2013 08:53:27 +0000 (10:53 +0200)]
Make omission of impossible if-else branches work with constants

Until now, we only optimized away impossible branches when there is a
literal true/false in the code. But since the LLVM IR builder already does
constant folding for us, we can trivially expand that to work with
constants as well.

Refs #7834

11 years agoauto merge of #8015 : msullivan/rust/default-methods, r=nikomatsakis
bors [Thu, 25 Jul 2013 10:07:44 +0000 (03:07 -0700)]
auto merge of #8015 : msullivan/rust/default-methods, r=nikomatsakis

Lots of changes to vtable resolution, handling of super/self method calls in default methods. Fix a lot of trait inheritance bugs.

r? @nikomatsakis

11 years agoAdd a function to check whether a ValueRef is a constant
Björn Steinbrink [Thu, 25 Jul 2013 08:51:45 +0000 (10:51 +0200)]
Add a function to check whether a ValueRef is a constant

11 years agoAdded some more atomic operations.
Gábor Horváth [Thu, 25 Jul 2013 08:46:31 +0000 (10:46 +0200)]
Added some more atomic operations.

11 years agosyntax: Fix #6416 by aborting on errors after test parse.
Graydon Hoare [Thu, 25 Jul 2013 08:03:53 +0000 (01:03 -0700)]
syntax: Fix #6416 by aborting on errors after test parse.

11 years agoauto merge of #8020 : pnkfelix/rust/fsk-issue7898-dont-propagate-cfg-debug-to-tests...
bors [Thu, 25 Jul 2013 07:46:37 +0000 (00:46 -0700)]
auto merge of #8020 : pnkfelix/rust/fsk-issue7898-dont-propagate-cfg-debug-to-tests, r=huonw

Remove directive, if present, from CFG_RUSTC_FLAGS.

r? @huonw

Fix #7898.

(One alternative tack is to build up distinct CFG_TEST_RUSTC_FLAGS
alongside CFG_RUSTC_FLAGS; but currently debug is the only --cfg flag
ever added to CFG_RUSTC_FLAGS; the other contents of CFG_RUSTC_FLAGS
are a mix of -Z flags and a few other switches like O, which seem to
make sense to propogate to the tests.)

11 years agoConvert uses of transmute which don't need it
Alex Crichton [Tue, 23 Jul 2013 04:32:39 +0000 (21:32 -0700)]
Convert uses of transmute which don't need it

11 years agoauto merge of #8000 : kemurphy/rust/enum-intvar, r=huonw
bors [Thu, 25 Jul 2013 05:04:38 +0000 (22:04 -0700)]
auto merge of #8000 : kemurphy/rust/enum-intvar, r=huonw

11 years agoMove/delete old tests that change behavior
Kevin Murphy [Thu, 25 Jul 2013 03:49:04 +0000 (23:49 -0400)]
Move/delete old tests that change behavior

11 years agoAdd test for uint and negative literals as discriminants
Kevin Murphy [Wed, 24 Jul 2013 03:32:10 +0000 (23:32 -0400)]
Add test for uint and negative literals as discriminants

11 years agoAllow uint discriminants and store them as such
Kevin Murphy [Tue, 23 Jul 2013 15:52:44 +0000 (11:52 -0400)]
Allow uint discriminants and store them as such

Infers type of constants used as discriminants and ensures they are
integral, instead of forcing them to be a signed integer.

Also, stores discriminant values as uint instead of int interally and
deals with related fallout.

Fixes issue #7994

11 years agoFix vtable resolution for self to search supertraits. Closes #7661.
Michael Sullivan [Tue, 23 Jul 2013 23:28:53 +0000 (16:28 -0700)]
Fix vtable resolution for self to search supertraits. Closes #7661.

11 years agoauto merge of #7931 : blake2-ppc/rust/chain-mut-ref, r=pcwalton
bors [Thu, 25 Jul 2013 02:25:38 +0000 (19:25 -0700)]
auto merge of #7931 : blake2-ppc/rust/chain-mut-ref, r=pcwalton

First, clean up the uses of "None" and "Some" to always use consistent title case matching the variant names.

Add .chain_mut_ref() which is a missing method. A use case example for this method is extraction of an optional value from an Option\<Container\> value.

11 years agorewrite rust-mode to use font-lock-mode and emacs builtin syntax analysis
Graydon Hoare [Thu, 25 Jul 2013 00:11:04 +0000 (17:11 -0700)]
rewrite rust-mode to use font-lock-mode and emacs builtin syntax analysis

11 years agoauto merge of #8006 : emillon/rust/issue-6060, r=pcwalton
bors [Wed, 24 Jul 2013 23:49:36 +0000 (16:49 -0700)]
auto merge of #8006 : emillon/rust/issue-6060, r=pcwalton

Hello,

I made a tiny change to `tidy.py` so that it uses a regexp to find `// NOTE` comments. I could not find an easy way to write an automated test for this but if this is needed and possible I'd be happy to write one.
Please note that it also removes extra empty lines that appear after each of these warnings (I believe that there were not wanted).

On the performance side, `make tidy` is now a bit slower (running it 10 times in a row takes 71s on my machine, 65s before) but I don't think that it is performance sensitive.

Thanks!

11 years agoimprove container/iterator tutorial
Daniel Micay [Wed, 24 Jul 2013 22:36:23 +0000 (18:36 -0400)]
improve container/iterator tutorial

11 years agorm default method lint
Daniel Micay [Wed, 24 Jul 2013 00:16:26 +0000 (20:16 -0400)]
rm default method lint

default methods are enabled by default, so there's not much point in
keeping around a lint to report them as being experimental

11 years agorm unused upcall_exchange_free
Daniel Micay [Mon, 22 Jul 2013 20:37:45 +0000 (16:37 -0400)]
rm unused upcall_exchange_free

11 years agoGeneralize NaN pattern detection using walk_pat
Etienne Millon [Wed, 24 Jul 2013 21:17:10 +0000 (23:17 +0200)]
Generalize NaN pattern detection using walk_pat

11 years agoCheck for comparisons to NaN in patterns
Etienne Millon [Wed, 24 Jul 2013 16:00:33 +0000 (18:00 +0200)]
Check for comparisons to NaN in patterns

For every pattern that refers to a static value, evaluate it and emit a warning
if it is a NaN.

Fixes #6804

11 years agoGeneralize the `ty::substs` struct so that it can represent
Niko Matsakis [Wed, 24 Jul 2013 20:52:57 +0000 (16:52 -0400)]
Generalize the `ty::substs` struct so that it can represent
multiple lifetime parameters, and not just one. Also add an option
for erasing lifetimes, which makes trans code somewhat simpler
and cleaner.

11 years agoauto merge of #7996 : erickt/rust/cleanup-strs, r=erickt
bors [Wed, 24 Jul 2013 20:25:36 +0000 (13:25 -0700)]
auto merge of #7996 : erickt/rust/cleanup-strs, r=erickt

This is a cleanup pull request that does:

* removes `os::as_c_charp`
* moves `str::as_buf` and `str::as_c_str` into `StrSlice`
* converts some functions from `StrSlice::as_buf` to `StrSlice::as_c_str`
* renames `StrSlice::as_buf` to `StrSlice::as_imm_buf` (and adds `StrSlice::as_mut_buf` to match `vec.rs`.
* renames `UniqueStr::as_bytes_with_null_consume` to `UniqueStr::to_bytes`
* and other misc cleanups and minor optimizations

11 years agoImplement std::num::Zero for bool
Birunthan Mohanathas [Wed, 24 Jul 2013 19:37:48 +0000 (22:37 +0300)]
Implement std::num::Zero for bool
Closes #8024.

11 years agostd: str.as_bytes_with_null_consume() => str.to_bytes_with_null()
Erick Tryzelaar [Wed, 24 Jul 2013 19:33:49 +0000 (12:33 -0700)]
std: str.as_bytes_with_null_consume() => str.to_bytes_with_null()

11 years agoauto merge of #7997 : omasanori/rust/cleanup, r=cmr
bors [Wed, 24 Jul 2013 18:16:33 +0000 (11:16 -0700)]
auto merge of #7997 : omasanori/rust/cleanup, r=cmr

Just an minor cleanup.

11 years agoauto merge of #7982 : thestinger/rust/iterator, r=thestinger
bors [Wed, 24 Jul 2013 15:52:36 +0000 (08:52 -0700)]
auto merge of #7982 : thestinger/rust/iterator, r=thestinger

f0f4dcc r=huonw
25e9c4c r=graydon
a87c2d1 r=brson
16f369d r=cmr
9f05cc8 r=bstrie
e858055 r=huonw
5d80938 r=thestinger
05d03e7 r=cmr
8f86fa3 r=thestinger

11 years agorc: Use ~T for allocation
blake2-ppc [Wed, 24 Jul 2013 12:11:49 +0000 (14:11 +0200)]
rc: Use ~T for allocation

Simplify Rc<T>/RcMut<T> by using ~T when allocating a reference counted
box.

11 years agofix compilation on macos/windows
Daniel Micay [Wed, 24 Jul 2013 05:48:11 +0000 (01:48 -0400)]
fix compilation on macos/windows

11 years agoToStr for HashMap does not need value to implement Eq or Hash
Stepan Koltsov [Tue, 23 Jul 2013 12:40:25 +0000 (16:40 +0400)]
ToStr for HashMap does not need value to implement Eq or Hash

11 years agorustc: Remove some dead code from method resolution
Brian Anderson [Tue, 23 Jul 2013 00:06:16 +0000 (17:06 -0700)]
rustc: Remove some dead code from method resolution

11 years agoFix a crash when transmuting non-immediate to immediate types
Björn Steinbrink [Tue, 23 Jul 2013 07:37:00 +0000 (09:37 +0200)]
Fix a crash when transmuting non-immediate to immediate types

The code to build the transmute intrinsic currently makes the invalid
assumption that if the in-type is non-immediate, the out-type is
non-immediate as well. But this is wrong, for example when transmuting
[int, ..1] to int. So we need to handle this fourth case as well.

Fixes #7988

11 years agofix fmt! usage
Daniel Micay [Wed, 24 Jul 2013 03:41:33 +0000 (23:41 -0400)]
fix fmt! usage

11 years agoDisallow non-comma-delimited arguments to fmt! and bytes!
Birunthan Mohanathas [Mon, 22 Jul 2013 18:22:22 +0000 (21:22 +0300)]
Disallow non-comma-delimited arguments to fmt! and bytes!
Closes #4982.

11 years agostd:rt: args module is not used by win/mac. #7951
Brian Anderson [Mon, 22 Jul 2013 18:20:40 +0000 (11:20 -0700)]
std:rt: args module is not used by win/mac. #7951

11 years agoChange 'print(fmt!(...))' to printf!/printfln! in src/test/
Birunthan Mohanathas [Mon, 22 Jul 2013 16:04:51 +0000 (19:04 +0300)]
Change 'print(fmt!(...))' to printf!/printfln! in src/test/

11 years agoChange 'print(fmt!(...))' to printf!/printfln! in src/lib*
Birunthan Mohanathas [Mon, 22 Jul 2013 16:03:39 +0000 (19:03 +0300)]
Change 'print(fmt!(...))' to printf!/printfln! in src/lib*

11 years agodocument random-access iterators
Daniel Micay [Tue, 23 Jul 2013 21:14:32 +0000 (17:14 -0400)]
document random-access iterators

11 years agoexpand on double-ended iterators in the tutorial
Daniel Micay [Tue, 23 Jul 2013 18:37:06 +0000 (14:37 -0400)]
expand on double-ended iterators in the tutorial

11 years agoadd a RandomAccessIterator trait
Daniel Micay [Tue, 23 Jul 2013 00:11:24 +0000 (20:11 -0400)]
add a RandomAccessIterator trait

11 years agoauto merge of #7993 : Xazax-hun/rust/master, r=bblum
bors [Wed, 24 Jul 2013 13:37:36 +0000 (06:37 -0700)]
auto merge of #7993 : Xazax-hun/rust/master, r=bblum

Added missing memory orderings for atomic types. https://github.com/mozilla/rust/issues/7422

11 years agoauto merge of #7992 : huonw/rust/un-xfail, r=z0w0
bors [Wed, 24 Jul 2013 11:22:36 +0000 (04:22 -0700)]
auto merge of #7992 : huonw/rust/un-xfail, r=z0w0

...(they still don't work).

11 years agoxfail tests that are currently failing on windows, reported in #7999
crnobog [Tue, 23 Jul 2013 16:37:47 +0000 (17:37 +0100)]
xfail tests that are currently failing on windows, reported in #7999

11 years agoTests select when to use --cfg debug, regardless of configure settings.
Felix S. Klock II [Wed, 24 Jul 2013 09:26:52 +0000 (11:26 +0200)]
Tests select when to use --cfg debug, regardless of configure settings.
Remove directive, if present, from CFG_RUSTC_FLAGS.

Fix #7898.

(One alternative tack is to build up distinct CFG_TEST_RUSTC_FLAGS
alongside CFG_RUSTC_FLAGS; but currently debug is the only --cfg flag
ever added to CFG_RUSTC_FLAGS; the other contents of CFG_RUSTC_FLAGS
are a mix of -Z flags and a few other switches like O, which seem to
make sense to propogate to the tests.)

11 years agoauto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw
bors [Wed, 24 Jul 2013 08:34:38 +0000 (01:34 -0700)]
auto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw

Closes #5844

11 years agoauto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism
bors [Wed, 24 Jul 2013 05:46:39 +0000 (22:46 -0700)]
auto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism

Some machinery for enabling #[bench] benchmarks in std and some examples showing how to write them.

11 years agoauto merge of #7958 : kemurphy/rust/link-section, r=alexcrichton
bors [Wed, 24 Jul 2013 03:04:53 +0000 (20:04 -0700)]
auto merge of #7958 : kemurphy/rust/link-section, r=alexcrichton

This allows for control over the section placement of static, static
mut, and fn items.  One caveat is that if a static and a static mut are
placed in the same section, the static is declared first, and the static
mut is assigned to, the generated program crashes.  For example:

#[link_section=".boot"]
static foo : uint = 0xdeadbeef;

#[link_section=".boot"]
static mut bar : uint = 0xcafebabe;

Declaring bar first would mark .bootdata as writable, preventing the
crash when bar is written to.

11 years agoauto merge of #7885 : graydon/rust/workcache-fixes-1, r=pcwalton
bors [Wed, 24 Jul 2013 00:49:54 +0000 (17:49 -0700)]
auto merge of #7885 : graydon/rust/workcache-fixes-1, r=pcwalton

This just redoes various parts of workcache to support context-cloning (eventually quite crudely, via ARCs), the absence of which was blocking rustpkg from being able to use it. Better versions of this are possible (notably removing the ARCs on everything except the database) but it ought to work well enough for now.

11 years agoChange each_bound_trait_and_supertraits to take a vec of TraitRefs.
Michael Sullivan [Tue, 23 Jul 2013 21:54:53 +0000 (14:54 -0700)]
Change each_bound_trait_and_supertraits to take a vec of TraitRefs.

11 years agoFix the issue-3979 tests and add a new test.
Michael Sullivan [Tue, 23 Jul 2013 20:46:51 +0000 (13:46 -0700)]
Fix the issue-3979 tests and add a new test.

11 years agoMajor rework of how calls to self and super methods work.
Michael Sullivan [Tue, 23 Jul 2013 00:42:45 +0000 (17:42 -0700)]
Major rework of how calls to self and super methods work.

Eliminates method_super, method_self, and vtable_self, merging all of
them into the param cases.
Cloes #4396. Closes #7301.

11 years agoProperly track and export information about vtables for impls in metadata.
Michael Sullivan [Mon, 22 Jul 2013 23:40:31 +0000 (16:40 -0700)]
Properly track and export information about vtables for impls in metadata.

Partially rework how vtables are handled in default method calls.
Closes #7460.

11 years agoHave vtable resolution check for supertrait bounds. Closes #4055.
Michael Sullivan [Sat, 20 Jul 2013 00:19:04 +0000 (17:19 -0700)]
Have vtable resolution check for supertrait bounds. Closes #4055.

11 years agoFix some impls such that all supertraits are actually implemented.
Michael Sullivan [Fri, 19 Jul 2013 22:21:52 +0000 (15:21 -0700)]
Fix some impls such that all supertraits are actually implemented.

11 years agoImprove vtable resolution.
Michael Sullivan [Wed, 24 Jul 2013 00:01:43 +0000 (17:01 -0700)]
Improve vtable resolution.

Improve vtable resolution in a handful of ways.  First, if we don't
find a vtable for a self/param type, do a regular vtable search.  This
could find impls of the form "impl for A". Second, we don't require
that types be fully resolved before looking up subtables, and we
process tables in reverse order. This allows us to gain more
information about early type parameters based on how they are used by
the impls used to resolve later params.

Closes #6967, I believe.

11 years agoRefactor a bunch of lookup_vtable to reduce rightward drift and clean things up.
Michael Sullivan [Fri, 19 Jul 2013 00:20:58 +0000 (17:20 -0700)]
Refactor a bunch of lookup_vtable to reduce rightward drift and clean things up.

11 years agoAdd a to_owned_vec method to IteratorUtil.
Michael Sullivan [Sat, 20 Jul 2013 00:21:28 +0000 (17:21 -0700)]
Add a to_owned_vec method to IteratorUtil.

11 years agoFix a default method polymorphism bug.
Michael Sullivan [Tue, 23 Jul 2013 00:41:07 +0000 (17:41 -0700)]
Fix a default method polymorphism bug.

11 years agoGet rid of an unused variable warning.
Michael Sullivan [Mon, 22 Jul 2013 20:26:47 +0000 (13:26 -0700)]
Get rid of an unused variable warning.

11 years agostd: make str::append move self
Erick Tryzelaar [Tue, 23 Jul 2013 16:55:09 +0000 (09:55 -0700)]
std: make str::append move self

This eliminates a copy and fixes a FIXME.

11 years agorustc: remove unused variables
Erick Tryzelaar [Sat, 20 Jul 2013 02:50:10 +0000 (19:50 -0700)]
rustc: remove unused variables

11 years agoclean up warnings
Erick Tryzelaar [Sun, 21 Jul 2013 15:57:16 +0000 (08:57 -0700)]
clean up warnings

11 years agostd: inline str::with_capacity and vec::with_capacity
Erick Tryzelaar [Tue, 23 Jul 2013 16:54:28 +0000 (09:54 -0700)]
std: inline str::with_capacity and vec::with_capacity

11 years agostd: simplify str::as_imm_buf and vec::as_{imm,mut}_buf
Erick Tryzelaar [Tue, 23 Jul 2013 19:31:00 +0000 (12:31 -0700)]
std: simplify str::as_imm_buf and vec::as_{imm,mut}_buf

11 years agostr: move as_mut_buf into OwnedStr, and make it `self`
Erick Tryzelaar [Tue, 23 Jul 2013 19:30:34 +0000 (12:30 -0700)]
str: move as_mut_buf into OwnedStr, and make it `self`

11 years agostd: remove a malloc from os::fill_charp_buf
Erick Tryzelaar [Tue, 23 Jul 2013 13:51:27 +0000 (06:51 -0700)]
std: remove a malloc from os::fill_charp_buf

11 years agostd: remove str::to_owned and str::raw::slice_bytes_owned
Erick Tryzelaar [Tue, 23 Jul 2013 13:49:17 +0000 (06:49 -0700)]
std: remove str::to_owned and str::raw::slice_bytes_owned

11 years agostd: rename str.as_buf to as_imm_buf, add str.as_mut_buf
Erick Tryzelaar [Tue, 23 Jul 2013 04:48:22 +0000 (21:48 -0700)]
std: rename str.as_buf to as_imm_buf, add str.as_mut_buf

11 years agostd and extra: use as_c_str instead of as_buf in a couple places
Erick Tryzelaar [Tue, 23 Jul 2013 04:45:33 +0000 (21:45 -0700)]
std and extra: use as_c_str instead of as_buf in a couple places

These uses are assuming the strings are null terminated, so it
should be using `as_c_str` instead of `as_buf`

11 years agostd: add test for str::as_c_str
Erick Tryzelaar [Tue, 23 Jul 2013 04:42:51 +0000 (21:42 -0700)]
std: add test for str::as_c_str

11 years agostd: move StrUtil::as_c_str into StrSlice
Erick Tryzelaar [Tue, 23 Jul 2013 04:41:46 +0000 (21:41 -0700)]
std: move StrUtil::as_c_str into StrSlice

11 years agostd: move str::as_buf into StrSlice
Erick Tryzelaar [Thu, 11 Jul 2013 00:33:11 +0000 (17:33 -0700)]
std: move str::as_buf into StrSlice

11 years agostd: remove os::as_c_charp
Erick Tryzelaar [Sun, 30 Jun 2013 15:25:16 +0000 (08:25 -0700)]
std: remove os::as_c_charp

11 years agostd: rename str.as_bytes_with_null_consume to str.to_bytes_with_null
Erick Tryzelaar [Tue, 23 Jul 2013 23:56:17 +0000 (16:56 -0700)]
std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null

11 years agostd: wrap "long" utf8 lines.
Graydon Hoare [Tue, 23 Jul 2013 23:02:14 +0000 (16:02 -0700)]
std: wrap "long" utf8 lines.

11 years agoextra: rebase fallout.
Graydon Hoare [Tue, 23 Jul 2013 22:59:24 +0000 (15:59 -0700)]
extra: rebase fallout.

11 years agoauto merge of #7964 : pnkfelix/rust/fsk-issue3994-readme-note, r=huonw
bors [Tue, 23 Jul 2013 22:40:53 +0000 (15:40 -0700)]
auto merge of #7964 : pnkfelix/rust/fsk-issue3994-readme-note, r=huonw

See #3994.

11 years agoextra: give up trying to make more fields of context cloneable, just use ARCs.
Graydon Hoare [Thu, 18 Jul 2013 20:05:18 +0000 (13:05 -0700)]
extra: give up trying to make more fields of context cloneable, just use ARCs.

11 years agoextra: switch json from hashmaps to treemaps
Graydon Hoare [Thu, 18 Jul 2013 19:37:40 +0000 (12:37 -0700)]
extra: switch json from hashmaps to treemaps