Marvin Löbel
04de8f852c
Fix cosmetics for fail!() calls
2013-05-14 16:36:24 +02:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Alex Crichton
66e1e51701
Remove re-exports from libcore/core.rc
...
Also fix up all the fallout elsewhere throughout core. It's really nice being
able to have the prelude.
2013-05-13 18:51:40 -04:00
bors
957251817b
auto merge of #6389 : sonwow/rust/issue-3356, r=bstrie
...
Fix for #3356
2013-05-11 12:55:49 -07:00
Alex Crichton
b05aae2d41
test: Use the new for
protocol
2013-05-10 19:20:20 -04:00
Youngsoo Son
24ef88cee9
renamed str::from_slice to str::to_owned
2013-05-10 20:08:56 +09:00
Alex Crichton
28256052a4
core: Use the new for
protocol
2013-05-10 02:46:18 -04:00
Youngmin Yoo
9a292b3da5
libcore: rename vec::each(variable) to variable.each
2013-05-09 14:17:18 +09:00
Zack Corr
cb66d8948a
Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]
2013-05-08 21:11:23 +10:00
Niko Matsakis
4300d4d2fa
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
...
Conflicts:
src/libcore/core.rc
src/libcore/hashmap.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/num.rs
src/libcore/num/strconv.rs
src/libcore/num/uint-template.rs
src/libcore/ops.rs
src/libcore/os.rs
src/libcore/prelude.rs
src/libcore/rt/mod.rs
src/libcore/unstable/lang.rs
src/librustc/driver/session.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans.rs
src/librustc/middle/borrowck/loan.rs
src/librustc/middle/borrowck/preserve.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/region.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/inline.rs
src/librustc/middle/trans/reachable.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/util/ppaux.rs
src/libstd/arena.rs
src/libstd/ebml.rs
src/libstd/json.rs
src/libstd/serialize.rs
src/libstd/std.rc
src/libsyntax/ast_map.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail/borrowck-uniq-via-box.rs
src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs
src/test/run-pass/borrowck-nested-calls.rs
2013-05-05 15:11:04 -04:00
Huon Wilson
5714e2c11b
libcore: optimize string joining routines.
...
This makes concat/connect/connect_slices about 20% faster, and takes
`repeat` from O(n^2) to O(n), and lowers the constant factor.
2013-05-02 19:49:15 +10:00
Huon Wilson
afcb9e9d86
core: inlining on common functions
2013-05-02 18:03:43 +10:00
Niko Matsakis
a896440ca1
new borrow checker (mass squash)
2013-04-30 06:59:32 -04:00
Patrick Walton
b0522a497c
librustc: Remove ptr::addr_of
.
2013-04-29 14:30:53 -07:00
Marvin Löbel
3759b5711d
Fixed typo... And a billion other things.
2013-04-24 22:28:02 +02:00
Marvin Löbel
dd74807957
Removed ascii functions from other modules
...
Replaced str::to_lowercase and str::to_uppercase
2013-04-24 22:26:09 +02:00
bors
05f9586d06
auto merge of #5980 : Kimundi/rust/ascii-encoding, r=thestinger
...
Added Ascii type to use for byte inputs that are known to contain Ascii only.
2013-04-22 16:33:51 -07:00
Marvin Löbel
582a05fc95
Moved ascii out of str
...
Removed deriving Ord, which allowed to remove the stage markers
2013-04-22 21:42:25 +02:00
Alex Crichton
13537d2e0c
core: remove unused 'mut' variables
2013-04-20 21:02:38 -04:00
Marvin Löbel
61ffee738d
Added Ascii type
2013-04-20 22:51:55 +02:00
Marvin Löbel
4357cbf2fa
Made unsafely safe functions unsafe again, for safety
2013-04-20 22:51:55 +02:00
Marvin Löbel
276293af7c
Cleaned up case related functions a bit
2013-04-20 22:51:55 +02:00
Matthijs Hofstra
51a68eb9b1
Replaced many instances of reinterpret_cast with transmute
2013-04-20 22:05:50 +02:00
Alex Crichton
98dfeb173f
core: clean up tests (mostly unused unsafe blocks)
2013-04-19 23:23:23 -04:00
Patrick Walton
c995a62d44
librustc: WIP patch for using the return value.
2013-04-19 12:00:08 -07:00
Patrick Walton
4c29b4cb93
librustc: Optimize metadata::decoder::item_name.
2013-04-19 11:53:33 -07:00
Huon Wilson
8ae6b33ed0
libcore: clarify documentation for char_at(_reverse)
2013-04-19 22:30:49 +10:00
Huon Wilson
c967f2bb1e
core: add a str iterator
2013-04-18 22:56:21 +10:00
Alex Crichton
d9595d1737
core: remove unnecessary unsafe blocks/functions
2013-04-14 01:15:46 -04:00
bors
76f6606a8c
auto merge of #5827 : nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton
...
See #5656 for details.
r? @pcwalton
2013-04-12 15:14:24 -07:00
Marvin Löbel
4ad76e66aa
Add example for str::subslice_offset
2013-04-11 00:48:31 +02:00
Marvin Löbel
9a16179fd3
Added str::from_slice_with_null() to cast a &[u8] to &str
...
Added str::subslice_offset()
Renamed slice_bytes_uniqe to slice_bytes_owned
2013-04-11 00:36:28 +02:00
Niko Matsakis
3322595e89
Reason about nested free variables that appear in a function
...
signature. In a nutshell, the idea is to (1) report an error if, for
a region pointer `'a T`, the lifetime `'a` is longer than any
lifetimes that appear in `T` (in other words, if a borrowed pointer
outlives any portion of its contents) and then (2) use this to assume
that in a function like `fn(self: &'a &'b T)`, the relationship `'a <=
'b` holds. This is needed for #5656 . Fixes #5728 .
2013-04-10 07:52:46 -07:00
Alex Crichton
255193cc1a
Removing no longer needed unsafe blocks
2013-04-08 17:50:25 -04:00
Matthijs Hofstra
c16919d3a8
Removing mut fields from vec.rs, at_vec.rs, str.rs, unstable.rs, and cell.rs.
2013-04-03 16:33:23 +02:00
Marvin Löbel
df66e8d4a1
Fix underflow in char_range_at_reverse
...
Added char_range_at_reverse underflow test
2013-03-31 10:03:52 +02:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
Marvin Löbel
eac2f3b93e
Unbreak 'rustc --help'
2013-03-28 21:44:46 +01:00
Daniel Micay
d2b267bcb5
add a TotalEq trait
2013-03-27 17:29:10 -04:00
Patrick Walton
f41a510631
librustc: Remove obsolete syntax
2013-03-26 21:30:18 -07:00
Patrick Walton
8b56a8380b
librustc: Modify all code to use new lifetime binder syntax
2013-03-26 21:30:17 -07:00
Patrick Walton
0d52b22e7b
libcore: Change [const T]
to const [T]
everywhere
2013-03-26 21:29:33 -07:00
Marvin Löbel
de468c8cd2
Added more missing lifetime annotations
2013-03-26 19:07:14 +01:00
Marvin Löbel
c88a20d171
Added missing lifetime annotations, doc and whitespace cleanups
2013-03-26 16:24:15 +01:00
Marvin Löbel
06c371605b
Fixed all use sites and tests
2013-03-26 14:59:17 +01:00
Marvin Löbel
c99488b3a4
Isolated bug, static vector seems to behave differently than fixed sized one
2013-03-26 14:59:17 +01:00
Marvin Löbel
b9de2b5787
Switched over a bunch of splitting funktions to non-allocating iterators
2013-03-26 14:59:17 +01:00
Marvin Löbel
d74606ead6
pre-rebase commit
2013-03-26 14:59:17 +01:00
Marvin Löbel
624a685283
Moved float str buffer constants to the strconv module
2013-03-26 14:59:17 +01:00