Commit Graph

17792 Commits

Author SHA1 Message Date
Brian Anderson
1755eec87f test: Replace Durable with 'static 2013-05-07 17:50:27 -07: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
Brian Anderson
d8ef723d49 rustc: Replace Durable with 'static 2013-05-07 15:30:57 -07:00
Brian Anderson
ccc4c1a5e0 std: Replace Durable with 'static 2013-05-07 15:30:40 -07: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
Brian Anderson
398cd18bfe core: Replace Durable with 'static 2013-05-07 14:43:48 -07:00
Fedor Indutny
db1a274bf5 io: handle fread() errors
When, occasionally, trying to read directory instead of file, `fread()`
returns `EISDIR` error. And, considering, absence of error handling,
`read_whole_stream()` just loops indefinitely.
2013-05-08 01:04:41 +04:00
bors
45ae3402e0 auto merge of #6294 : sonwow/rust/renamed-test, r=thestinger
Renamed test
2013-05-07 13:57:42 -07:00
Brian Anderson
6bcc3a6c57 Add some tests for local data + borrowed pointers 2013-05-07 13:53:25 -07:00
bors
452817b854 auto merge of #6292 : thestinger/rust/cleanup, r=brson 2013-05-07 12:42:41 -07:00
Brian Anderson
3b6a32d7c9 core::rt: Add a test that rng works with new tasks 2013-05-07 12:08:03 -07:00
Brian Anderson
21aaa7fb13 rt: Eliminate the dependency on rust_kernel from rust_rng 2013-05-07 12:08:03 -07:00
Brian Anderson
4cd51c416b rt: Move win32_require out of the rust_kernel type
This is only used on rust_rng, which I am trying to extricate from
the kernel.
2013-05-07 12:08:00 -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
Seo Sanghyeon
0ed4495ac4 Generate LLVM SIMD vector types 2013-05-08 02:09:19 +09: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
Seo Sanghyeon
784e8369ca Remove trailing whitespace 2013-05-08 01:01:31 +09: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
Seo Sanghyeon
0e052f5685 Add SIMD vector type tests 2013-05-07 23:35:33 +09:00
Seo Sanghyeon
c5a7be624a Add core::simd and define SIMD vector types 2013-05-07 23:35:33 +09:00
Seo Sanghyeon
f3217a5c9c Check SIMD vector types 2013-05-07 23:35:33 +09:00
Seo Sanghyeon
8e0c6fa5b6 Port IRBuilder::CreateVectorSplat 2013-05-07 23:29:19 +09: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
Niko Matsakis
387d6c597a Lift restriction on calling extern C functions, and propagate
the ABI as part of the type of an extern fn. cc #3678
2013-05-07 05:28:39 -04: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