Patrick Walton
e9ce855beb
librustc: De-@str
liveness
2014-02-02 01:44:49 +11:00
Scott Lawrence
a6867e259b
Removing support for the do syntax from libsyntax and librustc.
...
Fixes #10815 .
2014-01-29 09:15:42 -05:00
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
Chris Wong
988e4f0a1c
Uppercase numeric constants
...
The following are renamed:
* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`
Fixes #10010 .
2014-01-25 21:38:25 +13:00
Simon Sapin
05ae134ace
[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old from_utf8_owned() behavior
2014-01-21 15:48:48 -08:00
Simon Sapin
aa66b91767
[std::vec] Rename .last_opt() to .last(), drop the old .last() behavior
2014-01-21 15:48:46 -08:00
bors
9bf85a250c
auto merge of #11598 : alexcrichton/rust/io-export, r=brson
...
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered
private modules
* Remove with_mem_writer
* Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
cc #11119
2014-01-17 12:02:07 -08:00
Alex Crichton
295b46fc08
Tweak the interface of std::io
...
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered
private modules
* Remove with_mem_writer
* Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2014-01-17 10:00:47 -08:00
bors
9075025c7b
auto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakis
2014-01-14 12:32:11 -08:00
Florian Hahn
c74c854adc
Better error message for semicolon on the last line of a function
...
closes #8005
2014-01-13 19:45:34 +01:00
Eduard Burtescu
509fc92a9b
Removed remnants of @mut
and ~mut
from comments and the type system.
2014-01-12 02:26:04 +02:00
Brian Anderson
55f81bce83
rustc: Fix style of Lint enum
2014-01-09 18:46:23 -08:00
bors
ff3d5d4603
auto merge of #11055 : pcwalton/rust/placement-box, r=pcwalton
...
r? @nikomatsakis
2014-01-09 16:11:18 -08:00
Patrick Walton
e12711540a
librustc: Implement placement box
for GC and unique pointers.
2014-01-09 16:05:34 -08: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
Brian Anderson
3b1862a82f
Don't allow newtype structs to be dereferenced. #6246
2014-01-04 14:44:12 -08:00
klutzy
eaae0ac68a
rustc: Fix a borrow failure in .ln_str()
...
`ln_str` caused ICE if `RUST_LOG=rustc::middle::liveness` is given
due to borrow failure.
2013-12-29 02:47:12 +09:00
Patrick Walton
cc0584731a
librustc: De-@mut
the def map.
...
This is the last `@mut` in `librustc` that does not depend on libsyntax.
2013-12-26 15:54:37 -08:00
Patrick Walton
e4815b6c3f
librustc: De-@mut
the users
list in liveness
2013-12-26 15:54:37 -08:00
Patrick Walton
eaf69494a5
librustc: De-@mut
the loop scope in liveness
2013-12-26 15:54:36 -08:00
Patrick Walton
1a6c1e5d32
librustc: De-@mut
Liveness::successors
2013-12-26 15:54:36 -08:00
Patrick Walton
be67aceaeb
librustc: De-@mut
IrMaps
2013-12-26 15:54:31 -08:00
Patrick Walton
810177c787
librustc: De-@mut
IrMaps::lnks
2013-12-26 15:54:31 -08:00
Patrick Walton
bef2353e1b
librustc: De-@mut
IrMaps::var_kinds
2013-12-26 15:54:31 -08:00
Patrick Walton
bd08889d68
librustc: De-@mut
IrMaps::capture_info_map
2013-12-26 15:54:31 -08:00
Patrick Walton
30b8f8b913
librustc: De-@mut
IrMaps::variable_map
2013-12-26 15:54:30 -08:00
Patrick Walton
e5c399a83c
librustc: De-@mut
IrMaps::live_node_map
2013-12-26 15:54:30 -08:00
Patrick Walton
01ee2fb224
librustc: De-@mut
IrMaps::num_vars
2013-12-26 15:54:30 -08:00
Patrick Walton
4e9b8a742d
librustc: De-@mut
IrMaps::num_live_nodes
2013-12-26 15:54:30 -08:00
Patrick Walton
7b71ca3ef7
librustc: De-@mut
break_ln
and cont_ln
in liveness
2013-12-26 15:54:28 -08:00
Patrick Walton
dd745b388d
librustc: De-@mut
the capture map
2013-12-26 13:01:28 -08:00
Seo Sanghyeon
5499b45323
Remove fk_anon
2013-12-12 23:01:47 +09:00
Kiet Tran
1755408d1a
Remove dead codes
2013-12-08 02:55:28 -05: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
Patrick Walton
8ceb374ab7
librustc: Remove non-procedure uses of do
from librustc, librustdoc,
...
and librustpkg.
2013-11-26 08:25:00 -08:00
Patrick Walton
7e3f20133a
librustc: Change most uses of &fn()
to ||
.
2013-11-19 13:22:03 -08:00
Alex Crichton
49ee49296b
Move std::rt::io to std::io
2013-11-11 20:44:07 -08:00
Patrick Walton
7e77bf1769
librustc: Implement the proc
type as sugar for ~once fn
and proc
...
notation for closures, and disable the feature gate for `once fn` if
used with the `~` sigil.
2013-10-29 10:34:17 -07:00
Luqman Aden
12308db3d2
libsyntax/librustc: Allow mut qualifier in patterns.
2013-10-25 01:21:07 -04:00
Alex Crichton
61ed2cfb55
Remove even more of std::io
...
Big fish fried here:
extra::json
most of the compiler
extra::io_util removed
extra::fileinput removed
Fish left to fry
extra::ebml
2013-10-24 14:21:57 -07:00
Luqman Aden
af163579ed
libsyntax/librustc: Allow specifying mut on ~self.
2013-10-22 21:22:19 -04:00
Luqman Aden
5754848f8c
libsyntax/librustc: Allow specifying mut on by-value self.
2013-10-22 21:21:21 -04: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
Eduard Burtescu
7ab0b0cd41
Handle inline asm outputs as write-only in liveness, borrowck and trans.
2013-10-18 08:02:56 +03: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
1ce1aae282
Fold ErrorCheckVisitor into Liveness. Removed some @allocation.
2013-09-25 11:01:09 +02:00
John Clements
422cf1adc5
change type of ExprLoop and ExprBreak elts from ident->name.
...
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-10 14:12:54 -07:00
Alex Crichton
8a966183fe
Remove the __log function for __log_level
...
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.
Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
2013-09-05 01:48:20 -07:00
Marvin Löbel
7419085337
Modernized a few more types in syntax::ast
2013-09-03 14:45:06 +02:00
Marvin Löbel
857f867320
Renamed syntax::ast::ident -> Ident
2013-09-02 02:51:21 +02:00
Marvin Löbel
539f37925c
Modernized a few type names in rustc and syntax
2013-09-01 14:43:26 +02:00
Michael Sullivan
48a682398a
Don't ICE if an argument in a default method doesn't have a name. Closes #8417 .
2013-08-22 10:14:10 -07:00
Felix S. Klock II
9290721625
Ported liveness.rs from oldvisit to <V:Visitor> trait API.
2013-08-15 04:09:19 +02:00
Erick Tryzelaar
1e490813b0
core: option.map_consume -> option.map_move
2013-08-07 08:52:09 -07:00
Daniel Micay
e7bb33aed8
rm obsolete for
support from the compiler
2013-08-04 00:39:48 -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
234acad404
replace range
with an external iterator
2013-08-02 00:51:14 -04:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Daniel Micay
dabd476203
make in
and foreach
get treated as keywords
2013-08-01 00:21:13 -04:00
Graydon Hoare
c29e9fb60b
syntax: implement foreach .. in .. { .. } via desugaring.
2013-07-30 18:50:28 -07: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
5aee3e01a0
De-spanned<T> and renamed ast::field (now ast::Field)
2013-07-22 15:35:29 +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
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
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
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
James Miller
3bc4d1a120
Remove all #[cfg(stage0)]-protected code
...
New snapshot means this can all go. Also removes places that have
comments that say they are workarounds for stage0 errors.
2013-06-21 02:43:02 +12: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
513d2292e5
std: remove foldr and alli methods in vec
2013-06-09 02:22:23 +10:00
Alexei Sholik
e75572c879
Deduplicate words in code comments
2013-06-06 10:48:27 +03: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
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
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Niko Matsakis
5851d3242c
Move checking for moves and initialization of local variables and patterns into
...
borrow checker and generalize what moves are allowed. Fixes a nasty
bug or two in the pattern move checking code. Unifies dataflow code
used for initialization and other things. First step towards
once fns. Everybody wins.
Fixes #4384 . Fixes #4715 . cc once fns (#2202 ), optimizing local moves (#5016 ).
2013-05-28 20:22:14 -04: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
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
Alex Crichton
030c666cc1
Re-implement lint with less emphasis on item ids
...
This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted.
2013-05-17 00:49:16 -04:00
Erick Tryzelaar
18f6a51d0a
rustc: rename ast::self_ty and related fields to explicit_self
2013-05-14 20:10:46 -07:00
Patrick Walton
5d3559e645
librustc: Make self
and static
into keywords
2013-05-12 16:35:18 -07:00
Alex Crichton
63c7e2f991
Remove the '<->' operator from the language
2013-05-10 22:51:06 -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
Niko Matsakis
0b0b8018a6
add warning for #6248 and remove instances of it
2013-05-05 12:17:59 -04:00
Niko Matsakis
88ec89d3fe
fix numerous dynamic borrow failures
2013-05-02 14:32:37 -04:00
Seo Sanghyeon
4294aed01b
Use static strings
2013-05-02 10:36:30 +09: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
Niko Matsakis
a896440ca1
new borrow checker (mass squash)
2013-04-30 06:59:32 -04:00