Patrick Walton
7f816b7ef4
librustc: De-@mut
the idstack
in constant checking
2013-12-26 15:54:36 -08:00
Patrick Walton
f7393d8658
librustc: De-@mut
the method map
2013-12-26 15:54:32 -08: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
Corey Richardson
ed34cd1e3c
Better error message when using vectors in statics
...
Closes #10487
2013-11-17 18:35:52 -05:00
Florian Hahn
be09626148
Remove type overflow checks from check_const.rs, refs #4220
...
The checks are now handled by the linter
2013-11-12 19:35:55 +01: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
Benjamin Herr
9d7b130041
add new enum ast::StrStyle as field to ast::lit_str
...
For the benefit of the pretty printer we want to keep track of how
string literals in the ast were originally represented in the source
code.
This commit changes parser functions so they don't extract strings from
the token stream without at least also returning what style of string
literal it was. This is stored in the resulting ast node for string
literals, obviously, for the package id in `extern mod = r"package id"`
view items, for the inline asm in `asm!()` invocations.
For `asm!()`'s other arguments or for `extern "Rust" fn()` items, I just
the style of string, because it seemed disproportionally cumbersome to
thread that information through the string processing that happens with
those string literals, given the limited advantage raw string literals
would provide in these positions.
The other syntax extensions don't seem to store passed string literals
in the ast, so they also discard the style of strings they parse.
2013-10-08 03:43:28 +02:00
Alex Crichton
1b80558be3
rustc: Remove usage of fmt!
2013-09-30 23:21:19 -07:00
Felix S. Klock II
37481641b1
Fold env into CheckItemRecursionVisitor.
2013-09-25 11:01:43 +02:00
SiegeLord
8c5402fd36
Properly encode/decode structural variants.
2013-09-11 14:49:09 -04:00
Daniel Micay
62a3434529
stop treating char as an integer type
...
Closes #7609
2013-09-04 08:07:56 -04: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
bors
d597f54fc2
auto merge of #8539 : pnkfelix/rust/fsk-visitor-vpar-defaults-step2, r=graydon,nikomatsakis
...
r? @nikomatsakis
Follow up to #8527 (which was step 1 of 5). See that for overall description
Part of #7081
2013-08-19 06:52:03 -07:00
Felix S. Klock II
4127c67406
Ported check_const from oldvisit to <V:Visitor> trait API.
2013-08-15 04:06:17 +02:00
Luqman Aden
ccc85b1ac7
librustc: Allow vector repeat exprs in statics.
2013-08-13 03:36:21 -04: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
Kevin Mehall
1493141bfd
Add support for ..base
on static struct initializers.
2013-07-28 22:07:27 -04: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
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -04:00
James Miller
cd1b6c8979
De-managed ast::Path
2013-07-07 22:51:09 +12:00
bors
6fcd8bf567
auto merge of #7468 : cmr/rust/great_renaming, r=pcwalton
2013-06-30 01:19:38 -07:00
Alex Crichton
3bad7129eb
Remove mutability from unique boxes in the AST
2013-06-29 08:36:25 -07: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
Brian Anderson
5d3ca4b843
Merge remote-tracking branch 'mozilla/master' into incoming
...
Conflicts:
src/librustc/middle/astencode.rs
src/librustc/middle/check_const.rs
2013-06-25 19:32:00 -07:00
Brian Anderson
f48068657a
Merge remote-tracking branch 'sstewartgallus/cleanup_middle' into incoming
2013-06-24 15:10:50 -07:00
Alex Crichton
1841b31c61
Add 'static mut' items to the language
2013-06-23 17:59:35 -07: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
Steven Stewart-Gallus
0f55c9cc7e
Cleaned up middle a bit.
...
The only really tricky change is that a long chain of ifs, and elses
was turned into a single if, and a match in astencode.rs. Some methods
can only be called in certain cases, and so have to come after the if.
2013-06-22 18:58:41 -07: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
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
Erick Tryzelaar
23808efd11
syntax: move callee_id into the expr_ variants
2013-06-01 15:31:56 -07:00
Seo Sanghyeon
8f80323f09
Remove unnecessary allocations flagged by lint
2013-05-28 03:14:44 +09: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
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02: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
Niko Matsakis
0b0b8018a6
add warning for #6248 and remove instances of it
2013-05-05 12:17:59 -04:00
bors
b42ea7f9ef
auto merge of #6174 : sanxiyn/rust/static-string, r=brson
2013-05-01 22:06:37 -07:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Seo Sanghyeon
4294aed01b
Use static strings
2013-05-02 10:36:30 +09:00
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00