Patrick Walton
8ceb374ab7
librustc: Remove non-procedure uses of do
from librustc, librustdoc,
...
and librustpkg.
2013-11-26 08:25:00 -08:00
Seo Sanghyeon
9028330f39
Take &Pat in visit_pat
2013-11-26 03:22:21 +09:00
Patrick Walton
7e3f20133a
librustc: Change most uses of &fn()
to ||
.
2013-11-19 13:22:03 -08:00
Patrick Walton
7e77bf1769
librustc: Implement the proc
type as sugar for ~once fn
and proc
...
notation for closures, and disable the feature gate for `once fn` if
used with the `~` sigil.
2013-10-29 10:34:17 -07:00
Alex Crichton
daf5f5a4d1
Drop the '2' suffix from logging macros
...
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Eduard Burtescu
7ab0b0cd41
Handle inline asm outputs as write-only in liveness, borrowck and trans.
2013-10-18 08:02:56 +03:00
Alex Crichton
4f67dcb24a
Migrate users of 'loop' to 'continue'
...
Closes #9467
2013-10-01 15:53:13 -07:00
Alex Crichton
1b80558be3
rustc: Remove usage of fmt!
2013-09-30 23:21:19 -07:00
Felix S. Klock II
7eed184dbb
visit::Visitor refactor: replace (&mut BorrowckVisitor, @BorrowckCtxt) with &mut BorrowckCtxt.
2013-09-24 01:56:25 +02:00
Felix S. Klock II
959d9d60e1
check_loans.rs Visitor refactoring ( #7081 ): unify CheckLoan{Ctxt,Visitor}.
2013-09-10 11:25:09 +02:00
Marvin Löbel
7419085337
Modernized a few more types in syntax::ast
2013-09-03 14:45:06 +02:00
Marvin Löbel
539f37925c
Modernized a few type names in rustc and syntax
2013-09-01 14:43:26 +02:00
Patrick Walton
aac9d6eee9
librustc: Fix merge fallout
2013-08-27 19:09:27 -07:00
Patrick Walton
4f32a2d854
librustc: Fix merge fallout.
2013-08-27 18:47:57 -07:00
Patrick Walton
a20af8b276
librustc: Convert check loans to use the new visitor
2013-08-27 18:47:57 -07:00
Patrick Walton
5c3504799d
librustc: Remove &const
and *const
from the language.
...
They are still present as part of the borrow check.
2013-08-27 18:46:51 -07:00
bors
58d6eb5048
auto merge of #8797 : nikomatsakis/rust/issue-8625-assign-to-andmut-in-borrowed-loc-2, r=pcwalton
...
Fixes for #8625 to prevent assigning to `&mut` in borrowed or aliasable locations. The old code was insufficient in that it failed to catch bizarre cases like `& &mut &mut`.
r? @pnkfelix
2013-08-27 17:05:46 -07:00
Niko Matsakis
8c09865b66
Remove remnants of implicit self
2013-08-27 16:49:06 -04:00
Niko Matsakis
35a4177550
Extend aliasability check to uncover & &mut &mut
and the like
2013-08-27 15:45:19 -04:00
Niko Matsakis
6b23d20452
Prohibit assignment to &mut
pointers that are found in frozen or borrowed locations.
...
Fixes #8625 .
2013-08-21 12:02:21 -04:00
Felix S. Klock II
f93864c8f4
Port check_loans.rs from oldvisit to <V:Visitor> trait API.
2013-08-15 04:10:21 +02:00
Niko Matsakis
66b8ad5867
borrowck: Integrate AutoBorrowObj into borrowck / mem_categorization
...
Also cleanup the treatment of mutability in mem_categorization, which still
included the concept of interior mutability. At some point, we should
refactor the types to exclude the possibility of interior mutability rather
than just ignoring the mutability value in those cases.
2013-08-11 14:01:23 -04:00
blake2-ppc
8523f6d643
rustc: Fix for-range loops that can use iterators
...
Transform range loops that can be regular iterator loops.
2013-08-07 22:39:57 -04:00
Marvin Löbel
0ac7a219f0
Updated std::Option, std::Either and std::Result
...
- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05 22:42:21 +02:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Daniel Micay
b3ad685f7f
replace all remaining for
with foreach
or do
2013-08-03 03:00:42 -04:00
Patrick Walton
887c656970
librustc: Introduce a new visitor type based on traits and port syntax to it.
...
This is preparation for removing `@fn`.
This does *not* use default methods yet, because I don't know
whether they work. If they do, a forthcoming PR will use them.
This also changes the precedence of `as`.
2013-08-02 21:57:58 -07:00
Daniel Micay
234acad404
replace range
with an external iterator
2013-08-02 00:51:14 -04:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Michael Woerister
8a329770b6
New naming convention for ast::{node_id, local_crate, crate_node_id, blk_check_mode, ty_field, ty_method}
2013-07-29 16:16:48 +02:00
Birunthan Mohanathas
5afb3d20aa
Disallow non-comma-delimited arguments to fmt! and bytes!
...
Closes #4982 .
2013-07-24 09:45:20 -04:00
Michael Woerister
4bd1424622
Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.
...
`crate => Crate`
`local => Local`
`blk => Block`
`crate_num => CrateNum`
`crate_cfg => CrateConfig`
Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22 15:35:28 +02:00
Patrick Walton
93fa7a4b09
librustc: Remove &
inside @
from borrowck/check_loans.
2013-07-18 12:21:08 -07:00
bors
cee5c4ad11
auto merge of #7849 : nikomatsakis/rust/issue-7444-capture-moved-value, r=bblum
...
This code looks like it was just wrong. r? @bblum
2013-07-18 01:37:44 -07:00
Niko Matsakis
81c576cd5b
Issue #7444 - Borrowck permits moved values to be captured
2013-07-17 07:19:43 -04:00
Michael Woerister
0cc70743d2
Made ast::blk not use spanned<T> anymore.
2013-07-17 08:21:46 +02:00
Niko Matsakis
729b07f83c
Modify borrow checker to visit irrefutable patterns that appear in
...
let and function arguments; modify type checker to store type
information for all patterns and handles some missing cases.
2013-07-08 13:55:10 -04:00
Corey Richardson
1662bd371c
Great renaming: propagate throughout the rest of the codebase
2013-06-29 11:20:02 -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
Graydon Hoare
6914ff9d01
rustc: map node ids through a table that ensures bitset indexes in dataflow are dense
2013-06-17 10:37:42 -07:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Felix S. Klock II
ecef9ad75a
Visitor refactoring: Step 1, couple (Env, vt<Env>) together in a tuple.
2013-06-12 13:04:37 +02:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Alexei Sholik
e75572c879
Deduplicate words in code comments
2013-06-06 10:48:27 +03: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
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Niko Matsakis
e35db1ab35
Reconcile treatment of &mut with the docs
2013-05-28 20:22:15 -04:00
Niko Matsakis
bf1647c92a
Reconcile docs and code, adding examples and adding RESTR_CLAIM
2013-05-28 20:22:15 -04: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