Huon Wilson
4b18fff2be
std: convert str::{map,levdistance,subslice_offset} to methods.
...
The first two become map_chars and lev_distance. Also, remove a few
allocations in rustdoc.
2013-06-16 10:50:28 +10:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Huon Wilson
096f6f56a8
Use @str instead of @~str in libsyntax and librustc. Fixes #5048 .
...
This almost removes the StringRef wrapper, since all strings are
Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts
several things to be &'static str (the lint table and the intrinsics
table).
There are many instances of .to_managed(), unfortunately.
2013-06-13 10:20:52 +10: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
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
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
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
4b806b4d06
std: remove each_char* fns and methods from str, replaced by 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
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
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
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
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
John Clements
1537056982
just use TLS interner
2013-06-05 12:01:37 -07:00
John Clements
22d21ab4c2
rename repr to name
2013-06-05 12:01:37 -07:00
John Clements
d7638f9dba
change to newer macro escape mechanism, using uints in more places
2013-06-05 12:01:36 -07:00
Patrick Walton
8114d0e950
librustc: Disallow multiple patterns from appearing in a "let" declaration.
...
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04 21:45:42 -07:00
Patrick Walton
16086ecff7
libsyntax: Remove pub impl from the language
2013-06-04 21:45:42 -07:00
Erick Tryzelaar
23808efd11
syntax: move callee_id into the expr_ variants
2013-06-01 15:31:56 -07:00
Patrick Walton
5fb254695b
Remove all uses of pub impl. rs=style
2013-06-01 09:18:27 -07:00
bors
1dd5cd9731
auto merge of #6833 : fdr/rust/fix-warnings, r=Aatch
...
Fix a laundry list of warnings involving unused imports that glutted
up compilation output. There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.
2013-05-31 00:43:45 -07:00
Niko Matsakis
ce5fd30270
Fix parser test
2013-05-30 21:01:25 -04:00
Daniel Farina
aef1e10eba
Remove unnecessary 'use' forms
...
Fix a laundry list of warnings involving unused imports that glutted
up compilation output. There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.
2013-05-30 13:08:18 -07:00
Niko Matsakis
7a1a40890d
Remove copy bindings from patterns.
2013-05-30 15:20:36 -04:00
Björn Steinbrink
1720d9f663
Remove a bunch of unnecessary allocations and copies
2013-05-30 11:49:04 +02:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Patrick Walton
4e3d4b36dc
libsyntax: Stop parsing mutable fields
2013-05-29 19:04:51 -07:00
Patrick Walton
481d4ca43f
libsyntax: Make drop no longer a keyword
2013-05-29 19:04:50 -07:00
Seo Sanghyeon
8f80323f09
Remove unnecessary allocations flagged by lint
2013-05-28 03:14:44 +09:00