bors
baa649ede6
auto merge of #8027 : nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-1, r=pcwalton
...
Small step towards #4846 . r? @msullivan
2013-07-25 07:37:45 -07:00
Niko Matsakis
dc38e1616a
Generalize the ty::substs
struct so that it can represent
...
multiple lifetime parameters, and not just one. Also add an option
for erasing lifetimes, which makes trans code somewhat simpler
and cleaner.
2013-07-24 16:52:57 -04:00
Michael Sullivan
ffc879c2e4
Major rework of how calls to self and super methods work.
...
Eliminates method_super, method_self, and vtable_self, merging all of
them into the param cases.
Cloes #4396 . Closes #7301 .
2013-07-23 17:06:33 -07:00
Patrick Walton
88fe4ae09c
librustc: Remove the Copy
bound from the language.
2013-07-17 14:57:54 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
bors
1ee54a8617
auto merge of #7725 : msullivan/rust/default-methods, r=pcwalton
...
r?
2013-07-12 17:28:28 -07:00
Michael Sullivan
82ae2fa93a
Clean up Repr impls a bit so we can add generic impls for @ and ~.
2013-07-11 15:51:09 -07:00
Niko Matsakis
3b911816ec
Silence various warnings
2013-07-11 15:21:29 -04:00
Niko Matsakis
e706590e70
Port region inference code to use new graph
2013-07-11 14:37:45 -04:00
Niko Matsakis
4412df20ae
Add an identifier to TypeParameterDefs and use it to pretty print type parameters
2013-07-10 14:42:53 -04:00
Niko Matsakis
ef5c439fb0
Correct merge errors, broken tests
2013-07-01 20:43:55 -04:00
Niko Matsakis
9e6d5e152e
Defer reasoning about region relationships until after regionck.
...
This patch makes error handling for region inference failures more
uniform by not reporting *any* region errors until the reigon inference
step. This requires threading through more information about what
caused a region constraint, so that we can still give informative
error messages.
I have only taken partial advantage of this information: when region
inference fails, we still report the same error we always did, despite
the fact that we now know precisely what caused the various constriants
and what the region variable represents, which we did not know before.
This change is required not only to improve error messages but
because the region hierarchy is not in fact fully known until regionck,
because it is not clear where closure bodies fit in (our current
treatment is unsound). Moreover, the relationships between free variables
cannot be fully determined until type inference is otherwise complete.
cc #3238 .
2013-07-01 20:43:54 -04:00
Corey Richardson
71b1c6ab60
Warning cleanup
2013-06-29 11:20:04 -04:00
Corey Richardson
1662bd371c
Great renaming: propagate throughout the rest of the codebase
2013-06-29 11:20:02 -04:00
Patrick Walton
bb830558d1
librustc: Fix merge fallout and test cases.
2013-06-28 10:44:17 -04:00
Patrick Walton
d350981c0e
librustc: Change Const to Freeze in the compiler
2013-06-28 10:44:15 -04:00
Patrick Walton
607b91d5f9
librustc: Rename Owned to Send in the compiler
2013-06-28 10:44:07 -04:00
James Miller
6ad31ffb53
Warning police
2013-06-25 17:13:52 +12:00
Ben Blum
ba3f43e506
Fix pretty-printing builtin bounds on closures and traits
2013-06-23 17:54:25 -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
James Miller
761fc16c60
Fix-up PP Code to reflect new lifetime param syntax
2013-06-22 12:38:40 +12:00
James Miller
57a75374d6
Initial Type Refactoring done
2013-06-22 12:32:11 +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
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Michael Sullivan
8bbf83b62a
Clean up a handful of build warnings.
2013-06-06 12:14:41 -07:00
John Clements
04a691a511
token_to_ident takes argument by reference
2013-06-05 12:01:38 -07:00
John Clements
3203595471
interner just uses uints, not idents with syntax context
2013-06-05 12:01:38 -07:00
John Clements
ae02bf70e0
removed some interner fields
2013-06-05 12:01:38 -07:00
Erick Tryzelaar
23808efd11
syntax: move callee_id into the expr_ variants
2013-06-01 15:31:56 -07:00
Ben Blum
b8a53b5a4c
Add 'Sized' builtin kind; doesn't do anything yet
2013-05-30 21:41:41 -04:00
Björn Steinbrink
1720d9f663
Remove a bunch of unnecessary allocations and copies
2013-05-30 11:49:04 +02: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
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
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
bors
4e82610099
auto merge of #6487 : recrack/rust/vec_len, r=thestinger
...
Rename vec::len(var) to var.len()
```
libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax
test/auxiliary
test/bench
test/run-pass
```
2013-05-15 07:38:07 -07:00
Erick Tryzelaar
729708d112
rustc: rename ty::method to ty::Method and add ctor
2013-05-14 20:10:46 -07:00
Erick Tryzelaar
18f6a51d0a
rustc: rename ast::self_ty and related fields to explicit_self
2013-05-14 20:10:46 -07:00
Erick Tryzelaar
9c80cf548a
rustc: Remove ty::arg
2013-05-14 20:10:45 -07:00
Youngmin Yoo
a2a8596c3d
Rename vec::len(var) to var.len()
2013-05-15 11:05:28 +09:00
Niko Matsakis
dc2ca9d883
Refactor representation of bounds to separate out BuiltinBounds into
...
its own type. Use a bitset to represent built-in bounds. There
are several places in the language where only builtin bounds (aka kinds)
will be accepted, e.g. on closures, destructor type parameters perhaps,
and on trait types.
2013-05-09 11:39: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
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Niko Matsakis
418f991118
allover: numerous unused muts etc
2013-04-30 14:10:21 -04:00
Niko Matsakis
a896440ca1
new borrow checker (mass squash)
2013-04-30 06:59:32 -04:00