Patrick Walton
e20549ff19
librustc: Remove all uses of the Copy
bound.
2013-07-17 14:57:53 -07:00
Patrick Walton
99d44d24c7
librustc: Remove copy
expressions from the language.
2013-07-17 14:57:52 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Patrick Walton
b4e674f6e6
librustc: Add a lint mode for unnecessary copy
and remove a bunch of them.
2013-07-17 14:56:42 -07:00
Michael Woerister
0cc70743d2
Made ast::blk not use spanned<T> anymore.
2013-07-17 08:21:46 +02:00
Brendan Cully
202fcb29bd
unnecessarily mutable variables
2013-07-10 22:12:30 -07:00
John Barker
56d1987575
Don't use static default method
...
- also removed redundant assignment to is_mutbl
- updated copyright
2013-07-09 10:21:25 -04:00
John Barker
eaaf3f67ab
Always eat up mut when parsing general args, fixes #7483
2013-07-09 09:03:16 -04:00
Niko Matsakis
0c6d02f391
Correct merge errors
2013-07-08 13:55:11 -04:00
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -04:00
bors
0f2515583d
auto merge of #7615 : Aatch/rust/syntax-deshare, r=graydon
...
In an ideal world, the AST would be completely sendable, this gets us a step closer.
It removes the local heap allocations for `view_item`, `Path`, `Lifetime` `trait_ref` `OptVec<TyParamBounds>` and `Ty`. There are also a few other smaller changes I made as things went along.
2013-07-07 05:22:56 -07:00
James Miller
47eca2113c
De-share ast::Ty
2013-07-07 22:51:10 +12:00
James Miller
46a1f54666
De-manage OptVec<TyParamBounds>
2013-07-07 22:51:10 +12:00
James Miller
97c5a44d3e
De-share trait_ref
...
Also, makes the pretty-printer use & instead of @ as much as possible,
which will help with later changes, though in the interim has produced
some... interesting constructs.
2013-07-07 22:51:09 +12:00
James Miller
62c83bb17b
De-manage Lifetime
2013-07-07 22:51:09 +12:00
James Miller
cd1b6c8979
De-managed ast::Path
2013-07-07 22:51:09 +12:00
James Miller
a69eb95233
Stop allocating view_items with @
2013-07-07 22:51:09 +12:00
bors
d91ac39cd5
auto merge of #7585 : Blei/rust/fix-circular-modules, r=huonw
...
Fixes #7276
2013-07-07 03:40:59 -07:00
Seo Sanghyeon
30fca57f17
Change spans for sugary call expressions
2013-07-05 13:03:25 +09:00
Philipp Brüschweiler
3c5cfdf2e7
libsyntax: fix infinite loop when recursively including modules
...
Fixes #7276
2013-07-04 19:51:11 +02:00
Alex Crichton
3bad7129eb
Remove mutability from unique boxes in the AST
2013-06-29 08:36:25 -07:00
Patrick Walton
89eb995195
librustc: Fix merge fallout.
2013-06-28 10:44:16 -04:00
Patrick Walton
03ab6351cc
librustc: Rewrite reachability and forbid duplicate methods in type implementations.
...
This should allow fewer symbols to be exported.
2013-06-28 10:44:16 -04:00
Patrick Walton
a1531ed946
librustc: Remove the broken overloaded assign-ops from the language.
...
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
2013-06-28 10:44:16 -04:00
Patrick Walton
3fcd4dca30
libsyntax: Remove "copy" pattern bindings from the language
2013-06-28 10:44:16 -04:00
Patrick Walton
90ad444287
libsyntax: Fix merge fallout
2013-06-28 10:44:15 -04:00
Patrick Walton
f9b54541ee
librustc: Disallow "mut" from distributing over bindings.
...
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28 10:44:15 -04:00
Ben Blum
7b968783d7
Infer default static/Owned bounds for unbounded heap fns/traits ( #7264 )
2013-06-26 18:14:43 -04:00
bors
22408d9ad5
auto merge of #7269 : luqmana/rust/drop, r=thestinger
...
Finally rename finalize to drop.
Closes #4332 .
2013-06-25 20:29:06 -07:00
Luqman Aden
ca2966c6d0
Change finalize -> drop.
2013-06-25 21:14:39 -04:00
Corey Richardson
0d471d310d
great renaming propagation: syntax
2013-06-25 16:15:07 -04:00
bors
b11346bb5d
auto merge of #7291 : alexcrichton/rust/static-mut, r=huonw
...
This adds both `static mut` items and `static mut` foreign items. This involved changing far less code than I thought it was going to, but the tests seem to pass and the variables seem functional.
I'm more than willing to write more tests, so suggestions are welcome!
Closes #553
2013-06-25 01:59:05 -07:00
James Miller
6ad31ffb53
Warning police
2013-06-25 17:13:52 +12:00
Alex Crichton
8fdc8f392c
Support foreign 'static mut' variables as well
2013-06-23 18:00:32 -07:00
Alex Crichton
1841b31c61
Add 'static mut' items to the language
2013-06-23 17:59:35 -07:00
Ben Blum
ce857e3d60
Parse and typecheck (not kindcheck) bounds on trait paths.
2013-06-23 14:40:14 -04:00
Daniel Micay
d2e9912aea
vec: remove BaseIter implementation
...
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04: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
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
bors
7b2020f2c3
auto merge of #6245 : youknowone/rust/match-range-static, r=graydon
...
Fix unintended error problem of:
````
static s: int = 1;
static e: int = 42;
fn main() {
match 7 {
s..e => (),
^~ error: expected `=>` but found `..`
_ => (),
}
}
````
2013-05-07 00:18:37 -07:00
Niko Matsakis
6c0c3a44bd
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
2013-05-06 09:00:50 -04: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
bors
6e6a4be19d
auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiyn
2013-05-05 11:12:37 -07:00
Jeong YunWon
cb918e1a83
Allow non-literal static range pattern for match arms
...
Fix unintended error problem of:
static s: int = 1;
static e: int = 42;
fn main() {
match 7 {
s..e => (),
^~ error: expected `=>` but found `..`
_ => (),
}
}
2013-05-05 11:05:06 +09:00
Tim Chevalier
1a5f11a11b
syntax: Warning police
2013-05-03 16:56:34 -07:00
Seo Sanghyeon
a0d8873097
More accurate spans
2013-05-03 02:36:24 +09:00
Jeong YunWon
35b91e2f73
Use static strings
2013-05-03 01:41:09 +09:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Niko Matsakis
5f886342be
syntax: fix up dynamic borrow errors in libsyntax
2013-05-01 21:50:32 -04:00
bors
55fbc47af1
auto merge of #6148 : erickt/rust/remove-drop, r=pcwalton
...
The drop block has been deprecated for quite some time. This patch series removes support for parsing it and all the related machinery that made drop work.
As a side feature of all this, I also added the ability to annote fields in structs. This allows comments to be properly associated with an individual field. However, I didn't update `rustdoc` to integrate these comment blocks into the documentation it generates.
2013-05-01 09:18:59 -07:00
Erick Tryzelaar
3e3e2f0025
allow parsing attributes on struct fields
2013-05-01 07:49:41 -07:00
Erick Tryzelaar
c2e1f47955
rustc: remove the rest of drop
...
Removes:
ast::struct_def::dtor
syntax::ast::ii_dtor
syntax::visit::fk_dtor
syntax::ast_map::node_dtor
syntax:struct_dtor
2013-05-01 07:49:41 -07:00