Commit Graph

17114 Commits

Author SHA1 Message Date
Dan Luu
37f17d7204 Update help text to match behavior 2013-04-08 18:25:15 -04:00
Jens Nockert
e06b9827ef Fix typo in u16 debug info 2013-04-08 23:59:00 +02:00
Alex Crichton
255193cc1a Removing no longer needed unsafe blocks 2013-04-08 17:50:25 -04:00
Alex Crichton
3136fba5ae Removing some mutable fields in libstd 2013-04-08 17:50:14 -04:00
bors
1968130885 auto merge of #5763 : thestinger/rust/clone, r=nikomatsakis
Performing a deep copy isn't ever desired for a persistent data
structure, and it requires a more complex implementation to do
correctly. A deep copy needs to check for cycles to avoid an infinite
loop.
2013-04-08 14:12:55 -07:00
Daniel Micay
68d17bca4b clone: managed boxes need to clone by shallow copy
Performing a deep copy isn't ever desired for a persistent data
structure, and it requires a more complex implementation to do
correctly. A deep copy needs to check for cycles to avoid an infinite
loop.
2013-04-08 16:19:12 -04:00
bors
5a0f628501 auto merge of #5777 : lucab/rust/lucab/doc/misc, r=thestinger
A non-code PR to put the AUTHORS.txt file in the released tarball and to update the copyright terms in the rustc manpage as per post-dual-licensing.
2013-04-08 13:09:55 -07:00
bors
913ca088fc auto merge of #5776 : dbaupp/rust/syntax-parse-large-number, r=thestinger
Addresses #5544 and #5770, as well as a comment left in the documentation of `from_str_bytes_common`, so that there is now an option to ignore underscores.
2013-04-08 12:06:58 -07:00
bors
c92936395c auto merge of #5775 : pavpanchekha/rust/patch-1, r=thestinger
Change wrong field name in "Trait Inheritance" section.
2013-04-08 11:10:00 -07:00
bors
2255587f23 auto merge of #5760 : klutzy/rust/vim, r=thestinger
1. disable nested comment which is not supported now
2. add syntax highlight for rustCommentDoc e.g. `/** doc */` or `/// doc`.
2013-04-08 09:34:01 -07:00
Luca Bruno
a5c931cc61 Update license terms in manpage 2013-04-08 10:19:16 +02:00
Luca Bruno
2190efb3ca Put AUTHORS.txt file in the release tarball 2013-04-08 10:15:12 +02:00
Jed Davis
e9a52f5af5 Make intrinsic::Opaque more opaque 2013-04-08 01:03:42 -07:00
Jed Davis
04b2c26f39 Make the enum visit callback generator more readable 2013-04-08 01:03:42 -07:00
Jed Davis
2589eba957 When repr'ing an enum value, assert that it matched some variant. 2013-04-08 01:03:42 -07:00
Jed Davis
640e8ae4e5 Export adt::trans_get_discr abstractly to the type visitor. 2013-04-08 01:03:42 -07:00
Jed Davis
0ca1885da1 Feed enum field offsets to type vistors. 2013-04-08 01:03:42 -07:00
Huon Wilson
0c2ceb1a2e libsyntax: fail lexing with an error message on an int literal larger than 2^64.
Stops an ICE.

Closes #5544.
2013-04-08 16:40:40 +10:00
Huon Wilson
41c6f67109 libcore: from_str_common: provide option to ignore underscores.
Implement the possible improvement listed in the comment on
from_str_bytes_common.
2013-04-08 16:35:39 +10:00
Huon Wilson
49cdf36d2b libcore: from_str_common: correctly signal failure on repeating base 2^n numbers.
A number like 0b1_1111_1111 == 511 would be parsed to Some(255u8) rather than None
by from_str_common, since 255 * 2 + 1 == 255 (mod 256) so the overflow wasn't detected.

Only applied to conversions where the radix was a power of 2, and where all digits
repeated.

Closes #5770.
2013-04-08 16:35:39 +10:00
Pavel Panchekha
c6d6782906 Fixed typo
Change wrong field name in "Trait Inheritance" section.
2013-04-07 23:19:31 -03:00
Bryan Dunsmore
f0d0cbfff8 Include definition of tuples for destructuring.
Updates the tutorial to include a simple definition for tuples in
section 4.2. Fixes #5132.
2013-04-07 17:09:15 -05:00
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