Michael Sullivan
a20081666b
Fix an unused variable warning and clean up some dead code/names.
2013-08-05 11:41:06 -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
Daniel Micay
ed67cdb73c
new snapshot
2013-07-22 01:09:48 -04:00
Felix S. Klock II
3b158b3e42
Silence various warnings in bootstrap build.
2013-07-18 09:35:12 +02:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00
Patrick Walton
e20549ff19
librustc: Remove all uses of the Copy
bound.
2013-07-17 14:57:53 -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
Alex Crichton
9fd2ac7428
Make TLS keys actually take up space
...
If the TLS key is 0-sized, then the linux linker is apparently smart enough to
put everything at the same pointer. OSX on the other hand, will reserve some
space for all of them. To get around this, the TLS key now actuall consumes
space to ensure that it gets a unique pointer
2013-07-14 10:15:07 -07:00
Alex Crichton
e3211fa1f1
Purge the last remnants of the old TLS api
...
Closes #3273
2013-07-14 09:29:12 -07:00
bors
1ee54a8617
auto merge of #7725 : msullivan/rust/default-methods, r=pcwalton
...
r?
2013-07-12 17:28:28 -07:00
bors
ad708139fe
auto merge of #7706 : sanxiyn/rust/qualification-lint, r=pcwalton
...
Fix #2551 .
Lint is off by default because I didn't bother to fix all of std and extra.
2013-07-12 05:46:42 -07:00
Michael Sullivan
186f6faf1e
Get cross crate static default methods working. Closes #7569 .
2013-07-11 15:51:10 -07:00
Alex Crichton
f9bf69d253
Remove all external requirements of @
from TLS
...
Closes #6004
2013-07-11 00:37:13 -07:00
Seo Sanghyeon
f81986031c
Add a lint to detect unnecessarily qualified names
2013-07-10 19:09:03 +09:00
Alex Crichton
cb5b9a477c
Rename local_data methods/types for less keystrokes
2013-07-09 17:39:49 -07:00
Jens Nockert
1aae28a57d
Replaces the free-standing functions in f32, &c.
...
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.
If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.
Note: If you were using a function that corresponds to an operator, use
the operator instead.
2013-07-08 18:05:17 +02: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
cd1b6c8979
De-managed ast::Path
2013-07-07 22:51:09 +12:00
Huon Wilson
de0d696561
Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by iterators.
2013-07-04 00:46:49 +10:00
Huon Wilson
c0a20d2929
Remove vec::{map, mapi, zip_map} and the methods, except for .map, since this
...
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
2013-06-30 21:59:44 +10:00
Alex Crichton
3bad7129eb
Remove mutability from unique boxes in the AST
2013-06-29 08:36:25 -07:00
Ben Blum
ff4ab9e147
'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable.
2013-06-29 04:39:34 -04:00
Ben Blum
75b80bad63
Use more deriving(IterBytes) in libsyntax.
2013-06-29 03:58:50 -04:00
Ben Blum
5784c0912f
Change taskgroup key type to fn:Copy in prep for noncopyable stack closures.
2013-06-29 03:58:50 -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
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
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
bors
e9ac7194ff
auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatch
...
Sets the stage for further cleanup (especially mass-slaughter of `@`)
2013-06-25 18:02:02 -07:00
Daniel Micay
5242e8d2ba
remove the redundant each
method from OptVec
2013-06-25 16:26:23 -04:00
Corey Richardson
0d471d310d
great renaming propagation: syntax
2013-06-25 16:15:07 -04: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
Graydon Hoare
d904c72af8
replace #[inline(always)] with #[inline]. r=burningtree.
2013-06-18 14:48:48 -07:00
Niko Matsakis
eb48c29681
Add copies to type params with Copy bound
2013-06-16 12:47:36 -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
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
Huon Wilson
e8782eeb63
fix tests, remove some warnings
2013-06-11 02:34:14 +10:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
98ba91f81b
remove unused import warnings
2013-06-09 02:22:23 +10:00
Huon Wilson
513d2292e5
std: remove foldr and alli methods in vec
2013-06-09 02:22:23 +10:00
John Clements
91b652695b
moved TLS of sctable to ast_util, hid parameter in hygiene calls
2013-06-05 12:01:40 -07:00