Commit Graph

637 Commits

Author SHA1 Message Date
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 ccd0ac59e9 std: remove str::{connect,concat}*. 2013-06-10 23:57:03 +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 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 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 1537056982 just use TLS interner 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
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
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
Seo Sanghyeon 8f80323f09 Remove unnecessary allocations flagged by lint 2013-05-28 03:14:44 +09:00
bors e2f8b51dc5 auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=brson
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date.

Closes #4219.
2013-05-25 15:13:54 -07:00
Björn Steinbrink 6c62d77830 Use an enum for keywords and intern them to improve parser performance
Currently, keywords are stored in hashsets that are recreated for every
Parser instance, which is quite expensive since macro expansion creates
lots of them. Additionally, the parser functions that look for a keyword
currently accept a string and have a runtime check to validate that they
actually received a keyword.

By creating an enum for the keywords and inserting them into the
ident interner, we can avoid the creation of the hashsets and get static
checks for the keywords.

For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
2013-05-25 17:57:22 +02:00
Alex Crichton 03ae629259 Remove the #[merge] hack from the parser 2013-05-24 15:32:06 -05:00
Erick Tryzelaar a4df35f2bc cleanup warnings from libsyntax 2013-05-23 17:57:07 -07:00
Patrick Walton f3723cf7c4 libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
Jihyun Yu 6c33f5044b Fix #6342 2013-05-22 16:11:48 +09:00
Seo Sanghyeon 9390cdaa8b Correct span for expr_vec 2013-05-21 19:08:34 +09:00
Alex Crichton 82fa0018c8 Remove all unnecessary allocations (as flagged by lint) 2013-05-20 16:10:40 -05:00
John Clements b621820dc4 detect unused attrs in one more place, allow parsing to continue for all
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
2013-05-20 11:49:20 -07:00
John Clements 05ab83eea8 parser comment 2013-05-20 11:49:20 -07:00
Steve Klabnik d3f70b141a Fix many warnings. 2013-05-19 21:32:32 -07:00
Niko Matsakis 035c01af93 Add BuiltinBounds to closure type: parse and handle subtyping,
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16 14:21:02 -04:00
bors 08b4cdd395 auto merge of #6499 : dotdash/rust/static_keywords, r=thestinger 2013-05-15 15:10:48 -07:00
bors 4e82610099 auto merge of #6487 : recrack/rust/vec_len, r=thestinger
Rename vec::len(var) to var.len()

```
libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax
test/auxiliary
test/bench
test/run-pass
```
2013-05-15 07:38:07 -07:00
Björn Steinbrink 109bb7c78b Allow static strings to be used with keyword checks 2013-05-15 08:01:04 +02:00
Erick Tryzelaar 18f6a51d0a rustc: rename ast::self_ty and related fields to explicit_self 2013-05-14 20:10:46 -07:00
Youngmin Yoo a2a8596c3d Rename vec::len(var) to var.len() 2013-05-15 11:05:28 +09:00
Alex Crichton ffcc680f9c Fix test fallout from removing vecs_implicitly_copyable 2013-05-14 12:25:19 -04:00
Alex Crichton 92d39fe4d5 syntax: Remove #[allow(vecs_implicitly_copyable)] 2013-05-14 12:24:43 -04:00
Patrick Walton db0693ac8d libsyntax: Tighten up expressions in patterns to only allow identifiers or literals (possibly with a minus).
This had very minimal fallout.
2013-05-12 16:35:19 -07:00
Patrick Walton 5d3559e645 librustc: Make self and static into keywords 2013-05-12 16:35:18 -07:00
Patrick Walton 06ef889cdc libsyntax: Remove extern mod foo { ... } from the language. 2013-05-12 16:33:15 -07:00
Alex Crichton 63c7e2f991 Remove the '<->' operator from the language 2013-05-10 22:51:06 -04:00
Lenny222 e3230330b7 back-ticks 2013-05-09 15:46:32 +02:00
Patrick Walton 49a66a5c5a librustc: Stop parsing modes and remove them entirely from the language 2013-05-08 17:04:01 -07:00
Patrick Walton db4573a776 librustc: Remove mutable fields from the language.
They're still parsed though, to get through bootstrapping.
2013-05-08 17:04:00 -07:00