Commit Graph

42 Commits

Author SHA1 Message Date
Brian Anderson
ea03315cf4 Revert "change borrowck error msg: 'declared in outer block' -> 'captured in a closure'"
This change requires some tests to be updated.

This reverts commit b5b8f5efcc.
2012-07-08 00:07:15 -07:00
Ben Blum
b5b8f5efcc change borrowck error msg: 'declared in outer block' -> 'captured in a closure' 2012-07-06 22:30:50 -04:00
Gareth Daniel Smith
be0141666d convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498 2012-07-04 19:18:13 -07:00
Brian Anderson
d1fc2b5995 Convert to new closure syntax 2012-07-01 19:19:32 -07:00
Michael Sullivan
98e161f00e Switch the compiler over to using ~[] notation instead of []/~. Closes #2759. 2012-06-29 17:41:45 -07:00
Tim Chevalier
487cbf8e90 Remove resources
Also fixed shapes for classes with dtors, as well as handling
offsets for classes with dtors correctly in take glue.

Closes #2485
2012-06-24 15:09:57 -07:00
Niko Matsakis
287f163136 Issue #2657: track mutability of bindings, also prevent move from bindings 2012-06-21 09:45:01 -07:00
Niko Matsakis
982e1166b2 Issue #2633: remove last_use entries that are subject to a loan 2012-06-17 16:17:40 -07:00
Patrick Walton
5151c08850 Issue #2591: Fix "upvar" jargon in borrowck error messages 2012-06-14 23:18:09 -07:00
Brian Anderson
ce750a7dbc Box AST idents 2012-06-13 11:30:45 -07:00
Niko Matsakis
d1ec1d4abb Treat enums with one variant specially in borrowck: #2573 2012-06-12 14:30:14 -07:00
Niko Matsakis
013fc92423 remove alias analysis and replace with borrowck
This reverts commit 7ef825bb60.
2012-06-08 20:39:11 -07:00
Brian Anderson
7ef825bb60 Revert "remove alias analysis and replace with borrowck"
18s perf regression compiling rustc with opts

This reverts commit 7f6ee0ce0d.
2012-06-07 19:42:27 -07:00
Niko Matsakis
7f6ee0ce0d remove alias analysis and replace with borrowck
cc #2540
2012-06-07 16:46:57 -07:00
Niko Matsakis
08520a1697 move borrowck to dvec, insert a few minor copies 2012-06-06 18:37:35 -07:00
Niko Matsakis
903033bb03 handle fixed-length vecs in borrowck categorization 2012-06-04 16:40:09 -07:00
Niko Matsakis
cfac9b6833 improve borrowck to handle some frankly rather tricky cases
- receivers of method calls are also borrowed
- by-val arguments are also borrowed (needs tests)
- assignment to components can interfere with loans
2012-06-02 10:08:04 -07:00
Niko Matsakis
6c6ad229a3 break up borrowck into modules and begin to document how it works 2012-06-01 10:50:19 -07:00
Niko Matsakis
c2ce2741a7 allow mutable vectors and so forth to be used as immutable slices 2012-05-31 15:07:09 -07:00
Niko Matsakis
79b3dedac3 allow for loop bodies 2012-05-30 11:26:15 -07:00
Niko Matsakis
653a1f8781 integrate purity into type 2012-05-30 11:26:15 -07:00
Niko Matsakis
f90228b8a8 make all arguments modes immutable
note: you can still move from copy/move mode args
2012-05-29 16:22:17 -07:00
Niko Matsakis
9e6a068034 replace last_use with liveness info 2012-05-25 14:37:30 -07:00
Niko Matsakis
30b47649ea new liveness pass to supercede last_use / initedness 2012-05-24 09:52:03 -07:00
Niko Matsakis
c9eb9ee612 rewrite purity check to search through scope chain 2012-05-24 05:19:44 -07:00
Niko Matsakis
9773a22119 shuffle error messages in borrowck, and prevent it from spewing too many
also, fix a few minor issues it complains about
2012-05-23 12:01:27 -07:00
Niko Matsakis
e0f59e835e modify borrowck to allow arbitrary borrows in pure scopes 2012-05-23 06:30:29 -07:00
Niko Matsakis
00849191ce refactor loan to not return result<> 2012-05-23 06:30:29 -07:00
Niko Matsakis
01a2e99639 prepare for gather to gather up multiple maps 2012-05-23 06:30:29 -07:00
Brian Anderson
9aa18c2852 rustc: Move ast_map to the syntax crate 2012-05-21 23:39:27 -07:00
Niko Matsakis
0f969da882 port some code to use dvec 2012-05-18 20:00:50 -07:00
Niko Matsakis
44c100c28d try to improve handling of methods 2012-05-18 20:00:50 -07:00
Niko Matsakis
b79d717c91 fix borrowing pats---the id field of cmt was assoc with wrong pat 2012-05-18 19:07:20 -07:00
Niko Matsakis
a559329692 test that we preserve boxes in patterns---still one bug 2012-05-18 14:32:37 -07:00
Niko Matsakis
63210ecddb correct preservation of explicit borrows like "let x = &*y;" 2012-05-16 07:19:19 -07:00
Niko Matsakis
9c7b74b025 check if the type of a local variable contains illegal region
also, try to suppress some of the duplicate errors---in general
more work is needed to make these error messages comprehensible
to ordinary humans
2012-05-15 21:20:37 -07:00
Niko Matsakis
adb61e3e99 get preservation of boxes working, at least in simple cases 2012-05-15 13:38:16 -07:00
Lindsey Kuper
b8880e3254 Remove be keyword.
Closes #2227.
2012-05-15 10:41:14 -07:00
Niko Matsakis
63eb8e0e87 move purity checking into borrowck, addresses #1422 2012-05-11 14:05:58 -07:00
Niko Matsakis
b4d1f1b2c1 replace mutbl pass with borrowck 2012-05-10 21:14:43 -07:00
Paul Stansifer
13c924c049 Remove do { ... } while ... from the language. 2012-05-10 15:09:33 -07:00
Niko Matsakis
50a3dd40ae implement new borrow ck (disabled by default) 2012-05-09 17:00:19 -07:00