Commit Graph

15267 Commits

Author SHA1 Message Date
bors
52817092a9 auto merge of #4747 : sanxiyn/rust/integral-type, r=graydon
`ty::type_is_integral` returns `true` for `ty_bool`. This causes `-true` to compile, instead of resulting in a type error.
2013-02-04 19:59:06 -08:00
Tim Chevalier
2f46b763da core/syntax: Staging fixes 2013-02-04 17:42:19 -08:00
bors
bffe3088c7 auto merge of pull req #4777 from thestinger/rust, r=graydon 2013-02-04 17:24:40 -08:00
Tim Chevalier
73a7672b8d std: Stamp out structural records
See #4665
2013-02-04 16:48:52 -08:00
bors
3c6b9c2363 automated merge 2013-02-04 15:39:10 -08:00
Tim Chevalier
4e45d7111c syntax: Make the pipe compiler stop generating set_buffer_ calls 2013-02-04 15:18:53 -08:00
Tim Chevalier
e22aa029fb core/syntax: Add transitional code for pipes 2013-02-04 15:18:53 -08:00
Brian Anderson
8dfab498ef Ignore test exclusive_unwrap_conflict. #4689 2013-02-04 14:19:19 -08:00
bors
eb28ce01ed automated merge 2013-02-04 13:35:37 -08:00
Patrick Walton
7d5322cf09 libcore: Add @ to Readers 2013-02-04 13:33:17 -08:00
Brian Anderson
e08a805b30 Merge remote-tracking branch 'bstrie/rimov' into incoming
Conflicts:
	src/libsyntax/parse/parser.rs
	src/test/bench/graph500-bfs.rs
	src/test/bench/sudoku.rs
	src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
	src/test/run-pass/empty-mutable-vec.rs
	src/test/run-pass/foreach-nested.rs
	src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00
Dimitri Krassovski
2c46bf7e31 Add support for clang 4.2 (as reported by apple clang) r=graydon 2013-02-04 11:28:51 -08:00
Brian Anderson
27e1ac5bb9 Merge pull request #4684 from erickt/incoming
core: convert ToStr::to_str to take explicit &self
2013-02-04 10:15:02 -08:00
Brian Anderson
750f246ad5 xfail-faist impl_privace_xc_2.rs 2013-02-04 09:56:50 -08:00
Patrick Walton
31f6534952 libsyntax: Add explicit self to ast_util. rs=explicit-selfing 2013-02-04 09:07:00 -08:00
Seo Sanghyeon
6d5428cb4e Let type_is_integral return false for bool type 2013-02-04 23:01:47 +09:00
ILyoan
6105f09cc1 Use x86-64 CABI for foreign function on arm target 2013-02-04 19:30:17 +09:00
Erick Tryzelaar
159568eab5 core: Flesh out the either traits 2013-02-03 21:55:51 -08:00
Erick Tryzelaar
f4ed7d9b6e core: export either::{Either,Left,Right} from the prelude 2013-02-03 21:55:51 -08:00
Erick Tryzelaar
31404364e1 core: sort each prelude.rs section 2013-02-03 21:55:51 -08:00
Erick Tryzelaar
9adfa59d8e core: convert ToStr::to_str to take explicit &self 2013-02-03 20:47:26 -08:00
Daniel Micay
8e643525d4 oldmap: use &K instead of K in find and get 2013-02-03 23:30:56 -05:00
Brian Anderson
9556629da2 xfail-fast run-pass/impl-privacy-xc-1.rs 2013-02-03 19:09:52 -08:00
Brian Anderson
3b396d17d6 Merge remote-tracking branch 'thestinger/old_map' into incoming
Conflicts:
	src/test/bench/core-map.rs
2013-02-03 17:56:49 -08:00
Patrick Walton
04eb9b4eb0 librustc: Fix bugs regarding to impl privacy. rs=bugfix 2013-02-03 17:50:27 -08:00
Brian Anderson
5d03612f9d Add Marvin Löbel to AUTHORS 2013-02-03 16:46:10 -08:00
Marvin Löbel
eeb89c5012 Solved float, f32 and f64 to_str_radix() special value ambiguity.
Calling it on a special value now causes a failure, however `to_str_radix_special()` is provided which can be
used if those values are expected, and which returns a tupel to allow differentating them.
2013-02-03 15:37:25 -08:00
Marvin Löbel
974d5ac1e0 Fixed errors resulting from rebase. 2013-02-03 15:37:25 -08:00
Marvin Löbel
af4972f3ce Fixed fmt!, tests, doc-tests. 2013-02-03 15:37:25 -08:00
Marvin Löbel
98445d95d4 Removed wrong/wip doc 2013-02-03 15:37:25 -08:00
Marvin Löbel
a612e49a21 Converted the floating point types to the new string conversion functions.
Also fixed all conflicting calls of the old functions in the rest of the codebase.

The set of string conversion functions for each float type now consists of those items:
- to_str(), converts to number in base 10
- to_str_hex(), converts to number in base 16
- to_str_radix(), converts to number in given radix
- to_str_exact(), converts to number in base 10 with a exact number of trailing digits
- to_str_digits(), converts to number in base 10 with a maximum number of trailing digits
- implementations for to_str::ToStr and num::ToStrRadix
- from_str(), parses a string as number in base 10 including decimal exponent and special values
- from_str_hex(), parses a string as a number in base 16 including binary exponent and special values
- from_str_radix(), parses a string as a number in a given base excluding any exponent and special values
- implementations for from_str::FromStr and num::FromStrRadix
2013-02-03 15:37:24 -08:00
Marvin Löbel
7113fd150a Fixed tests still using old integer to_str
Fixed integer tests
2013-02-03 15:37:24 -08:00
Marvin Löbel
eb19462104 Converted libcore/uint-template.rs to the new string functions.
- Moved ToStr implementation of unsigned integers to uint-template.rs.
- Marked the `str()` function as deprecated.
- Forwarded all conversion functions to `core::num::to_str_common()`
  and `core::num::from_str_common()`.
- Fixed most places in the codebase where `to_str()` is being used.
- Added uint-template to_str and from_str overflow tests.
2013-02-03 15:37:24 -08:00
Marvin Löbel
26e72bf92b Converted libcore/int-template.rs to the new string functions.
- Moved ToStr implementation of integers to int-template.rs.
- Marked the `str()` function as deprecated.
- Forwarded all conversion functions to `core::num::to_str_common()`
  and `core::num::from_str_common()`.
- Fixed most places in the codebase where `to_str()` is being used.
- Added int-template to_str and from_str overflow tests.
2013-02-03 15:37:24 -08:00
Marvin Löbel
5b0335ec8e Added generic string <-> number conversion functions to core::num.
They unify the different implementations that exists in int-template.rs, uint-template.rs and float.rs into one pair of functions, which are also in principle usable for anything that implements the necessary numeric traits. Their usage is somewhat complex due to the large amount of arguments each one takes, but as they're not meant to be used directly that shouldn't be a problem.
2013-02-03 15:37:24 -08:00
Marvin Löbel
bb9c3ed876 Added some generic number functions to core::num
Also fixes previous commit not compiling due to not finding Option.
2013-02-03 15:37:24 -08:00
Marvin Löbel
05d83017ec Added char::from_digit(), char::is_digit_radix() and an argument check to char::to_digit(). 2013-02-03 15:37:24 -08:00
Marvin Löbel
d13b23f37e Added ToStrRadix and FromStrRadix traits 2013-02-03 15:37:24 -08:00
Marvin Löbel
96f0512a45 Added Round trait to core 2013-02-03 15:37:23 -08:00
Marvin Löbel
40f0b45f8e Moved all numeric modules in core into own directory
Reason: Better grouping of related modules, future-proving for a more extensive math library.
2013-02-03 15:37:23 -08:00
Daniel Micay
4fd9264875 oldmap: &K instead of K for the remove parameter 2013-02-03 18:20:59 -05:00
Daniel Micay
119c78073b oldmap: start conversion to explicit self 2013-02-03 15:55:11 -05:00
Daniel Micay
81b4f36d49 oldmap: remove legacy each method 2013-02-03 15:55:11 -05:00
Daniel Micay
2e496818a5 oldmap: get rid of the legacy each_key method 2013-02-03 15:55:10 -05:00
Daniel Micay
88d9d417a1 oldmap: remove the legacy each_value method 2013-02-03 15:55:10 -05:00
Daniel Micay
643479f2e5 oldmap: implement core::container::Mutable 2013-02-03 15:55:10 -05:00
Daniel Micay
1b4eb145f9 oldmap: implement core::container::Container 2013-02-03 15:55:10 -05:00
Daniel Micay
f4a27b2c7d oldmap: get rid of the legacy contains_key method 2013-02-03 15:55:10 -05:00
Daniel Micay
319eeb1c79 rename map -> oldmap and mark it as deprecated
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
Daniel Micay
df31373406 rm commented out std::map code from json module
it was replaced by LinearMap
2013-02-03 15:55:09 -05:00