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
bors
7b2020f2c3
auto merge of #6245 : youknowone/rust/match-range-static, r=graydon
...
Fix unintended error problem of:
````
static s: int = 1;
static e: int = 42;
fn main() {
match 7 {
s..e => (),
^~ error: expected `=>` but found `..`
_ => (),
}
}
````
2013-05-07 00:18:37 -07:00
Niko Matsakis
6c0c3a44bd
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
2013-05-06 09:00:50 -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
bors
6e6a4be19d
auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiyn
2013-05-05 11:12:37 -07:00
Seo Sanghyeon
aca2a00fb4
Fix span tests
2013-05-06 03:09:19 +09:00
Jeong YunWon
cb918e1a83
Allow non-literal static range pattern for match arms
...
Fix unintended error problem of:
static s: int = 1;
static e: int = 42;
fn main() {
match 7 {
s..e => (),
^~ error: expected `=>` but found `..`
_ => (),
}
}
2013-05-05 11:05:06 +09:00
bors
1f65e4a1d5
auto merge of #6230 : thestinger/rust/whitespace, r=catamorphism
...
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).
2013-05-04 00:48:37 -07:00
Daniel Micay
86efd97a10
add gitattributes and fix whitespace issues
2013-05-03 20:01:42 -04:00
Tim Chevalier
1a5f11a11b
syntax: Warning police
2013-05-03 16:56:34 -07:00
Patrick Walton
dc5df61bc1
librustc: Update the serializer to work properly with INHTWAMA, removing mutable fields in the process
2013-05-02 17:00:51 -07:00
Seo Sanghyeon
a0d8873097
More accurate spans
2013-05-03 02:36:24 +09:00
Jeong YunWon
35b91e2f73
Use static strings
2013-05-03 01:41:09 +09:00
Felix S. Klock II
9862cf703b
More cases of [cfg(test)] instead of [test].
2013-05-02 08:55:08 +02:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Niko Matsakis
5f886342be
syntax: fix up dynamic borrow errors in libsyntax
2013-05-01 21:50:32 -04:00
bors
55fbc47af1
auto merge of #6148 : erickt/rust/remove-drop, r=pcwalton
...
The drop block has been deprecated for quite some time. This patch series removes support for parsing it and all the related machinery that made drop work.
As a side feature of all this, I also added the ability to annote fields in structs. This allows comments to be properly associated with an individual field. However, I didn't update `rustdoc` to integrate these comment blocks into the documentation it generates.
2013-05-01 09:18:59 -07:00
Erick Tryzelaar
e9688fcfe3
remove some warnings
2013-05-01 07:49:41 -07:00
Erick Tryzelaar
5fee32457f
syntax: remove parse::token::{dtor,literally_dtor}
2013-05-01 07:49:41 -07: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
Erick Tryzelaar
7d6d0029ba
syntax: remove parsing destructors
2013-05-01 07:49:41 -07:00
Niko Matsakis
84861101ec
rustc: print out filename/line-number when a borrow fails
2013-05-01 09:14:47 -04:00
Brendan Zabarauskas
ee26c7c433
Revert rename of Div to Quot
2013-05-01 15:40:05 +10:00
Niko Matsakis
418f991118
allover: numerous unused muts etc
2013-04-30 14:10:21 -04:00
Patrick Walton
78f33437b6
libstd: Fix merge fallout.
2013-04-29 14:30:57 -07: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
John Clements
41af279233
parser comments
2013-04-28 09:51:16 -07:00
John Clements
2985f74ff3
s/one_tuple/trailing_comma (more accurate name)
2013-04-28 09:51:16 -07:00
John Clements
aa346401ba
removed unneeded argument to parse_record
2013-04-28 09:51:16 -07:00
John Clements
d2aee7b3e6
s/parse_purity/parse_unsafety
2013-04-28 09:51:16 -07:00
John Clements
1abc1be81a
remove 3-line used-once function
2013-04-28 09:51:16 -07:00
John Clements
7ef92ba246
rename parse_instance_var to parse_name_and_ty
...
the name no longer made sense. perhaps this could just be inlined.
2013-04-28 09:51:15 -07:00
John Clements
2a74c58588
remove obsolete semicolon from list of suggestions
2013-04-28 09:51:15 -07:00
John Clements
915e76a974
rename parse_single_class_item as well
2013-04-28 09:51:15 -07:00
John Clements
968089e422
rename parse_class_item to parse_struct_decl_field
...
two problems with the old name: they're not called classes any more, and
the word "item" has a specific connotation in the parser
2013-04-28 09:51:15 -07:00
John Clements
b82724db22
needs_comma was always true
2013-04-28 09:51:15 -07:00
John Clements
703390150a
fix for parsing x() as identifier pattern
2013-04-28 09:51:15 -07:00
John Clements
5119597dc6
hard to read the implied double negative
2013-04-28 09:51:15 -07:00
John Clements
3c10a9412e
remove unused functions, fix tiny lexing bug
...
before this change, the parser would parse 14.a() as a method call, but
would parse 14.ø() as the floating-point number 14. followed by a function
call. This is because it was checking is_alpha, rather than ident_start,
and was therefore wrong with respect to unicode.
2013-04-28 09:51:15 -07:00
John Clements
5411cbf656
remove unused flag to parse_local fn
2013-04-28 09:51:14 -07:00
John Clements
63397b8519
remove unused RESTRICT_NO_CALL_EXPRS restriction
2013-04-28 09:51:14 -07:00
John Clements
2733a1f14b
undo abstraction over whether to parse attrs in a block
...
In principle, it seems like a nice idea to abstract over the two
functions that parse blocks (one with inner attrs allowed, one not).
However, the existing one wound up making things more complex than
just having two separate functions, especially after the obsolete
syntax is (will be) removed.
2013-04-28 09:51:14 -07:00
John Clements
ab03c1e422
refactoring to split foreign_items from items
2013-04-28 09:51:14 -07:00
John Clements
fa5ba17c89
parser comments
...
parser comments
2013-04-28 09:51:14 -07:00
John Clements
1b4ced8bcb
get rid of prec.rs
...
prec.rs no longer had much to do with precedence; the token->binop
function fits better in token.rs, and the one-liner defining the
precedence of 'as' can go next to the other precedence stuff in
ast_util.rs
2013-04-28 09:51:14 -07:00
John Clements
9f8d30a128
reindent in parser
2013-04-28 09:49:21 -07:00
John Clements
a818648aa9
remove unnecessary function
2013-04-28 09:49:20 -07:00
John Clements
71c0bd5c5d
simplify, based on invariant that items_allowed != foreign_items_allowed
2013-04-28 09:49:20 -07:00