]> git.lizzy.rs Git - rust.git/log
rust.git
11 years agoauto merge of #6113 : brson/rust/task-drop, r=graydon
bors [Wed, 1 May 2013 03:09:36 +0000 (20:09 -0700)]
auto merge of #6113 : brson/rust/task-drop, r=graydon

11 years agoauto merge of #6105 : Aatch/rust/linker-improv, r=pcwalton
bors [Wed, 1 May 2013 01:36:45 +0000 (18:36 -0700)]
auto merge of #6105 : Aatch/rust/linker-improv, r=pcwalton

Adds two extra flags: `--linker` which takes extra flags to pass to the linker, can be used multiple times and `--print-link-args` which prints out linker arguments. Currently `--print-link-args` needs execution to get past translation to get the `LinkMeta` data.

I haven't done tests or updated any extra documentation yet, so this pull request is currently here for review.

11 years agoauto merge of #6103 : catamorphism/rust/nonfatal-errors, r=catamorphism
bors [Wed, 1 May 2013 00:39:36 +0000 (17:39 -0700)]
auto merge of #6103 : catamorphism/rust/nonfatal-errors, r=catamorphism

r? @nikomatsakis typeck::check::_match wasn't suppressing derived errors properly.
Fixed it. (This will fix #5100)

11 years agoFix error messages harder
Tim Chevalier [Tue, 30 Apr 2013 23:17:19 +0000 (16:17 -0700)]
Fix error messages harder

11 years agoauto merge of #6136 : jld/rust/simplifycfg-unrevert, r=thestinger
bors [Tue, 30 Apr 2013 22:24:36 +0000 (15:24 -0700)]
auto merge of #6136 : jld/rust/simplifycfg-unrevert, r=thestinger

Also add the clearly marked test case that should have been there all along, and un-xfail the not-so-obvious doc test that was affected.

11 years agoauto merge of #6134 : jld/rust/issue-6117, r=catamorphism
bors [Tue, 30 Apr 2013 20:30:39 +0000 (13:30 -0700)]
auto merge of #6134 : jld/rust/issue-6117, r=catamorphism

Cases like `Either<@int,()>` have a null case with at most one value but
a nonzero number of fields; if we misreport this, then bad things can
happen inside of, for example, pattern matching.

Closes #6117.

11 years agoauto merge of #6118 : brson/rust/too-much-recursion, r=thestinger
bors [Tue, 30 Apr 2013 19:12:37 +0000 (12:12 -0700)]
auto merge of #6118 : brson/rust/too-much-recursion, r=thestinger

I don't understand how this is still passing on the bots. This condition
should trigger an abort now.

11 years agoRevert "doc: XFAIL mysterious failure on bots"
Jed Davis [Tue, 30 Apr 2013 19:07:10 +0000 (12:07 -0700)]
Revert "doc: XFAIL mysterious failure on bots"

This reverts commit 2c6dae081b72d33a2c51b5f46436e6350bb3682f.

11 years agoReverse accidental src/llvm reversion in 876483dcf, and add test.
Jed Davis [Tue, 30 Apr 2013 19:05:06 +0000 (12:05 -0700)]
Reverse accidental src/llvm reversion in 876483dcf, and add test.

The test is reduced from a doc test, but making it separate ensures that
(1) unrelated changes to the docs won't leave this case uncovered, and
(2) the nature of any future failures will be more obvious to whoever
sees the tree on fire as a result.

11 years agoThe null case of a nullable-poiner enum might not be nullary.
Jed Davis [Tue, 30 Apr 2013 18:36:22 +0000 (11:36 -0700)]
The null case of a nullable-poiner enum might not be nullary.

Cases like `Either<@int,()>` have a null case with at most one value but
a nonzero number of fields; if we misreport this, then bad things can
happen inside of, for example, pattern matching.

Closes #6117.

11 years agoauto merge of #6121 : luqmana/rust/newtype-cc, r=graydon
bors [Tue, 30 Apr 2013 09:21:37 +0000 (02:21 -0700)]
auto merge of #6121 : luqmana/rust/newtype-cc, r=graydon

#6086

11 years agoChange flags to -Z print-link-args and --link-args
James Miller [Tue, 30 Apr 2013 08:05:16 +0000 (20:05 +1200)]
Change flags to -Z print-link-args and --link-args

11 years agoauto merge of #6108 : gifnksm/rust/bigint-shift-bug, r=brson
bors [Tue, 30 Apr 2013 05:30:36 +0000 (22:30 -0700)]
auto merge of #6108 : gifnksm/rust/bigint-shift-bug, r=brson

`std::bigint` contains the following code.
```rust
borrow = *elem << (uint::bits - n_bits);
```
The code above contains a bug that the value of the right operand of the shift operator exceeds the size of the left operand,
because sizeof(*elem) == 32, and 0 <= n_bits < 32 in 64bit architecture.

If `--opt-level` option is not given to rustc, the code above runs as if the right operand is `(uint::bits - n_bits) % 32`,
but if --opt-level is given, `borrow` is always zero.

I wonder why this bug is not catched in the libstd's testsuite (I try the `rustc --test --opt-level=2 bigint.rs` before fixing the bug,
but the unittest passes normally.)

This pull request also removes the implicit vector copies in `bigint.rs`.

11 years agoauto merge of #6107 : catamorphism/rust/mkdir_recursive, r=brson
bors [Tue, 30 Apr 2013 03:48:37 +0000 (20:48 -0700)]
auto merge of #6107 : catamorphism/rust/mkdir_recursive, r=brson

r? @brson This hopefully addresses your concerns about the termination condition, and adds more tests. With a bonus documentation commit.

11 years agorustc / test: Fix error message
Tim Chevalier [Tue, 30 Apr 2013 03:46:54 +0000 (20:46 -0700)]
rustc / test: Fix error message

11 years agoauto merge of #6073 : huonw/rust/core-rust-isaac, r=pcwalton
bors [Tue, 30 Apr 2013 01:24:37 +0000 (18:24 -0700)]
auto merge of #6073 : huonw/rust/core-rust-isaac, r=pcwalton

This replaces the wrapper around the runtime RNG with a pure Rust implementation of the same algorithm. This is much faster (up to 5x), and is hopefully safer.

There is still (a little) room for optimisation: testing by summing 100,000,000 random `u32`s indicates this is about ~~40-50%~~ 10% slower than the pure C implementation (running as standalone executable, not in the runtime).

(Only 6d50d55 is part of this PR, the first two are from #6058, but are required for the rt rng to be correct to compare against in the tests.)

11 years agoAdd test for cross crate newtype struct in match pattern.
Luqman Aden [Tue, 30 Apr 2013 00:34:02 +0000 (17:34 -0700)]
Add test for cross crate newtype struct in match pattern.

11 years agolibrustc: Fix pattern matching on cross crate newtype structs.
Luqman Aden [Tue, 30 Apr 2013 00:21:59 +0000 (17:21 -0700)]
librustc: Fix pattern matching on cross crate newtype structs.

11 years agotest: Remove run-pass/too-much-recursion.rs
Brian Anderson [Tue, 30 Apr 2013 00:11:20 +0000 (17:11 -0700)]
test: Remove run-pass/too-much-recursion.rs

I don't understand how this is still passing on the bots. This condition
should trigger an abort now.

11 years agocore: add some inlining hints to methods/fns in rand.
Huon Wilson [Fri, 26 Apr 2013 13:53:29 +0000 (23:53 +1000)]
core: add some inlining hints to methods/fns in rand.

11 years agocore: a pure Rust implementation of the ISAAC RNG.
Huon Wilson [Fri, 26 Apr 2013 13:23:49 +0000 (23:23 +1000)]
core: a pure Rust implementation of the ISAAC RNG.

This replaces the wrapper around the runtime RNG with a pure Rust
implementation of the same algorithm. This is faster (up to 5x), and
is hopefully safer.

There is still much room for optimisation: testing by summing 100,000,000
random `u32`s indicates this is about 40-50% slower than the pure C
implementation (running as standalone executable, not in the runtime).

11 years agorustc: Change At to Managed and Uniq to Owned
Tim Chevalier [Mon, 29 Apr 2013 21:23:22 +0000 (14:23 -0700)]
rustc: Change At to Managed and Uniq to Owned

11 years agoauto merge of #6080 : pcwalton/rust/demode-everything, r=pcwalton
bors [Mon, 29 Apr 2013 21:33:37 +0000 (14:33 -0700)]
auto merge of #6080 : pcwalton/rust/demode-everything, r=pcwalton

r? @brson

11 years agolibstd: Fix merge fallout.
Patrick Walton [Mon, 29 Apr 2013 17:47:26 +0000 (10:47 -0700)]
libstd: Fix merge fallout.

11 years agodoc: XFAIL mysterious failure on bots
Patrick Walton [Mon, 29 Apr 2013 17:17:20 +0000 (10:17 -0700)]
doc: XFAIL mysterious failure on bots

11 years agolibrustc: Fix merge fallout.
Patrick Walton [Sun, 28 Apr 2013 17:53:42 +0000 (10:53 -0700)]
librustc: Fix merge fallout.

11 years agotest: Fix more tests.
Patrick Walton [Sun, 28 Apr 2013 05:05:39 +0000 (22:05 -0700)]
test: Fix more tests.

11 years agolibrustc: Forbid type implementations on typedefs.
Patrick Walton [Sat, 27 Apr 2013 01:52:15 +0000 (18:52 -0700)]
librustc: Forbid type implementations on typedefs.

11 years agolibrustc: Change labels to use the lifetime notation `'`.
Patrick Walton [Fri, 26 Apr 2013 23:19:26 +0000 (16:19 -0700)]
librustc: Change labels to use the lifetime notation `'`.

11 years agotest: Fix tests.
Patrick Walton [Fri, 26 Apr 2013 21:04:39 +0000 (14:04 -0700)]
test: Fix tests.

11 years agolibrustc: Remove the concept of modes from the compiler.
Patrick Walton [Wed, 24 Apr 2013 08:29:46 +0000 (01:29 -0700)]
librustc: Remove the concept of modes from the compiler.

This commit does not remove `ty::arg`, although that should be
possible to do now.

11 years agolibrustc: Make `&fn` by-copy by default and remove the mode from `frame_address`.
Patrick Walton [Tue, 23 Apr 2013 04:54:29 +0000 (21:54 -0700)]
librustc: Make `&fn` by-copy by default and remove the mode from `frame_address`.

11 years agotest: Remove #[legacy_modes] from the test suite.
Patrick Walton [Tue, 23 Apr 2013 04:19:58 +0000 (21:19 -0700)]
test: Remove #[legacy_modes] from the test suite.

11 years agolibfuzzer: De-mode the fuzzer.
Patrick Walton [Tue, 23 Apr 2013 03:13:17 +0000 (20:13 -0700)]
libfuzzer: De-mode the fuzzer.

11 years agolibrustc: Remove the legacy mode in the type visitor intrinsic.
Patrick Walton [Tue, 23 Apr 2013 01:08:24 +0000 (18:08 -0700)]
librustc: Remove the legacy mode in the type visitor intrinsic.

11 years agolibrustc: Rename `reinterpret_cast` to `transmute_copy` and remove the intrinsic
Patrick Walton [Tue, 23 Apr 2013 00:34:42 +0000 (17:34 -0700)]
librustc: Rename `reinterpret_cast` to `transmute_copy` and remove the intrinsic

11 years agolibrustc: Implement `reinterpret_cast` in terms of `transmute`.
Patrick Walton [Mon, 22 Apr 2013 23:22:36 +0000 (16:22 -0700)]
librustc: Implement `reinterpret_cast` in terms of `transmute`.

11 years agolibrustc: Remove `ptr::addr_of`.
Patrick Walton [Mon, 22 Apr 2013 21:27:30 +0000 (14:27 -0700)]
librustc: Remove `ptr::addr_of`.

11 years agoRevert "libcore: remove unnecessary deref"
Tim Chevalier [Thu, 25 Apr 2013 21:49:14 +0000 (14:49 -0700)]
Revert "libcore: remove unnecessary deref"

This reverts commit 9860fe10a19cc4997e58861df905f8dbe4de3c5b.

11 years agoauto merge of #6110 : bjz/rust/numeric-traits, r=pcwalton
bors [Mon, 29 Apr 2013 20:39:37 +0000 (13:39 -0700)]
auto merge of #6110 : bjz/rust/numeric-traits, r=pcwalton

As discussed on issue #4819, I have created four new traits: `Algebraic`, `Trigonometric`, `Exponential` and `Hyperbolic`, and moved the appropriate methods into them from `Real`.

~~~rust
pub trait Algebraic {
    fn pow(&self, n: Self) -> Self;
    fn sqrt(&self) -> Self;
    fn rsqrt(&self) -> Self;
    fn cbrt(&self) -> Self;
    fn hypot(&self, other: Self) -> Self;
}

pub trait Trigonometric {
    fn sin(&self) -> Self;
    fn cos(&self) -> Self;
    fn tan(&self) -> Self;
    fn asin(&self) -> Self;
    fn acos(&self) -> Self;
    fn atan(&self) -> Self;
    fn atan2(&self, other: Self) -> Self;
}

pub trait Exponential {
    fn exp(&self) -> Self;
    fn exp2(&self) -> Self;
    fn expm1(&self) -> Self;
    fn log(&self) -> Self;
    fn log2(&self) -> Self;
    fn log10(&self) -> Self;
}

pub trait Hyperbolic: Exponential {
    fn sinh(&self) -> Self;
    fn cosh(&self) -> Self;
    fn tanh(&self) -> Self;
}
~~~

There was some discussion over whether we should shorten the names, for example `Trig` and `Exp`. No abbreviations have been agreed on yet, but this could be considered in the future.

Additionally, `Integer::divisible_by` has been renamed to `Integer::is_multiple_of`.

11 years agocore: Replace uses of 'drop' in task module with 'finally'. #5379
Brian Anderson [Mon, 29 Apr 2013 20:35:32 +0000 (13:35 -0700)]
core: Replace uses of 'drop' in task module with 'finally'. #5379

11 years agoauto merge of #6099 : danluu/rust/xfail_clone, r=catamorphism
bors [Mon, 29 Apr 2013 18:57:40 +0000 (11:57 -0700)]
auto merge of #6099 : danluu/rust/xfail_clone, r=catamorphism

One of the tests seems to have no current equivalent that's similar. Please let me know if that's incorrect, and I'll try fixing it instead of deleting it. I suppose a struct could be used instead of `any` and `match type`, but it seems like the original intent of the test was to exercise `match type`

11 years agoRevert "Merge Exponential and Hyperbolic traits"
Brendan Zabarauskas [Mon, 29 Apr 2013 13:38:58 +0000 (23:38 +1000)]
Revert "Merge Exponential and Hyperbolic traits"

After discussions on IRC and #4819, we have decided to revert this change. This is due to the traits expressing different ideas and because hyperbolic functions are not trivially implementable from exponential functions for floating-point types.

11 years agoMerge Exponential and Hyperbolic traits
Brendan Zabarauskas [Mon, 29 Apr 2013 12:15:58 +0000 (22:15 +1000)]
Merge Exponential and Hyperbolic traits

The Hyperbolic Functions are trivially implemented in terms of `exp`, so it's  simpler to group them the Exponential trait. In the future these would have default implementations.

11 years agotutorial: Fix 'self' to 'Self'
ILYONG CHO [Mon, 29 Apr 2013 09:03:11 +0000 (18:03 +0900)]
tutorial: Fix 'self' to 'Self'

11 years agotutorial: Fix 'self' to 'Self'
ILYONG CHO [Mon, 29 Apr 2013 08:59:25 +0000 (17:59 +0900)]
tutorial: Fix 'self' to 'Self'

11 years agoauto merge of #6083 : jbclements/rust/parser-cleanup, r=jbclements
bors [Mon, 29 Apr 2013 07:12:37 +0000 (00:12 -0700)]
auto merge of #6083 : jbclements/rust/parser-cleanup, r=jbclements

r? @pcwalton

A month's worth of parser cleanup here. Much of this is new comments and renaming. A number of these commits also remove unneeded code.  Probably the biggest refactor here is splitting "parse_item_or_view_item" into two functions; it turns out that the only overlap between items in foreign modules and items in regular modules was macros, so this refactor should make things substantially easier for future maintenance.

11 years agoRename 'divisible_by' method to 'is_multiple_of', add tests for 'is_odd' and 'is_even'
Brendan Zabarauskas [Mon, 29 Apr 2013 06:02:43 +0000 (16:02 +1000)]
Rename 'divisible_by' method to 'is_multiple_of', add tests for 'is_odd' and 'is_even'

11 years agoadd test case for enum disambiguation
John Clements [Mon, 29 Apr 2013 06:00:01 +0000 (23:00 -0700)]
add test case for enum disambiguation

11 years agofix typo in librstpkg tests, allowed by old parser
John Clements [Mon, 29 Apr 2013 06:00:48 +0000 (23:00 -0700)]
fix typo in librstpkg tests, allowed by old parser

11 years agoImplement Fractional for Ratio
Brendan Zabarauskas [Mon, 29 Apr 2013 06:00:27 +0000 (16:00 +1000)]
Implement Fractional for Ratio

11 years agoMove appropriate functions out of Real and into separate Algebraic, Trigonometric...
Brendan Zabarauskas [Mon, 29 Apr 2013 05:33:55 +0000 (15:33 +1000)]
Move appropriate functions out of Real and into separate Algebraic, Trigonometric, Exponential and Hyperbolic traits

11 years agolibstd: modify wrong shift width.
gifnksm [Mon, 29 Apr 2013 02:53:01 +0000 (11:53 +0900)]
libstd: modify wrong shift width.

borrow = *elem << (uint::bits - n_bits);

The code above contains a bug that the value of the right operand of the shift operator exceeds the size of the left operand,
because sizeof(*elem) == 32, and 0 <= n_bits < 32 in 64bit architecture.

If `--opt-level` option is not given to rustc, the code above runs as if the right operand is `(uint::bits - n_bits) % 32`,
but if --opt-level is given, `borrow` is always zero.

I wonder why this bug is not catched in the libstd's testsuite (I try the `rustc --test --opt-level=2 bigint.rs` before fixing the bug,
but the unittest passes normally.)

11 years agolibstd: remove implicit copying of BigInt/BigUint
gifnksm [Mon, 29 Apr 2013 02:51:21 +0000 (11:51 +0900)]
libstd: remove implicit copying of BigInt/BigUint

11 years agocore: Use a better termination condition in os::mkdir_recursive
Tim Chevalier [Mon, 29 Apr 2013 04:25:35 +0000 (21:25 -0700)]
core: Use a better termination condition in os::mkdir_recursive

Instead of checking whether the parent is "." or "/", check the
number of components.

Also, more tests.

11 years agocore: Document core::path::GenericPath's trait methods
Tim Chevalier [Sat, 27 Apr 2013 00:50:20 +0000 (17:50 -0700)]
core: Document core::path::GenericPath's trait methods

11 years agoAdds '--print-link-args' that outputs linker arguments that would be used
James Miller [Mon, 29 Apr 2013 02:54:41 +0000 (14:54 +1200)]
Adds '--print-link-args' that outputs linker arguments that would be used

11 years agoauto merge of #6056 : thestinger/rust/iter, r=catamorphism
bors [Mon, 29 Apr 2013 02:36:36 +0000 (19:36 -0700)]
auto merge of #6056 : thestinger/rust/iter, r=catamorphism

The existing adaptors like `map` in the `iter` module are very flawed because they only work for `BaseIter` implementations. There are many internal iterator implementations in the standard library like the set methods (`difference`, `symmetric_difference`, `intersection`, `union`) and the `range` functions that only share the `for` loop protocol in common.

The internal iterator adaptors should be implemented to work on any implementation of that protocol, rather than just a method called `each` taking `&self`.

This just moves `iter.rs` to `old_iter.rs` and begins work on documenting and implementing a nicer module.

11 years agomake way for a new iter module
Daniel Micay [Thu, 25 Apr 2013 00:35:49 +0000 (20:35 -0400)]
make way for a new iter module

11 years agorustc: Suppress derived pattern-match-checking errors
Tim Chevalier [Thu, 18 Apr 2013 02:36:59 +0000 (19:36 -0700)]
rustc: Suppress derived pattern-match-checking errors

typeck::check::_match wasn't suppressing derived errors properly.
Fixed it.

11 years agoAdd `--linker` option to pass flags to the linker
James Miller [Mon, 29 Apr 2013 00:57:49 +0000 (12:57 +1200)]
Add `--linker` option to pass flags to the linker

11 years agoauto merge of #5646 : Aatch/rust/unwind-fix, r=brson
bors [Sun, 28 Apr 2013 22:36:35 +0000 (15:36 -0700)]
auto merge of #5646 : Aatch/rust/unwind-fix, r=brson

This fixes issue #5641

11 years agoauto merge of #6092 : gifnksm/rust/impl-integer-bigint, r=graydon
bors [Sun, 28 Apr 2013 19:51:35 +0000 (12:51 -0700)]
auto merge of #6092 : gifnksm/rust/impl-integer-bigint, r=graydon

This is a follow-up commit for #6041 (and depending on #6048).
Also adding `#[inline(always)]` for almost every methods in `std::bigint`.

11 years agoUpdated spawn / loop thread to work with current syntax
Dan Luu [Sun, 28 Apr 2013 19:33:41 +0000 (15:33 -0400)]
Updated spawn / loop thread to work with current syntax

11 years agoRemove test for any type -> match type, which doesn't seem to exist anymore
Dan Luu [Sun, 28 Apr 2013 19:02:15 +0000 (15:02 -0400)]
Remove test for any type -> match type, which doesn't seem to exist anymore

11 years agoUpdate old xfailing spawn/bind/join test
Dan Luu [Sun, 28 Apr 2013 18:50:04 +0000 (14:50 -0400)]
Update old xfailing spawn/bind/join test

11 years agoparser comments
John Clements [Tue, 2 Apr 2013 23:44:01 +0000 (16:44 -0700)]
parser comments

11 years agos/one_tuple/trailing_comma (more accurate name)
John Clements [Mon, 22 Apr 2013 00:27:19 +0000 (17:27 -0700)]
s/one_tuple/trailing_comma (more accurate name)

11 years agoremoved unneeded argument to parse_record
John Clements [Mon, 22 Apr 2013 00:26:41 +0000 (17:26 -0700)]
removed unneeded argument to parse_record

11 years agos/parse_purity/parse_unsafety
John Clements [Fri, 19 Apr 2013 22:48:02 +0000 (15:48 -0700)]
s/parse_purity/parse_unsafety

11 years agoremove 3-line used-once function
John Clements [Fri, 19 Apr 2013 18:19:37 +0000 (11:19 -0700)]
remove 3-line used-once function

11 years agorename parse_instance_var to parse_name_and_ty
John Clements [Fri, 19 Apr 2013 17:49:02 +0000 (10:49 -0700)]
rename parse_instance_var to parse_name_and_ty

the name no longer made sense. perhaps this could just be inlined.

11 years agoremove obsolete semicolon from list of suggestions
John Clements [Fri, 19 Apr 2013 17:44:41 +0000 (10:44 -0700)]
remove obsolete semicolon from list of suggestions

11 years agorename parse_single_class_item as well
John Clements [Fri, 19 Apr 2013 17:41:59 +0000 (10:41 -0700)]
rename parse_single_class_item as well

11 years agorename parse_class_item to parse_struct_decl_field
John Clements [Fri, 19 Apr 2013 17:36:21 +0000 (10:36 -0700)]
rename parse_class_item to parse_struct_decl_field

two problems with the old name: they're not called classes any more, and
the word "item" has a specific connotation in the parser

11 years agoneeds_comma was always true
John Clements [Fri, 19 Apr 2013 16:45:02 +0000 (09:45 -0700)]
needs_comma was always true

11 years agofix for parsing x() as identifier pattern
John Clements [Fri, 19 Apr 2013 15:45:25 +0000 (08:45 -0700)]
fix for parsing x() as identifier pattern

11 years agohard to read the implied double negative
John Clements [Fri, 19 Apr 2013 15:44:47 +0000 (08:44 -0700)]
hard to read the implied double negative

11 years agoremove unused functions, fix tiny lexing bug
John Clements [Wed, 17 Apr 2013 19:24:49 +0000 (12:24 -0700)]
remove unused functions, fix tiny lexing bug

before this change, the parser would parse 14.a() as a method call, but
would parse 14.ø() as the floating-point number 14. followed by a function
call. This is because it was checking is_alpha, rather than ident_start,
and was therefore wrong with respect to unicode.

11 years agoremove unused flag to parse_local fn
John Clements [Mon, 15 Apr 2013 23:31:57 +0000 (16:31 -0700)]
remove unused flag to parse_local fn

11 years agoremove unused RESTRICT_NO_CALL_EXPRS restriction
John Clements [Thu, 11 Apr 2013 20:10:06 +0000 (13:10 -0700)]
remove unused RESTRICT_NO_CALL_EXPRS restriction

11 years agoundo abstraction over whether to parse attrs in a block
John Clements [Sat, 6 Apr 2013 00:31:52 +0000 (17:31 -0700)]
undo abstraction over whether to parse attrs in a block

In principle, it seems like a nice idea to abstract over the two
functions that parse blocks (one with inner attrs allowed, one not).
However, the existing one wound up making things more complex than
just having two separate functions, especially after the obsolete
syntax is (will be) removed.

11 years agorefactoring to split foreign_items from items
John Clements [Mon, 1 Apr 2013 22:50:58 +0000 (15:50 -0700)]
refactoring to split foreign_items from items

11 years agoparser comments
John Clements [Fri, 29 Mar 2013 19:51:10 +0000 (12:51 -0700)]
parser comments

parser comments

11 years agoget rid of prec.rs
John Clements [Fri, 29 Mar 2013 17:04:48 +0000 (10:04 -0700)]
get rid of prec.rs

prec.rs no longer had much to do with precedence; the token->binop
function fits better in token.rs, and the one-liner defining the
precedence of 'as' can go next to the other precedence stuff in
ast_util.rs

11 years agoreindent in parser
John Clements [Thu, 28 Mar 2013 23:31:12 +0000 (16:31 -0700)]
reindent in parser

11 years agoremove unnecessary function
John Clements [Thu, 28 Mar 2013 22:45:09 +0000 (15:45 -0700)]
remove unnecessary function

11 years agosimplify, based on invariant that items_allowed != foreign_items_allowed
John Clements [Wed, 10 Apr 2013 16:44:48 +0000 (09:44 -0700)]
simplify, based on invariant that items_allowed != foreign_items_allowed

11 years agoadding parse_path
John Clements [Wed, 27 Mar 2013 19:36:10 +0000 (12:36 -0700)]
adding parse_path

11 years agocomments, helper function for tests, more informative error message
John Clements [Tue, 23 Apr 2013 23:47:47 +0000 (16:47 -0700)]
comments, helper function for tests, more informative error message

11 years agorefactor parse_fn_decl
John Clements [Thu, 4 Apr 2013 21:30:43 +0000 (14:30 -0700)]
refactor parse_fn_decl

11 years agoparser comments only
John Clements [Thu, 4 Apr 2013 21:30:11 +0000 (14:30 -0700)]
parser comments only

11 years agorefactoring mod.rs
John Clements [Tue, 23 Apr 2013 17:57:41 +0000 (10:57 -0700)]
refactoring mod.rs

11 years agochange stage1,stage2,stage2 into not(stage0)
John Clements [Tue, 23 Apr 2013 17:51:57 +0000 (10:51 -0700)]
change stage1,stage2,stage2 into not(stage0)

With luck, this will allow rust to compile itself without --cfg flags again...

11 years agoauto merge of #6097 : Blei/rust/fix-rand, r=pnkfelix
bors [Sun, 28 Apr 2013 11:48:35 +0000 (04:48 -0700)]
auto merge of #6097 : Blei/rust/fix-rand, r=pnkfelix

`self` has type `&@Rand`, so `*self` will be of type `@Rand` which causes
this same impl to be called again.

Fixes #6061

11 years agorand: Fix infinite recursion
Philipp Brüschweiler [Sun, 28 Apr 2013 11:31:49 +0000 (13:31 +0200)]
rand: Fix infinite recursion

`self` has type `&@Rand`, so `*self` will be of type `@Rand` which causes
this same impl to be called again.

11 years agoauto merge of #6075 : thestinger/rust/no-no_core, r=brson
bors [Sun, 28 Apr 2013 02:18:33 +0000 (19:18 -0700)]
auto merge of #6075 : thestinger/rust/no-no_core, r=brson

core injection works fine now

11 years agolibstd: inlining almost every methods in bigint module.
gifnksm [Sun, 28 Apr 2013 01:58:19 +0000 (10:58 +0900)]
libstd: inlining almost every methods in bigint module.

11 years agolibstd: impl Integer for BigUint/BigInt.
gifnksm [Sun, 28 Apr 2013 01:08:54 +0000 (10:08 +0900)]
libstd: impl Integer for BigUint/BigInt.

Also remove abs() method from the non-trait impl for BigInt/BigUint.
That method is provided in the Signed trait.

11 years agoonly use #[no_core] in libcore
Daniel Micay [Fri, 26 Apr 2013 16:24:15 +0000 (12:24 -0400)]
only use #[no_core] in libcore