Commit Graph

17192 Commits

Author SHA1 Message Date
zofrex
ac9e694d59 Update manual for single-element tuple types 2013-04-07 22:08:40 +01:00
zofrex
d1e2d295f8 Update manual for single-element tuples 2013-04-07 22:08:34 +01:00
zofrex
621d45b341 Update tutorial: 1-tuples now exist 2013-04-07 22:08:23 +01:00
gifnksm
89676d6a59 libcore: fix overflow/underflow in range_step 2013-04-07 19:55:58 +09:00
klutzy
fc26911b49 vim: fix comment highlighting bug
Previous commit had a bug that a line which ends with "//" or "/*"
is not correctly highlighted.
2013-04-07 14:30:50 +09:00
bors
5641777318 auto merge of #5756 : gifnksm/rust/bigint-impl, r=thestinger
Implements TotalEq, TotalOrd, FromStrRadix, ToStrRadix for BigUint, BigInt.
2013-04-06 22:12:51 -07:00
Daniel Micay
a3f40184bd cmp: add Ord+TotalOrd impls for Ordering itself 2013-04-07 01:02:51 -04:00
Daniel Micay
c47d80304e cmp: derive Clone for Ordering 2013-04-07 00:33:10 -04:00
gifnksm
eebf29ed37 Impl cmp/num traits for BigUint, BigInt
TotalEq, TotalOrd, FromStrRadix, ToStrRadix.
2013-04-07 13:28:17 +09:00
gareth
483e95a35c Change the behaviour of core::run::Program.destroy to
forcibly terminate the program (as suggested in issue #5632)
2013-04-06 20:57:22 +01:00
gareth
622bb6300f Update doc-comments to reflect the current year and trait
names now being capitalized.
2013-04-06 20:57:22 +01:00
gareth
e081c17805 Fix a bug where calling p.destroy() on the result of calling
start_program(...) would cause a segfault when p went
out of scope due to out_file/err_file being closed twice.
2013-04-06 20:57:21 +01:00
klutzy
7c2a8c4ac2 vim: add rustCommentDoc 2013-04-07 04:32:05 +09:00
klutzy
38fe5aa070 vim: disable nested comment
Since comment nesting does not work from 0.4.
2013-04-07 04:25:54 +09:00
bors
44d4d6de76 auto merge of #5757 : dbaupp/rust/rustc-fixed-vector-pprint, r=thestinger
Currently error messages say ``mismatched types: expected `uint` but found `[uint * 10]` (expected uint but found vector)`` rather than `[uint, .. 10]`.
2013-04-06 02:12:45 -07:00
bors
77eadc0653 auto merge of #5755 : catamorphism/rust/rustllvm-cmdline, r=brson
r? @brson In my WIP on rustpkg, I was calling driver code that calls
LLVMRustWriteOutputFile more than once. This was making LLVM
unhappy, since that function has code that initializes the
command-line options for LLVM, and I guess you can't do that more
than once. So, check if they've already been initialized.
2013-04-06 01:09:48 -07:00
bors
d09835d2e3 auto merge of #5751 : metajack/rust/at-clones, r=thestinger
The borrowck-borrow-from-expr-block test had to be updated. I'm not sure why
it compiled before since ~int was already clonable.
2013-04-06 00:06:47 -07:00
bors
28527ce8a2 auto merge of #5740 : nikomatsakis/rust/issue-5739-reborrowed-slices, r=catamorphism
r? @catamorphism (just the last commit)

This is a minor patch to #3184 (which you also reviewed), needed for #5656
2013-04-05 22:54:49 -07:00
bors
bdd2439529 auto merge of #5733 : dbaupp/rust/std-complex-rational, r=thestinger
This adds two generic data types, `Ratio` and `Cmplx` (and some aliases for useful instances, e.g. `Ratio<int>` and `Cmplx<f64>`), and basic arithmetic support, as well as `.to_str` (for both) and `.from_str` (for rational).

The complex number implementation doesn't solve #1284 other than getting something into the libraries, specifically it doesn't even try to address C interop. If the complex part of this gets merged, maybe it's worth closing that issue and reopening more specific issue(s) about the failings.

The implementations can be fleshed out when the numeric traits stabilise (and trait inheritance works).
2013-04-05 22:00:50 -07:00
bors
f678d63507 auto merge of #5732 : Zhann/rust/master, r=catamorphism
an executable vs a executable
2013-04-05 20:33:51 -07:00
Huon Wilson
28f0782260 librustc: use new [ty, .. len] syntax for fixed vector errors. 2013-04-06 13:27:27 +11:00
bors
614d6da828 auto merge of #5721 : dhardy/rust/master, r=graydon
This is some stuff which seemed to be missing to me (though I haven't read everything yet so hope I haven't missed the relevant section).

A similar addition for borrowing handles is needed, but #5720 stumped me.

Comments welcome.
2013-04-05 18:54:52 -07:00
bors
08e2cf846a auto merge of #5676 : nikomatsakis/rust/issue-4183-trait_ref, r=nikomatsakis
These are a number of incremental steps towards #4183 and #4646.
2013-04-05 18:00:52 -07:00
Graydon Hoare
e0f72e2298 checkpoint 2013-04-05 17:37:05 -07:00
Tim Chevalier
d6f455ebca rustllvm: Only initialize command-line arguments once
In my WIP on rustpkg, I was calling driver code that calls
LLVMRustWriteOutputFile more than once. This was making LLVM
unhappy, since that function has code that initializes the
command-line options for LLVM, and I guess you can't do that more
than once. So, check if they've already been initialized.
2013-04-05 17:18:26 -07:00
Jack Moffitt
d375171fd4 Move tests inside clone.rs and fixed copyright headers. 2013-04-05 17:51:43 -06:00
Jack Moffitt
b22a06000d Implement Clone for @ and @mut types.
The borrowck-borrow-from-expr-block test had to be updated. I'm not sure why
it compiled before since ~int was already clonable.
2013-04-05 16:41:47 -06:00
Diggory Hardy
e2a6feb8fe Tutorial: spelling correction and move a failing test to an xfail-test marked code block. 2013-04-05 12:26:47 +02:00
Niko Matsakis
fd8f56efab Link lifetimes of autoslice'd vectors (Issue #3184)
Fixes #5739.
2013-04-05 06:00:54 -04:00
Niko Matsakis
13801f60b2 rustc: Be careful about calls to fn types that contain nested errors 2013-04-05 05:36:03 -04:00
Niko Matsakis
d7163985b8 Add comment explaining method visibility 2013-04-05 05:36:03 -04:00
Niko Matsakis
2a44a1bd97 Fix various warnings, NOTEs, etc 2013-04-05 05:36:03 -04:00
Niko Matsakis
d28f734412 Refactor so that references to traits are not represented using a type with a
bare function store (which is not in fact a kind of value) but rather
ty::TraitRef.  Removes many uses of fail!() and other telltale signs of
type-semantic mismatch.

cc #4183 (not a fix, but related)
2013-04-05 05:36:02 -04:00
Niko Matsakis
3333b0f117 Add a (currently unused) "transformed self type" pointer into ty::method 2013-04-05 05:36:02 -04:00
Niko Matsakis
0a0525e366 Pass around a pointer to the ty::method rather than the individual bits of info 2013-04-05 05:36:02 -04:00
Niko Matsakis
569596573a Compute a ty::method for methods that appear in impls as well 2013-04-05 05:36:02 -04:00
Niko Matsakis
007abe9352 Rather than storing a list of ty::method per trait, store one ty::method
per method and list of def-ids per trait.
2013-04-05 05:36:02 -04:00
Niko Matsakis
d94830830f Move the replacement of bound regions out from check_arguments and into check_call / method_resolution 2013-04-05 05:36:02 -04:00
Niko Matsakis
1745a2cd08 refactor check_call_inner to have a better name and be readable 2013-04-05 05:36:02 -04:00
Huon Wilson
c6949b3669 libstd: make complex.rs XXX's into issues and FIXME's 2013-04-05 19:26:58 +11:00
Huon Wilson
82d54602d7 libstd: add basic complex numbers 2013-04-05 18:19:50 +11:00
Huon Wilson
7b0401d774 libstd: add basic rational numbers 2013-04-05 17:54:11 +11:00
Huon Wilson
ba63cba18d libstd: move bigint to dedicated num directory 2013-04-05 17:36:24 +11:00
bors
babe506333 auto merge of #5722 : metajack/rust/cell-with-ref-mut, r=catamorphism 2013-04-04 17:12:46 -07:00
bors
c08fb75dcd auto merge of #5431 : crabtw/rust/mips-rt, r=brson
Because the PTHREAD_STACK_MIN of my system is larger than default size, I add the stack_sz check to prevent assertion failure.

Besides, libuv has to be modified because some flags are different from other targets. Instead of using hardcoded numbers, I change them to predefined symbols.

By the way, the toolchain I used is http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/mips-gnu-linux

libuv patch: http://people.cs.nctu.edu.tw/~jyyou/rust/mips-uv.patch

Below is the current test result.

* core test

  stackwalk tests can cause segfault so I ignored them.

```
failures:
    io::tests::test_read_be_int_n
    io::tests::test_read_buffer_big_enough
    io::tests::test_read_f32
    io::tests::test_read_write_be
    io::tests::test_read_write_f32
    io::tests::test_read_write_le
    io::tests::test_simple
    io::tests::test_write_empty
    rand::tests::rng_seeded_custom_seed2
    unstable::uvll::test::test_uv_ll_struct_size_addrinfo
    unstable::uvll::test::test_uv_ll_struct_size_uv_timer_t

result: FAILED. 596 passed; 11 failed; 49 ignored
```

* std test:

```
failures:
    time::tests::run_tests

result: FAILED. 330 passed; 1 failed; 21 ignored
```
2013-04-04 15:36:58 -07:00
Diggory Hardy
1e483c7b70 Tutorial: fix typo 2013-04-04 22:35:23 +02:00
Steven De Coeyer
25b39b85da src/librust/rust.rc: Fixes typo 'an executable' vs 'a executable' 2013-04-04 20:49:56 +02:00
Jack Moffitt
2c02aab758 Add cell#with_mut_ref for handling mutable references to the content. 2013-04-04 11:34:35 -06:00
Diggory Hardy
964fc862e0 Tutorial: comment on how mutability applies to boxes 2013-04-04 18:13:12 +02:00
bors
717ed51f12 auto merge of #5716 : dhardy/rust/master, r=thestinger 2013-04-04 06:12:49 -07:00