Felix S. Klock II
ecef9ad75a
Visitor refactoring: Step 1, couple (Env, vt<Env>) together in a tuple.
2013-06-12 13:04:37 +02:00
Luqman Aden
aa9a992f3e
libsyntax: Remove duplicate methods.
2013-06-12 02:46:38 -04:00
Huon Wilson
3a1e13c7a0
std: convert str::escape_* to methods.
2013-06-12 12:21:04 +10:00
Huon Wilson
efc71a8bdb
std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume]().
...
The first acts on &str and is not nul-terminated, the last two act on strings
that are always null terminated (&'static str, ~str and @str).
2013-06-12 12:21:04 +10:00
Huon Wilson
96cd61ad03
std: convert {vec,str}::to_owned to methods.
2013-06-12 12:21:03 +10:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Philipp Brüschweiler
1ac90bb74b
lexer: show correct span on unrecognized token start
...
Fixes part of #7048 .
2013-06-11 11:44:53 +02:00
Huon Wilson
e8782eeb63
fix tests, remove some warnings
2013-06-11 02:34:14 +10:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
5a711ea7c3
clean-up unused import warnings
2013-06-10 23:15:01 +10:00
Huon Wilson
ec5a028ada
std: convert str::char_at* to methods.
2013-06-10 23:02:55 +10:00
Huon Wilson
1553874149
std: convert str::reserve* to methods, and methodise str::push_*.
2013-06-10 23:02:55 +10:00
Huon Wilson
7281fb948a
std: replace str::{any,all}_between with the iterator equivalent.
2013-06-10 23:02:54 +10:00
Huon Wilson
0cfc08d81e
std: convert character-based str::find_* to methods. Add .slice_{to,from} methods.
2013-06-10 23:02:54 +10:00
Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Huon Wilson
b29cd22bce
std: replace str::all/any fns and methods with iterators
2013-06-10 23:02:54 +10:00
Huon Wilson
1e8982bdb2
std: replace str::each_split* with an iterator
2013-06-10 23:02:54 +10:00
Daniel Micay
de367157b5
remove deprecated vec::{is_empty, len} functions
2013-06-08 23:19:30 -04:00
bors
878a9b92eb
auto merge of #7004 : dotdash/rust/allocs, r=thestinger
...
This removes some unnecessary allocations in the lexer, the typechecker and the metadata decoder. Reduces the time spent in the parsing and typechecking passes by about 10% for me.
2013-06-08 13:37:10 -07:00
Huon Wilson
98ba91f81b
remove unused import warnings
2013-06-09 02:22:23 +10:00
Huon Wilson
00f5916809
std: replace the str::each* fns/methods with byte iterators
2013-06-09 02:22:23 +10:00
Huon Wilson
4b806b4d06
std: remove each_char* fns and methods from str, replaced by iterators.
2013-06-09 02:22:23 +10:00
Huon Wilson
513d2292e5
std: remove foldr and alli methods in vec
2013-06-09 02:22:23 +10:00
Huon Wilson
ed299af625
std: remove fold[lr] in favour of iterators
2013-06-09 02:22:23 +10:00
Björn Steinbrink
43cae88079
Lexer: Fix offset handling in get_str_from()
...
As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
2013-06-08 03:24:47 +02:00
Björn Steinbrink
de1df3608b
Lexer: Avoid unnecessary allocations
2013-06-08 03:24:47 +02:00
Björn Steinbrink
b870477897
Avoid unnecessary (re-)allocations in the lexer
2013-06-08 03:24:47 +02:00
Huon Wilson
54d914a9a9
std: remove each[i]_mut functions, in favour of iterators.
2013-06-08 03:24:27 +10:00
Huon Wilson
f661a15b2b
std: remove vec::each2 and vec::each2_mut in favour of iterators
2013-06-08 01:20:47 +10:00
Huon Wilson
a965f4981a
syntax: correct the modifications to deriving(Ord) so that it works.
2013-06-07 22:36:57 +10:00
Huon Wilson
ebf7281b7b
syntax: rewrite deriving(Ord) to not require Eq.
...
lt and gt are implement directly in terms of the corresponding
method on their elements, and le and ge are the negations of these.
2013-06-07 18:36:16 +10:00
Huon Wilson
6d5beda677
syntax: move expand_generic_deriving to be a method on TraitDef
2013-06-07 17:46:44 +10:00
Huon Wilson
43e52e4bf1
syntax: move functions from deriving/mod to deriving/generic.
...
These are now only called in generic and can be private. This
includes manually inlining/merging some that are called once.
2013-06-07 17:30:38 +10:00
bors
d6b4fde97e
auto merge of #6982 : Aatch/rust/better-foreign-error, r=pcwalton
...
I encountered this. A straight fail is not useful and most people aren't going to happily spelunk in `parser.rs`
2013-06-06 16:52:36 -07:00
James Miller
9c8d0e375e
Provide an actual error when expanding macros to foreign items
2013-06-07 11:28:38 +12:00
John Clements
eff49fc48b
implement fold traversing macros
2013-06-06 14:21:07 -07:00
John Clements
2d59ebadb9
add test cases for fold traversing macros
2013-06-06 14:21:07 -07:00
Michael Sullivan
8bbf83b62a
Clean up a handful of build warnings.
2013-06-06 12:14:41 -07:00
Alexei Sholik
e75572c879
Deduplicate words in code comments
2013-06-06 10:48:27 +03:00
John Clements
91b652695b
moved TLS of sctable to ast_util, hid parameter in hygiene calls
2013-06-05 12:01:40 -07:00
John Clements
fe6baa9023
added fresh-name fn
2013-06-05 12:01:40 -07:00
John Clements
5a158f1d19
add hygiene support functions
2013-06-05 12:01:40 -07:00
John Clements
ecdb6e4722
remove unused get_ident_interner's
2013-06-05 12:01:40 -07:00
John Clements
8dad2bb281
removed unused imports (and one unused argument)
2013-06-05 12:01:39 -07:00
John Clements
367eddf5b1
remove interner field from string_reader
2013-06-05 12:01:39 -07:00
John Clements
19cbd0d284
remove interner from tt_reader
2013-06-05 12:01:39 -07:00
John Clements
c88f337fc9
remove unused cx's
2013-06-05 12:01:39 -07:00
John Clements
04a691a511
token_to_ident takes argument by reference
2013-06-05 12:01:38 -07:00
John Clements
3203595471
interner just uses uints, not idents with syntax context
2013-06-05 12:01:38 -07:00
John Clements
ae02bf70e0
removed some interner fields
2013-06-05 12:01:38 -07:00