Niko Matsakis
979d3a54f9
Correct merge failures
2013-07-08 13:55:11 -04:00
Niko Matsakis
50e95ea481
Fix pretty printer, which was ignoring ref
in irrefutable patterns
2013-07-08 13:55:10 -04:00
James Miller
1fd735d3c1
Fix broken tests
2013-07-07 22:51:10 +12:00
James Miller
47eca2113c
De-share ast::Ty
2013-07-07 22:51:10 +12:00
James Miller
46a1f54666
De-manage OptVec<TyParamBounds>
2013-07-07 22:51:10 +12: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
62c83bb17b
De-manage Lifetime
2013-07-07 22:51:09 +12:00
James Miller
cd1b6c8979
De-managed ast::Path
2013-07-07 22:51:09 +12:00
James Miller
a69eb95233
Stop allocating view_items with @
2013-07-07 22:51:09 +12:00
Alex Crichton
8fe6fc11de
Change char::escape_{default,unicode} to take callbacks instead of allocating
...
strings
2013-06-30 09:19:02 -07:00
Alex Crichton
3bad7129eb
Remove mutability from unique boxes in the AST
2013-06-29 08:36:25 -07:00
Patrick Walton
a1531ed946
librustc: Remove the broken overloaded assign-ops from the language.
...
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
2013-06-28 10:44:16 -04:00
bors
a28f9ba526
auto merge of #7361 : brson/rust/incoming, r=brson
2013-06-27 01:04:33 -07:00
Ben Blum
21aeb0f6cf
Fix pretty-printing for bounded closures. Close #7333 .
2013-06-26 18:14:43 -04:00
Ben Blum
7b968783d7
Infer default static/Owned bounds for unbounded heap fns/traits ( #7264 )
2013-06-26 18:14:43 -04: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
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
Brian Anderson
c06ee9f7a7
Merge remote-tracking branch 'cmr/various-cleanup' into incoming
2013-06-24 15:11:36 -07:00
Alex Crichton
8fdc8f392c
Support foreign 'static mut' variables as well
2013-06-23 18:00:32 -07: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
Corey Richardson
116897fa6c
Remove ast::pure_fn
and all concept of pure
from the compiler
2013-06-21 18:10:56 -04: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
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
Huon Wilson
3a1e13c7a0
std: convert str::escape_* to methods.
2013-06-12 12:21:04 +10:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Huon Wilson
5a711ea7c3
clean-up unused import warnings
2013-06-10 23:15:01 +10:00
Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Daniel Micay
de367157b5
remove deprecated vec::{is_empty, len} functions
2013-06-08 23:19:30 -04:00
Alexei Sholik
e75572c879
Deduplicate words in code comments
2013-06-06 10:48:27 +03:00
John Clements
8dad2bb281
removed unused imports (and one unused argument)
2013-06-05 12:01:39 -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
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
Niko Matsakis
7a1a40890d
Remove copy bindings from patterns.
2013-05-30 15:20:36 -04:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Patrick Walton
4e3d4b36dc
libsyntax: Stop parsing mutable fields
2013-05-29 19:04:51 -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
Seo Sanghyeon
743e4b044c
Use static strings
2013-05-22 02:48:56 +09:00
Seo Sanghyeon
6b525ecbda
Take string slices
2013-05-22 02:32:29 +09: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
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
18f6a51d0a
rustc: rename ast::self_ty and related fields to explicit_self
2013-05-14 20:10:46 -07:00
Youngmin Yoo
a2a8596c3d
Rename vec::len(var) to var.len()
2013-05-15 11:05:28 +09:00
Alex Crichton
92d39fe4d5
syntax: Remove #[allow(vecs_implicitly_copyable)]
2013-05-14 12:24:43 -04:00
Marvin Löbel
04de8f852c
Fix cosmetics for fail!() calls
2013-05-14 16:36:24 +02: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
Alex Crichton
63c7e2f991
Remove the '<->' operator from the language
2013-05-10 22:51:06 -04:00
Björn Steinbrink
1393c3a3f4
Use a specialized string interner to reduce the need for owned strings
...
&str can be turned into @~str on demand, using to_owned(), so for
strings, we can create a specialized interner that accepts &str for
intern() and find() but stores and returns @~str.
2013-05-09 14:40:19 +02: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
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
Erick Tryzelaar
3e3e2f0025
allow parsing attributes on struct fields
2013-05-01 07:49:41 -07: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
Patrick Walton
670ab8ac36
librustc: Change labels to use the lifetime notation '
.
2013-04-29 14:30:57 -07:00
Patrick Walton
f30f54e9d0
librustc: Remove the concept of modes from the compiler.
...
This commit does not remove `ty::arg`, although that should be
possible to do now.
2013-04-29 14:30:55 -07:00
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00
bors
b8441ca8a6
auto merge of #6007 : pcwalton/rust/use-mod, r=brson
...
r? @brson
2013-04-22 18:36:50 -07:00
Patrick Walton
25129ee81c
librustc: Remove use mod
from the language
2013-04-22 12:32:59 -07:00
Alex Crichton
fd97cac251
syntax: remove unused 'mut' variables
2013-04-20 21:03:24 -04:00
Alex Crichton
3c7aea3a6a
syntax: de-mode and prepare for de-modeing rustc
2013-04-19 23:21:52 -04:00
Huon Wilson
d3be98e9f5
libcore,std,syntax,rustc: move tests into mod tests
, make them private (no pub mod or pub fn).
2013-04-16 09:57:47 +10:00
bors
76f6606a8c
auto merge of #5827 : nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton
...
See #5656 for details.
r? @pcwalton
2013-04-12 15:14:24 -07:00
Niko Matsakis
49de82cdca
Issue #5656 : Make &self not mean "&'self self"
...
Fixes #5656 .
Fixes #5541 .
2013-04-10 17:32:02 -07:00
Erick Tryzelaar
74807b1594
syntax: match variants use 4 space indent by default
2013-04-10 16:08:22 -07:00
John Clements
48e7bda826
path -> Path
2013-04-10 09:15:04 -07:00
Niko Matsakis
d28f734412
Refactor so that references to traits are not represented using a type with a
...
bare function store (which is not in fact a kind of value) but rather
ty::TraitRef. Removes many uses of fail!() and other telltale signs of
type-semantic mismatch.
cc #4183 (not a fix, but related)
2013-04-05 05:36:02 -04:00
Brian Anderson
e3327d3833
Fix warnings
2013-03-31 20:22:47 -07:00
Niko Matsakis
6965fe4bce
Add AbiSet and integrate it into the AST.
...
I believe this patch incorporates all expected syntax changes from extern
function reform (#3678 ). You can now write things like:
extern "<abi>" fn foo(s: S) -> T { ... }
extern "<abi>" mod { ... }
extern "<abi>" fn(S) -> T
The ABI for foreign functions is taken from this syntax (rather than from an
annotation). We support the full ABI specification I described on the mailing
list. The correct ABI is chosen based on the target architecture.
Calls by pointer to C functions are not yet supported, and the Rust type of
crust fns is still *u8.
2013-03-29 18:36:20 -07:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
bors
f81459211d
auto merge of #5593 : luqmana/rust/inline-asm, r=catamorphism
...
Clean things up a bit. Also, allow selecting intel syntax in addition to the default AT&T dialect.
2013-03-28 18:18:46 -07:00
Patrick Walton
0a002d79b4
librustc: Remove common fields and nested enums from the language
2013-03-28 11:30:01 -07:00
bors
84ddff3909
auto merge of #5578 : erickt/rust/incoming, r=jbclements,erickt
...
Hey folks,
This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code:
```
enum A {
B,
C(~str, uint)
}
```
and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html ). I've added tests to make sure all this work.
In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing.
I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572 ), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27 21:51:53 -07:00
Luqman Aden
203d691a6b
libsyntax: use a struct for inline asm in ast.
2013-03-27 15:41:58 -07:00
bors
995425badb
auto merge of #5558 : nikomatsakis/rust/issue-4920-autoref-index-operator, r=nikomatsakis
...
Per discussion on IRC.
r? @pcwalton
2013-03-27 13:27:58 -07:00
Niko Matsakis
2a74fda316
Fix pretty-printer test failure by carrying the bound lifetime names through
...
the types. Initially I thought it would be necessary to thread this data
through not only the AST but the types themselves, but then I remembered that
the pretty printer only cares about the AST. Regardless, I have elected to
leave the changes to the types intact since they will eventually be needed. I
left a few FIXMEs where it didn't seem worth finishing up since the code wasn't
crucial yet.
2013-03-27 11:35:04 -07:00
Erick Tryzelaar
83e831bc22
syntax: Remove deprecated expr_vstore_fixed
2013-03-27 07:04:16 -07:00
Erick Tryzelaar
7a199d41a9
syntax: fix pretty printing __log stmts
2013-03-27 07:04:15 -07:00
Erick Tryzelaar
bd77e9433f
syntax: pass some values around by reference
2013-03-27 07:01:45 -07:00
Niko Matsakis
aa67deff33
remove sty_by_ref, though traces still remain due to dtors
2013-03-27 07:09:16 -04:00
Seo Sanghyeon
585c57234f
rustdoc: Show purity
2013-03-25 15:02:42 +09:00
Patrick Walton
8aee0a6a29
libsyntax: Fix static
in pretty printer. rs=burningtree
2013-03-23 10:28:24 -07:00
Patrick Walton
85c9fc6f8f
librustc: Remove the const
declaration form everywhere
2013-03-22 22:24:35 -07:00
bors
e9b077c0e9
auto merge of #5488 : pcwalton/rust/depure, r=pcwalton
2013-03-22 13:00:56 -07:00
Patrick Walton
e7c60c141b
librustc: Remove pure
from libsyntax and librustc.
2013-03-22 12:57:27 -07:00
bors
b6f9aa1fd7
auto merge of #5483 : pcwalton/rust/static-syntax, r=graydon
...
r? @nikomatsakis
2013-03-22 11:21:48 -07:00
Andrew Paseltiner
e2abecd3ab
syntax: replace uses of old deriving attribute with new one
2013-03-22 06:30:59 -04:00
Patrick Walton
94327d00c6
librustc: Replace the &static
bound with 'static
2013-03-21 17:31:35 -07:00