Commit Graph

17725 Commits

Author SHA1 Message Date
bors
625e518ffe auto merge of #6305 : thestinger/rust/rc, r=nikomatsakis 2013-05-08 00:21:38 -07:00
bors
86500fbb13 auto merge of #6297 : sammykim/rust/static-lint-table, r=luqmana 2013-05-07 23:18:39 -07:00
bors
5a1afaf581 auto merge of #6303 : nikomatsakis/rust/issue-4666-test, r=nikomatsakis
existing tests. The bug itself was fixed as part of recent borrowck
reform.

Fixes #4666.
2013-05-07 20:30:37 -07:00
bors
3c4b32cdbe auto merge of #6259 : Aatch/rust/vimfile, r=bstrie
`colorcolumn` is now set with `setlocal`, so it doesn't infect the entire session.

`conceal` support is now opt-in, not opt-out. I haven't found anybody that likes it or cares either way.

The indent file now uses `cindent` with appropriate `cinoptions` and `cinkeys`. Auto-indenting an entire file mostly gets the right thing now, with structs and enums not being affects like before. Defaults to the hanging indent style, unless the first argument is on a new line.

There were some keywords in the syntax file that I've never seen (and have been used as identifiers in some tests) so they have been commented out.
2013-05-07 19:21:37 -07:00
Sangeun Kim
356ebe8792 extranous thing is removed 2013-05-08 10:42:47 +09:00
bors
d35eb6e1ee auto merge of #6302 : nikomatsakis/rust/issue-6141-leaking-owned-fn, r=brson
When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`.

Fixes #6141.

r? @brson
2013-05-07 17:30:38 -07:00
bors
847552f48b auto merge of #6301 : bjz/rust/numeric-traits, r=pcwalton
This is part of the redesign of the numeric traits tracked in issue #4819.

Renamed:

- `Exponential::expm1` -> `Float::exp_m1` - for consistency with underscore usage elsewhere
- `Exponential::log` -> `Exponential::ln` - a less ambiguous name for the natural logarithm
- `{float, f64, f32}::logarithm` -> `Exponential::log` - for arbitrary base logarithms
- `Real::log_2` -> `Real::ln_2`  - for consistency with `ln`
- `Real::log_10` -> `Real::ln_10` - for consistency with `ln`

Added:

- `Signed::abs_sub` - wraps libm's `fdim` function
- `Float::is_normal` - returns `true` if the number is neither zero, infinite, subnormal or NaN
- `Float::classify` - returns the floating point category of the number
- `Float::ln_1p` - returns the natural logarithm of the number plus one
2013-05-07 16:18:37 -07:00
James Miller
80b2926357 General fixes for vim
Makes colorcolumn setlocal instead of set.
Makes conceal opt-in.
Removes the seem-to-be obsolete old keywords/types
2013-05-08 11:16:27 +12:00
James Miller
0addefa68a Improved vim indent file for rust 2013-05-08 11:16:27 +12:00
bors
3a34e93651 auto merge of #6295 : yichoi/rust/pull-mingw32, r=brson
fix for #6279 #6253

mk: rt.mk regression patch for mingw32 after #6176

currently do not pass optimization option just make it works only

mk: target.mk host.mk fix for duplicated rules of mingw32 after #6235

It can be simply fixed with CFG_LIB check whether bin or lib however considering multiple target triples with linux and windows, CFG_LIB needs to configurable #5223 and #5577
2013-05-07 15:06:38 -07:00
bors
45ae3402e0 auto merge of #6294 : sonwow/rust/renamed-test, r=thestinger
Renamed test
2013-05-07 13:57:42 -07:00
bors
452817b854 auto merge of #6292 : thestinger/rust/cleanup, r=brson 2013-05-07 12:42:41 -07:00
bors
5063928300 auto merge of #6290 : brson/rust/issue-3707, r=thestinger
This issue has been fixed in passing.
2013-05-07 11:33:44 -07:00
bors
19d2ba3383 auto merge of #6254 : alexcrichton/rust/issues-5311-4490-better-foldl, r=graydon
Closes #5311 and #4490.

This doesn't change `vec.foldl` because that's still part of `old_iter`, although I could change that as well if necessary.
2013-05-07 10:12:40 -07:00
Daniel Micay
96eb1e50a4 arc: mark RWARC as non-Const 2013-05-07 13:03:40 -04:00
Daniel Micay
43165b54e0 rc: remove the managed pointer workaround 2013-05-07 13:02:56 -04:00
bors
7b3e036252 auto merge of #6282 : alexcrichton/rust/issue-5517-add-test, r=thestinger
It appears the cause of #5517 was fixed in 0dc6c414, so adding a test so the issue can be closed.
2013-05-07 09:03:42 -07:00
Niko Matsakis
6af447a271 Add test for #4666, which didn't *quite* seem to be covered by
existing tests. The bug itself was fixed as part of recent borrowck
reform.

Fixes #4666.
2013-05-07 11:59:38 -04:00
Niko Matsakis
11f7cb26c2 When autoborrowing a fn in trans, adjust the type of the datum to be &fn.
Fixes #6141.
2013-05-07 11:41:27 -04:00
bors
38a6a7a394 auto merge of #6276 : brson/rust/issue-6122, r=graydon 2013-05-07 06:06:42 -07:00
bors
154f3b00e0 auto merge of #6271 : pnkfelix/rust/issue6009-condition-pub-priv-variants, r=graydon
@brson: r?  [please ignore the other one that was accidentally based off master due to back-button-bugs in github.com]

My goal is to resolve the question of whether we want to encourage (by example) consistent use of pub to make identifiers publicly-accessible, even in syntax extensions. (If people don't want that, then we can just let this pull request die.)

This is part one of two. Part two, whose contents should be clear from the FIXME's in this commit, would land after this gets incorporated into a snapshot.

(The eventual goal is to address issue #6009 , which was implied by my choice of branch name, but not mentioned in the pull request, so github did not notice it.)
2013-05-07 05:06:39 -07:00
Brendan Zabarauskas
cc51186be0 Add is_normal and classify methods to Float trait 2013-05-07 20:30:51 +10:00
bors
4023f54deb auto merge of #6255 : brson/rust/nobreakpoint, r=graydon
These breakpoints make it difficult to debug coretest
2013-05-07 03:24:37 -07:00
Brendan Zabarauskas
a9ac2b95f4 Add abs_sub method to Signed trait 2013-05-07 19:16:03 +10:00
Brendan Zabarauskas
314b485c9c Fix order of methods 2013-05-07 19:16:03 +10:00
Brendan Zabarauskas
06c5e7f383 Implement exp_m1 and ln_1p as methods for Float
Both expm1 and ln1p have been renamed to exp_m1 and ln_1p in order to be consistent with the underscore usage elsewhere.

The exp_m1 method is used for increased accuracy when doing floating point calculations, so this has been moved from the more general 'Exponential' trait into 'Float'.
2013-05-07 19:16:02 +10:00
Brendan Zabarauskas
9b09dce3e1 Switch to using 'ln' for the natural logarithm and 'log' for arbitrary base logarithms 2013-05-07 19:16:02 +10:00
bors
bdb52e58b4 auto merge of #6251 : thestinger/rust/non_owned, r=pcwalton
Also fixed the docstring on `TC_ONCE_CLOSURE` (was accidentally the same as `TC_MUTABLE`) and shifted the `TC_EMPTY_ENUM` bit left by one since whatever previously used that bit has been removed.
2013-05-07 01:27:38 -07:00
Sangeun Kim
7455f986a8 Make lint_table static 2013-05-07 16:28:58 +09:00
bors
7b2020f2c3 auto merge of #6245 : youknowone/rust/match-range-static, r=graydon
Fix unintended error problem of:
````
static s: int = 1;
static e: int = 42;

fn main() {
    match 7 {
        s..e => (),
         ^~                 error: expected `=>` but found `..`
        _ => (),
    }
}
````
2013-05-07 00:18:37 -07:00
Young-il Choi
930908aa90 mk: target.mk host.mk fix for duplicated rules of mingw32 after #6235 2013-05-07 15:29:05 +09:00
Young-il Choi
db38ab9ad9 mk: rt.mk regression patch for mingw32 after #6176 2013-05-07 15:26:55 +09:00
bors
3225870191 auto merge of #6236 : alexcrichton/rust/more-map-methods, r=thestinger
Closes #5392 and #5393

I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation.

One thing I did notice is that with default methods it'd be really nice to define `insert` and `remove` in terms of `pop` and `swap` (or vice versa, just to have them available).
2013-05-06 23:06:36 -07:00
Alex Crichton
393a409b5d Add pop() and swap() to the Map trait 2013-05-07 01:16:04 -04:00
Youngsoo Son
dfe608dc99 renamed tests 2013-05-07 14:07:56 +09:00
bors
bf748e5001 auto merge of #6241 : thestinger/rust/rc, r=pcwalton
To provide a reference counted pointer type with deterministic
destruction once managed boxes are switched over to a garbage
collector. Unlike managed boxes, these can be moved instead of just
copied/cloned which is helpful for avoiding reference counts.

Needs #5601 to be fixed in order for safety to be provided without the current ugly workaround of making the pointers contain `Option<@()>` and `Option<@mut ()>` (which are just set to `None`).

@brson: r?
2013-05-06 22:00:37 -07:00
Daniel Micay
d800147abb minor automatic whitespace fixes 2013-05-06 23:57:35 -04:00
Daniel Micay
ebe35f3873 remove borrowck workarounds from the containers 2013-05-06 23:56:36 -04:00
bors
d2f0235a2c auto merge of #6228 : brson/rust/run-destroy, r=brson
These cause valgrind errors in subprocesses. I don't *think* these errors
lead to actual test failures but they are very confusing.
2013-05-06 20:12:37 -07:00
bors
4b6864f219 auto merge of #6226 : alexcrichton/rust/issue-6199, r=brson
I just removed `pub mod` from `core.rc` and then got everything to compile again. One thing I'm worried about is an import like this:

```rust
use a;
use a::b;

mod a {
  pub type b = int;
}
mod b {
  use a;    // bad
  use a::b; // good
}
```

I'm not sure if `use a::b` being valid is a bug or intended behavior (same question about `use a`). If it's intended behavior, then I got around these modules not being public by only importing the specific members that are necessary. Otherwise that probably needs an open issue.
2013-05-06 18:57:40 -07:00
Brian Anderson
4f436a8b85 Enable test for #3707 2013-05-06 18:50:21 -07:00
bors
05460fcd5a auto merge of #6286 : nikomatsakis/rust/issue-5910-dyna-freeze, r=nikomatsakis
This rather sprawling branch refactors the borrow checker and much of the region code, addressing a number of outstanding issues. I will close them manually after validating that there are test cases for each one, but here is a (probably partial) list:

  - #4903: Flow sensitivity
  - #3387: Moves in overloaded operators
  - #3850: Region granularity
  - #4666: Odd loaning errors
  - #6021: borrow check errors with hashmaps
  - #5910: @mut broken

cc #5047

(take 5)
2013-05-06 17:52:52 -07:00
Niko Matsakis
39a119074a appease the tidy gods with respect to a FIXME 2013-05-06 20:27:59 -04:00
Niko Matsakis
cd164cf8b5 Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze 2013-05-06 20:15:27 -04:00
Niko Matsakis
ce45f390dd Remove debug_mem since @graydon said it conflicted with GC changes 2013-05-06 20:14:54 -04:00
Niko Matsakis
8b32bde408 add rust_take_task_borrow_list and rust_set_task_borrow_list to rustrt.def.in 2013-05-06 20:10:19 -04:00
Alex Crichton
d0827e3d36 Add a test for issue 5517 2013-05-06 19:17:55 -04:00
Daniel Micay
3d526d1af3 add task-local reference counted smart pointers
To provide a reference counted pointer type with deterministic
destruction once managed boxes are switched over to a garbage
collector. Unlike managed boxes, these can be moved instead of just
copied/cloned which is helpful for avoiding reference counts.
2013-05-06 17:03:20 -04:00
bors
bd5fd6e42a auto merge of #6150 : yichoi/rust/arm-test-pull, r=brson
Support #5297

install.mk : install-runtime-target added for conveneice
                 automatically push runtime library to android device

test.mk : expanded to support android test automation with adb

compiletest : expanded to support android test automation with adb
2013-05-06 13:15:38 -07:00
Niko Matsakis
2e4790ca06 Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze 2013-05-06 16:10:31 -04:00