Commit Graph

19 Commits

Author SHA1 Message Date
Patrick Walton
e78f2e2ac5 librustc: Make the compiler ignore purity.
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.

There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 17:21:16 -07:00
Jihyun Yu
95bc9ea26d Remove REC, change related tests/docs 2013-03-02 12:57:05 +09:00
Patrick Walton
c9dd917fad doc: Remove references to mut fields. rs=demuting 2013-02-26 10:02:36 -08:00
Luqman Aden
178882c98f tests/tutorials: Get rid of move. 2013-02-15 02:49:55 -08:00
David Forsythe
72454f401e add if to borrowed ptr tutorial 2013-01-31 09:10:15 -08:00
Felix S. Klock II
20af4d7361 Add expected failure annotation on "fixed" example to placate 'make check'. 2013-01-29 13:18:40 +01:00
Felix S. Klock II
6cabe2b902 Fixed two examples of erroneous code so their errors match expectation.
1. In the first case, the previous code was failing during type inference
   due to mismatched structure.  Fix is to use the X structure at both
   points in the code.

2. In the second case, a naive transcription that subsitutes *nothing*
   in for the omitted statements signified by "..." will actually
   compile without an error.  Furthermore, any pure code could also be
   substituted for the ellipsis and the code would compile (as the
   text already states).  So to make the example more illustrative, it
   would be better to include an impure callback, which makes the
   potential for aliasing immediately obvious to the reader.
2013-01-29 11:28:52 +01:00
Brian Anderson
ed48e76e77 Fix typo in borrowed pointer tutorial. Closes #3876 2012-10-29 13:52:05 -07:00
Tim Chevalier
804c608f01 Remove binary move from the docs 2012-10-23 12:10:03 -07:00
Tim Chevalier
de4687c378 Copyedit sections 9-11 of the borrowed pointer tutorial (last edits from me) 2012-10-10 15:04:42 -07:00
Tim Chevalier
448c349234 Copyedit sections 7 and 8 of the borrowed pointer tutorial 2012-10-10 14:49:07 -07:00
Tim Chevalier
ae861f0288 Copyedit sections 5 and 6 of the borrowed pointer tutorial 2012-10-10 14:29:16 -07:00
Tim Chevalier
f4a6b84a65 Copyedit sections 3 and 4 of the borrowed pointer tutorial 2012-10-10 13:56:42 -07:00
Tim Chevalier
a46db484ab Copyedit first two sections of borrowed pointer tutorial 2012-10-09 17:12:34 -07:00
Niko Matsakis
092de78fab Update to current rules, make (more) examples build 2012-10-02 12:02:48 -07:00
Brian Anderson
2891f5abe3 tutorial: Remove all references to 'records'. Misc 2012-09-26 16:41:35 -07:00
Brian Anderson
da5033f991 Make a few more borrowed pointer tutorial examples pass 2012-09-15 18:24:04 -07:00
Brian Anderson
864cca14ee docs: Make supplemental tutorials testable 2012-09-15 18:06:20 -07:00
Brian Anderson
82e79f765c docs: Add Niko's borrowed pointers tutorial 2012-09-15 17:09:21 -07:00