Eduard Burtescu
15ba0c310a
Demote self to an (almost) regular argument and remove the env param.
...
Fixes #10667 and closes #10259 .
2014-01-27 14:31:24 +02:00
Niko Matsakis
8f16356e5f
Extend temporary lifetimes if there is a ref in an enum binding
...
too.
Previously I had omitted this case since function calls don't get the same
treatment on the RHS, but it's different on the pattern and is more consistent
-- the goal is to identify `let` statements where `ref` bindings create
interior pointers.
2014-01-17 08:10:42 -05:00
Niko Matsakis
6badef49fe
Remove FIXMEs and add license
2014-01-15 19:44:38 -05:00
Niko Matsakis
419ac4a1b8
Issue #3511 - Rationalize temporary lifetimes.
...
Major changes:
- Define temporary scopes in a syntax-based way that basically defaults
to the innermost statement or conditional block, except for in
a `let` initializer, where we default to the innermost block. Rules
are documented in the code, but not in the manual (yet).
See new test run-pass/cleanup-value-scopes.rs for examples.
- Refactors Datum to better define cleanup roles.
- Refactor cleanup scopes to not be tied to basic blocks, permitting
us to have a very large number of scopes (one per AST node).
- Introduce nascent documentation in trans/doc.rs covering datums and
cleanup in a more comprehensive way.
2014-01-15 18:34:38 -05:00
Eduard Burtescu
6b221768cf
libsyntax: Renamed types, traits and enum variants to CamelCase.
2014-01-09 22:25:28 +02:00
Eduard Burtescu
3119d18e55
Disowned the Visitor.
2014-01-06 14:00:46 +02:00
Patrick Walton
75c95e0960
librustc: De-@mut
the region maps
2013-12-26 15:54:34 -08:00
Patrick Walton
f759fe15a1
librustc: De-@mut
cleanup_scopes
in the region maps
2013-12-26 15:54:34 -08:00
Patrick Walton
0c3950d8a8
librustc: De-@mut
the free region map in the region maps
2013-12-26 15:54:33 -08:00
Patrick Walton
d5e32729c9
librustc: De-@mut
the scope map in the region maps
2013-12-26 15:54:33 -08:00
Seo Sanghyeon
5499b45323
Remove fk_anon
2013-12-12 23:01:47 +09:00
Eduard Burtescu
a9c4b18b18
Box Block, fn_decl, variant and Ty in the AST, as they were inflating critical enum sizes.
2013-12-01 00:00:39 +02:00
Alex Crichton
ab387a6838
Register new snapshots
2013-11-28 20:27:56 -08:00
Seo Sanghyeon
9028330f39
Take &Pat in visit_pat
2013-11-26 03:22:21 +09:00
Niko Matsakis
195f1d77bd
Rename and modernize region enum names
2013-11-08 19:47:57 -05:00
Niko Matsakis
9d3f57ef08
Introduce new variance inference pass that replaces (and generalizes) old
...
region-parameterization/variance inference. We now compute variance for
type parameters but do not make use of it (most of the way towards #3598 ).
2013-11-08 19:43:20 -05:00
Alex Crichton
daf5f5a4d1
Drop the '2' suffix from logging macros
...
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Daniel Micay
6a90e80b62
option: rewrite the API to use composition
2013-10-09 09:17:29 -04:00
Alex Crichton
1b80558be3
rustc: Remove usage of fmt!
2013-09-30 23:21:19 -07:00
Felix S. Klock II
339027ec15
Move unchanging portions of Context over to the Visitor.
2013-09-25 10:59:56 +02:00
Marvin Löbel
7419085337
Modernized a few more types in syntax::ast
2013-09-03 14:45:06 +02:00
Marvin Löbel
539f37925c
Modernized a few type names in rustc and syntax
2013-09-01 14:43:26 +02:00
Patrick Walton
3b6314c39b
librustc: Add support for type parameters in the middle of paths.
...
For example, `foo::<T>::bar::<U>`.
This doesn't enforce that the type parameters are in the right
positions, however.
2013-08-27 18:46:51 -07:00
Felix S. Klock II
6c15f21bd7
port region.rs from oldvisit to <V:Visitor> trait API.
2013-08-15 04:09:18 +02:00
Erick Tryzelaar
1e490813b0
core: option.map_consume -> option.map_move
2013-08-07 08:52:09 -07:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Patrick Walton
887c656970
librustc: Introduce a new visitor type based on traits and port syntax to it.
...
This is preparation for removing `@fn`.
This does *not* use default methods yet, because I don't know
whether they work. If they do, a forthcoming PR will use them.
This also changes the precedence of `as`.
2013-08-02 21:57:58 -07:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Michael Woerister
8a329770b6
New naming convention for ast::{node_id, local_crate, crate_node_id, blk_check_mode, ty_field, ty_method}
2013-07-29 16:16:48 +02:00
Michael Woerister
4bd1424622
Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.
...
`crate => Crate`
`local => Local`
`blk => Block`
`crate_num => CrateNum`
`crate_cfg => CrateConfig`
Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22 15:35:28 +02: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
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -04: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
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
Niko Matsakis
9d48a7d550
convert region_inference into a module, so I can attach docs
2013-07-01 20:43:54 -04:00
Corey Richardson
1662bd371c
Great renaming: propagate throughout the rest of the codebase
2013-06-29 11:20:02 -04:00
Philipp Brüschweiler
7295a6da92
Remove many shared pointers
...
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.
Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 15:06:19 +02:00
Daniel Micay
e67c48a591
remove each
from vec, HashMap and HashSet
2013-06-25 16:28:02 -04: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
49c74524e2
vec: rm old_iter implementations, except BaseIter
...
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.
This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Felix S. Klock II
91bced8ae8
Fix linebreak and whitespace issues to placate make tidy.
2013-06-12 19:16:30 +02:00
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
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
John Clements
ae02bf70e0
removed some interner fields
2013-06-05 12:01:38 -07:00