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
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
Tim Chevalier
1a5f11a11b
syntax: Warning police
2013-05-03 16:56:34 -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
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
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
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
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
John Clements
ae4e09f71a
adding parse_path
2013-04-28 09:49:20 -07:00
John Clements
28b285764c
comments, helper function for tests, more informative error message
2013-04-28 09:49:20 -07:00
John Clements
50a7f5483b
refactor parse_fn_decl
2013-04-28 09:49:20 -07:00
John Clements
2b7f1a4f24
parser comments only
2013-04-28 09:49:20 -07:00
John Clements
c73a9c9cd0
refactoring mod.rs
2013-04-28 09:49:20 -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
bors
aba93c6b60
auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydon
...
Closes #3083 .
This takes a similar approach to #5797 where a set is present on the `tcx` of used mutable definitions. Everything is by default warned about, and analyses must explicitly add mutable definitions to this set so they're not warned about.
Most of this was pretty straightforward, although there was one caveat that I ran into when implementing it. Apparently when the old modes are used (or maybe `legacy_modes`, I'm not sure) some different code paths are taken to cause spurious warnings to be issued which shouldn't be issued. I'm not really sure how modes even worked, so I was having a lot of trouble tracking this down. I figured that because they're a legacy thing that I'd just de-mode the compiler so that the warnings wouldn't be a problem anymore (or at least for the compiler).
Other than that, the entire compiler compiles without warnings of unused mutable variables. To prevent bad warnings, #5965 should be landed (which in turn is waiting on #5963 ) before landing this. I figured I'd stick it out for review anyway though.
2013-04-22 15:36:51 -07:00
Patrick Walton
25129ee81c
librustc: Remove use mod
from the language
2013-04-22 12:32:59 -07:00