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
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
5fb254695b
Remove all uses of pub impl
. rs=style
2013-06-01 09:18:27 -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
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
Corey Richardson
cc57ca012a
Use assert_eq! rather than assert! where possible
2013-05-19 08:16:02 -04:00
Youngmin Yoo
a2a8596c3d
Rename vec::len(var) to var.len()
2013-05-15 11:05:28 +09: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
Patrick Walton
5d3559e645
librustc: Make self
and static
into keywords
2013-05-12 16:35:18 -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
Niko Matsakis
0ef4e860da
Replace NOTE with FIXME
2013-05-06 14:02:28 -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
Daniel Micay
86efd97a10
add gitattributes and fix whitespace issues
2013-05-03 20:01:42 -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
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00
Alex Crichton
1e4a439f7f
rustc: de-mode + fallout from libsyntax changes
2013-04-19 23:23:23 -04:00
Niko Matsakis
49de82cdca
Issue #5656 : Make &self not mean "&'self self"
...
Fixes #5656 .
Fixes #5541 .
2013-04-10 17:32:02 -07:00
Niko Matsakis
3322595e89
Reason about nested free variables that appear in a function
...
signature. In a nutshell, the idea is to (1) report an error if, for
a region pointer `'a T`, the lifetime `'a` is longer than any
lifetimes that appear in `T` (in other words, if a borrowed pointer
outlives any portion of its contents) and then (2) use this to assume
that in a function like `fn(self: &'a &'b T)`, the relationship `'a <=
'b` holds. This is needed for #5656 . Fixes #5728 .
2013-04-10 07:52:46 -07:00
Niko Matsakis
5606fc0c90
Revert map.each to something which takes two parameters
...
rather than a tuple. The current setup iterates over
`BaseIter<(&'self K, &'self V)>` where 'self is a lifetime declared
*in the each method*. You can't place such a type in
the impl declaration. The compiler currently allows it,
but this will not be legal under #5656 and I'm pretty sure
it's not sound now.
2013-04-10 07:51:48 -07:00
Niko Matsakis
007abe9352
Rather than storing a list of ty::method per trait, store one ty::method
...
per method and list of def-ids per trait.
2013-04-05 05:36:02 -04:00
Daniel Micay
cc148b58ff
rename Linear{Map,Set} => Hash{Map,Set}
2013-04-03 10:30:36 -04:00
Daniel Micay
44029a5bbc
hashmap: rm linear namespace
2013-04-03 10:30:18 -04:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
6f812fef1b
rustc: Remove uses of oldmap::HashMap
2013-03-26 19:21:04 -04:00
Andrew Paseltiner
9966eaaba4
rustc: replace uses of old deriving attribute with new one
2013-03-22 06:24:19 -04:00
Patrick Walton
e78f2e2ac5
librustc: Make the compiler ignore purity.
...
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.
There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 17:21:16 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Niko Matsakis
7cbd4b20ee
Remove @ast::Region and replace with @ast::Lifetime.
...
Modify pretty-printer to emit lifetimes and fix a few minor
parser bugs that this uncovered.
2013-03-09 19:43:59 -05:00
Alex Crichton
2a72099063
rustc: Remove uses of DVec
2013-03-08 09:54:20 -05:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
Patrick Walton
4e3dbfe052
librustc: Remove structural record types from the compiler
2013-03-07 22:32:54 -08:00
Patrick Walton
239e64242c
libsyntax: Stop parsing structural record types
2013-03-07 22:32:52 -08:00
Niko Matsakis
cbfd88a486
Update region inference for traits so that a method with
...
explicit self doesn't incorrectly cause the entire trait to
be tagged as being region-parameterized.
Fixes #5224 .
2013-03-05 08:46:23 -05:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00
Erick Tryzelaar
3953bdd812
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-28 07:25:31 -08:00
Niko Matsakis
c623d21e38
Introduce lifetime declarations into the lists of type parameters.
...
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;
cc #4846
2013-02-27 19:42:09 -05:00
Erick Tryzelaar
f14409c528
libsyntax: progress on making syntax::visit vecs_implicitly_copyable-free
2013-02-25 07:49:34 -08:00
Erick Tryzelaar
9ac5262bdf
libsyntax: convert visit to pass ty_params by reference
2013-02-25 07:27:01 -08:00
Daniel Micay
a32c5c73ee
oldmap: get rid of legacy _ref suffixes
2013-02-08 19:12:51 -05:00
Patrick Walton
472797b04a
librustc: Lots of de-muting. rs=demuting
2013-02-07 16:17:39 -08:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00
Patrick Walton
801f3225b2
oldmap: use &K instead of K in find and get
...
This reverts commit a4250a96fd
.
This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd
Revert "oldmap: use &K instead of K in find and get"
...
This reverts commit 8e643525d4
.
2013-02-05 14:30:53 -08:00
Daniel Micay
8e643525d4
oldmap: use &K instead of K in find and get
2013-02-03 23:30:56 -05:00
Daniel Micay
81b4f36d49
oldmap: remove legacy each method
2013-02-03 15:55:11 -05:00