Skip to content

Allow rvalues to be borrowed mutably #6472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
561 commits
Select commit Hold shift + click to select a range
930908a
mk: target.mk host.mk fix for duplicated rules of mingw32 after #6235
yichoi May 7, 2013
7b2020f
auto merge of #6245 : youknowone/rust/match-range-static, r=graydon
bors May 7, 2013
7455f98
Make lint_table static
sammykim May 7, 2013
bdb52e5
auto merge of #6251 : thestinger/rust/non_owned, r=pcwalton
bors May 7, 2013
9b09dce
Switch to using 'ln' for the natural logarithm and 'log' for arbitrar…
brendanzab May 6, 2013
06c5e7f
Implement exp_m1 and ln_1p as methods for Float
brendanzab May 6, 2013
314b485
Fix order of methods
brendanzab May 7, 2013
a9ac2b9
Add abs_sub method to Signed trait
brendanzab May 7, 2013
387d6c5
Lift restriction on calling extern C functions, and propagate
nikomatsakis Mar 19, 2013
4023f54
auto merge of #6255 : brson/rust/nobreakpoint, r=graydon
bors May 7, 2013
cc51186
Add is_normal and classify methods to Float trait
brendanzab May 7, 2013
154f3b0
auto merge of #6271 : pnkfelix/rust/issue6009-condition-pub-priv-vari…
bors May 7, 2013
38a6a7a
auto merge of #6276 : brson/rust/issue-6122, r=graydon
bors May 7, 2013
8e0c6fa
Port IRBuilder::CreateVectorSplat
sanxiyn May 2, 2013
f3217a5
Check SIMD vector types
sanxiyn May 2, 2013
c5a7be6
Add core::simd and define SIMD vector types
sanxiyn May 2, 2013
0e052f5
Add SIMD vector type tests
sanxiyn May 3, 2013
11f7cb2
When autoborrowing a fn in trans, adjust the type of the datum to be …
nikomatsakis May 7, 2013
6af447a
Add test for #4666, which didn't *quite* seem to be covered by
nikomatsakis May 7, 2013
784e836
Remove trailing whitespace
sanxiyn May 7, 2013
7b3e036
auto merge of #6282 : alexcrichton/rust/issue-5517-add-test, r=thesti…
bors May 7, 2013
43165b5
rc: remove the managed pointer workaround
thestinger May 7, 2013
96eb1e5
arc: mark RWARC as non-Const
thestinger May 7, 2013
0ed4495
Generate LLVM SIMD vector types
sanxiyn May 7, 2013
19d2ba3
auto merge of #6254 : alexcrichton/rust/issues-5311-4490-better-foldl…
bors May 7, 2013
5063928
auto merge of #6290 : brson/rust/issue-3707, r=thestinger
bors May 7, 2013
4cd51c4
rt: Move win32_require out of the rust_kernel type
brson May 6, 2013
21aaa7f
rt: Eliminate the dependency on rust_kernel from rust_rng
brson May 7, 2013
3b6a32d
core::rt: Add a test that rng works with new tasks
brson May 7, 2013
452817b
auto merge of #6292 : thestinger/rust/cleanup, r=brson
bors May 7, 2013
6bcc3a6
Add some tests for local data + borrowed pointers
brson May 7, 2013
45ae340
auto merge of #6294 : sonwow/rust/renamed-test, r=thestinger
bors May 7, 2013
db1a274
io: handle fread() errors
indutny May 7, 2013
398cd18
core: Replace Durable with 'static
brson May 7, 2013
3a34e93
auto merge of #6295 : yichoi/rust/pull-mingw32, r=brson
bors May 7, 2013
ccc4c1a
std: Replace Durable with 'static
brson May 7, 2013
d8ef723
rustc: Replace Durable with 'static
brson May 7, 2013
0addefa
Improved vim indent file for rust
May 6, 2013
80b2926
General fixes for vim
May 6, 2013
847552f
auto merge of #6301 : bjz/rust/numeric-traits, r=pcwalton
bors May 7, 2013
d35eb6e
auto merge of #6302 : nikomatsakis/rust/issue-6141-leaking-owned-fn, …
bors May 8, 2013
1755eec
test: Replace Durable with 'static
brson May 8, 2013
3df7ed1
Remove Durable from the language
brson May 8, 2013
356ebe8
extranous thing is removed
sammykim May 8, 2013
3c4b32c
auto merge of #6259 : Aatch/rust/vimfile, r=bstrie
bors May 8, 2013
5a1afaf
auto merge of #6303 : nikomatsakis/rust/issue-4666-test, r=nikomatsakis
bors May 8, 2013
1813ab5
testsuite: update a test for #4350
ILyoan May 8, 2013
eb5fa06
Move core::simd to core::unstable::simd
sanxiyn May 8, 2013
80061ec
rt: Remove rust_call_nullary_fn
brson May 8, 2013
86500fb
auto merge of #6297 : sammykim/rust/static-lint-table, r=luqmana
bors May 8, 2013
625e518
auto merge of #6305 : thestinger/rust/rc, r=nikomatsakis
bors May 8, 2013
dc48a55
Show lint names
sammykim May 8, 2013
e6529c3
auto merge of #6307 : brson/rust/rng2, r=brson
bors May 8, 2013
1d7a136
auto merge of #6309 : nikomatsakis/rust/issue-3678-type-of-extern-fns…
bors May 8, 2013
3532350
Add #[cfg(debug)] flag to rust suite compilation. Closes #3068
z0w0 May 8, 2013
83838aa
auto merge of #6311 : indutny/rust/fix/handle-io-fread-errors, r=z0w0
bors May 8, 2013
cb66d89
Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[c…
z0w0 May 8, 2013
b6f9295
auto merge of #6317 : brson/rust/durable, r=z0w0
bors May 8, 2013
37becd8
auto merge of #6321 : ILyoan/rust/test4350, r=z0w0
bors May 8, 2013
08c8054
testsuite: xfail tests for windows
huonw May 7, 2013
ad5ee00
libstd: convert chained ifs to a match in base64.
huonw May 8, 2013
8f94ac6
auto merge of #6267 : huonw/rust/syntax-deriving-generaliseder, r=nik…
bors May 8, 2013
b21f37c
auto merge of #6323 : brson/rust/nullary, r=thestinger
bors May 8, 2013
270b508
auto merge of #6326 : z0w0/rust/cfg-debug, r=yichoi
bors May 8, 2013
bd4ee7c
Fix typos
seanmoon May 8, 2013
3970d02
rustc: Fix the logic for finding the Android main function
brson May 7, 2013
65ded84
auto merge of #6119 : brson/rust/main, r=brson
bors May 8, 2013
044abef
fix incorrect region code based on the old 'self
thestinger May 8, 2013
5a65f51
auto merge of #6214 : sanxiyn/rust/simd-2, r=graydon
bors May 8, 2013
0c02d0f
rename iter::iter_to_vec to iter::to_vec
thestinger May 8, 2013
da2ac90
libstd: Remove mutable fields from fileinput and net_tcp
pcwalton May 3, 2013
92d2ec4
libstd: Remove mutable fields from flatpipes and io_util
pcwalton May 3, 2013
bba0680
libstd: Remove mutable fields from future and par
pcwalton May 3, 2013
ee78d81
libstd: Start warning about mutable fields, now that they only exist …
pcwalton May 3, 2013
b2d1ac1
libcore: Remove mutable fields from rand.
pcwalton May 3, 2013
2961997
libcore: Remove mutable fields from os and ptr
pcwalton May 3, 2013
4dc1c29
libcore: Remove mutable fields from hash
pcwalton May 3, 2013
226ee7d
libcore: Remove mutable fields from task::spawn
pcwalton May 3, 2013
803a4f4
libcore: Remove mutable fields from the task builder API
pcwalton May 3, 2013
6a44482
libcore: Remove mutable fields from pipes
pcwalton May 3, 2013
5650779
libcore: Remove mutable fields from repr
pcwalton May 3, 2013
8919f32
Remove mutable fields from comm by using casts. Also mark the cast in…
pcwalton May 3, 2013
d12d255
libcore: Remove more mutable fields from comm
pcwalton May 4, 2013
c752241
libstd: Remove some residual mutable fields
pcwalton May 4, 2013
db4573a
librustc: Remove mutable fields from the language.
pcwalton May 4, 2013
278b487
test: Fix tests and the pipe compiler
pcwalton May 7, 2013
99daec6
librustc: Fix merge fallout.
pcwalton May 7, 2013
49a66a5
librustc: Stop parsing modes and remove them entirely from the language
pcwalton May 7, 2013
16a0125
libcore: Fix tests.
pcwalton May 8, 2013
9d011eb
test: Fix tests.
pcwalton May 8, 2013
3affc6e
librustc: Fix merge fallout.
pcwalton May 8, 2013
7286845
libcore: Fix more merge fallout.
pcwalton May 8, 2013
36fbf71
llvm: Unrevert change
pcwalton May 8, 2013
85d9409
test: Fix broken test
pcwalton May 8, 2013
d20e63a
test: Fix modes in the benchmarks.
pcwalton May 9, 2013
d82d987
auto merge of #6232 : pcwalton/rust/demuting, r=pcwalton
bors May 9, 2013
3bbbb31
auto merge of #6327 : z0w0/rust/rm-notest, r=brson
bors May 9, 2013
1b4e375
Add space
sammykim May 9, 2013
101d4bf
auto merge of #6332 : huonw/rust/std-base64-match, r=nikomatsakis
bors May 9, 2013
ea5c413
Perform expansion before stripping/building a test harness.
huonw May 9, 2013
9a292b3
libcore: rename vec::each(variable) to variable.each
recrack May 8, 2013
472d9f3
librustdoc: rename vec::each(var) to var.each
recrack May 8, 2013
d4fa0f1
libstd: rename vec::each(var) to var.each
recrack May 8, 2013
841f4ce
libsyntax: rename vec::each(var) to var.each
recrack May 8, 2013
c02064d
librustc: rename vec::each(var) to var.each
recrack May 8, 2013
936c07d
auto merge of #6328 : recrack/rust/rename_cleanup, r=sanxiyn
bors May 9, 2013
72c9aab
Created utility uninhabited type
May 9, 2013
fda176b
auto merge of #6337 : thestinger/rust/fix_region, r=thestinger
bors May 9, 2013
c2bf9bf
improve MIPS backend and implement segmented stacks
crabtw May 7, 2013
5617916
auto merge of #6343 : thestinger/rust/new_iter, r=brson
bors May 9, 2013
050c744
Add uninit intrinsic
May 9, 2013
f5ab112
Replace init() with uninit() where appropriate
May 9, 2013
ca95e7f
auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiyn
bors May 9, 2013
5750970
Make staged versions of the functions that use uninit
May 9, 2013
414970c
Add intrinsic declaration where I missed them
May 9, 2013
d6efbad
Mark c_vec functions as unsafe again
alexcrichton May 8, 2013
1393c3a
Use a specialized string interner to reduce the need for owned strings
dotdash May 2, 2013
e323033
back-ticks
May 9, 2013
4757a58
auto merge of #6359 : kud1ing/rust/fixes, r=bstrie
bors May 9, 2013
dc2ca9d
Refactor representation of bounds to separate out BuiltinBounds into
nikomatsakis May 7, 2013
7a4c6e5
auto merge of #6325 : sammykim/rust/lint-name, r=graydon
bors May 9, 2013
2bc1263
remove vecs_implicitly_copyable from libstd/libcore
thestinger May 9, 2013
ce9c022
auto merge of #6349 : thestinger/rust/explicit_copy, r=thestinger
bors May 9, 2013
07cd5a8
testsuite: Add two test cases (one xfailed)
catamorphism May 9, 2013
7675856
auto merge of #6354 : Aatch/rust/uninit-intrinsic, r=graydon
bors May 9, 2013
15164cc
Issue the correct deref count for the implicit deref that occurs
nikomatsakis May 9, 2013
e18ed77
Remove remnants of mutable fields from mem_categorization, borrowck.
nikomatsakis May 9, 2013
d3ca9c6
Better error message for certain classes of unresolved imports
emberian May 9, 2013
fa5baf3
Tweak error message
emberian May 9, 2013
7852086
rustc: Add EnumSet tests
nikomatsakis May 8, 2013
f547a67
auto merge of #6373 : nikomatsakis/rust/issue-6355-perf-regression, r…
bors May 9, 2013
9482ed7
test: Add two tests for issue #6272.
nikomatsakis May 9, 2013
646f16d
core: Make intrinsics::init unsafe
catamorphism May 9, 2013
cd235d4
core: Make intrinsics::forget unsafe, too
catamorphism May 9, 2013
ca18ed8
testsuite: Test that init and forget are both unsafe
catamorphism May 9, 2013
0afcd34
compile-fail test for new unresolved import error
emberian May 9, 2013
9cbab89
fix formating and tests
emberian May 9, 2013
ad8e236
auto merge of #6336 : nikomatsakis/rust/issue-6308-closure-bounds, r=…
bors May 10, 2013
923450d
librustc: Fix ICE in core-text resulting from dynamic borrowing. rs=b…
pcwalton May 10, 2013
c8e93ed
Move core::task::local_data to core::local_data
sonwow May 8, 2013
9042e1e
Include static methods on traits in reexports.
thomaslee May 9, 2013
0cde8ba
Implement a new protocol for `for` loops that's much more easily comp…
alexcrichton May 2, 2013
2825605
core: Use the new `for` protocol
alexcrichton May 2, 2013
3ce9dba
std: Use the new `for` protocol
alexcrichton May 2, 2013
5eb6d19
syntax: Use the new `for` protocol
alexcrichton May 2, 2013
a87db3e
rustc: Use the new `for` protocol
alexcrichton May 3, 2013
b01a40d
rustpkg: Use the new `for` protocol
alexcrichton May 3, 2013
cdc266e
Fix deriving(IterBytes) to use the new for-loop protocol
alexcrichton May 3, 2013
3e106cf
auto merge of #6339 : alexcrichton/rust/unsafe-cvec, r=catamorphism
bors May 10, 2013
f04eb37
auto merge of #6347 : cmr/rust/unknown_module_resolve_error, r=catamo…
bors May 10, 2013
4400bbd
A test file is fixed
sonwow May 10, 2013
f6743fe
librustc: allow destructuring of structs with destructors if the patt…
huonw May 10, 2013
e9d0018
auto merge of #6356 : dotdash/rust/strinterner, r=pcwalton
bors May 10, 2013
81e06a5
Issue number on xfailed test
huonw May 10, 2013
b7da975
renamed vec::from_slice to vec::to_owned
sonwow May 10, 2013
912a352
Add some positive tests for dtor struct destructuring
huonw May 10, 2013
6da2c98
auto merge of #6329 : sonwow/rust/issue-6306, r=ILyoan
bors May 10, 2013
fdf601e
auto merge of #6358 : crabtw/rust/mips-segstk, r=brson
bors May 10, 2013
24ef88c
renamed str::from_slice to str::to_owned
sonwow May 10, 2013
dba9337
auto merge of #6366 : catamorphism/rust/issue-3920, r=catamorphism
bors May 10, 2013
3db74dd
Fixes rusti crashes.
cantsin May 10, 2013
017e7e8
Replace io::println by println as it is now included in prelude.rs
May 10, 2013
d546493
auto merge of #6380 : pcwalton/rust/core-text-ice, r=pcwalton
bors May 10, 2013
7d4bb90
Remove redundant import error
emberian May 10, 2013
d807f00
Add to_str() for HashMaps, and some basic tests as well.
samebchase May 10, 2013
52610c3
more back-ticks, less colons
May 10, 2013
fd5a352
Removed test_hashmap() for the time, being. All tests pass with make …
samebchase May 10, 2013
7652f3d
Move flate from core to std
brson May 3, 2013
b05aae2
test: Use the new `for` protocol
alexcrichton May 3, 2013
606bd75
Fix merge "failures"
alexcrichton May 10, 2013
3e0400f
auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwalton
bors May 11, 2013
c49cf8b
auto merge of #6205 : brson/rust/flate, r=brson
bors May 11, 2013
7d22437
Implement util::swap without the '<->' operator
alexcrichton May 6, 2013
998fece
Stop using the '<->' operator
alexcrichton May 6, 2013
63c7e2f
Remove the '<->' operator from the language
alexcrichton May 6, 2013
60803e5
Fix tests with the swap operator
alexcrichton May 11, 2013
9f106a6
auto merge of #6260 : alexcrichton/rust/issue-3466-no-swap, r=pcwalton
bors May 11, 2013
4958e9b
Remove core executable
huonw May 11, 2013
1e241ce
Test case for issue #4202
thomaslee May 11, 2013
842e304
auto merge of #6368 : catamorphism/rust/issue-5315, r=catamorphism
bors May 11, 2013
d43d3e5
auto merge of #6376 : nikomatsakis/rust/issue-6272-tests, r=graydon
bors May 11, 2013
18a47f9
auto merge of #6384 : thomaslee/rust/issue-4202, r=catamorphism
bors May 11, 2013
9b30fa3
Correct testcases that passed because fns with #[test] were stripped …
huonw May 11, 2013
3c1e787
All tests, including newly added test_hashmap() pass. The empty Hash …
samebchase May 11, 2013
b8d0ebe
Remove extra space between key and value.
samebchase May 11, 2013
e2c73cc
Add str representation for HashSet.
samebchase May 11, 2013
9ed9e8c
Add test: test_hashset()
samebchase May 11, 2013
7d43b12
Use acc.push_str() instead of str::push_str(..)
samebchase May 11, 2013
37bea2a
Fix errors in test_hashset().
samebchase May 11, 2013
96de2b0
auto merge of #6383 : huonw/rust/rustc-expand-then-strip, r=thestinger
bors May 11, 2013
e478ced
auto merge of #6385 : huonw/rust/rustc-dtor-struct-match, r=nikomatsakis
bors May 11, 2013
9572518
auto merge of #6389 : sonwow/rust/issue-3356, r=bstrie
bors May 11, 2013
8ca64a4
auto merge of #6397 : cantsin/rust/rusti-fixes, r=catamorphism
bors May 11, 2013
9ee8d50
auto merge of #6398 : osaut/rust/master, r=bstrie
bors May 11, 2013
82f963e
libcore: Change `each_val` to follow new for-loop protocol
gifnksm May 11, 2013
82164a1
auto merge of #6402 : kud1ing/rust/fixes, r=pcwalton
bors May 11, 2013
cdb52c0
rustc: Don't call type_error_message() with ty_err as the expected type
catamorphism May 12, 2013
a2b81cc
libstd: Fix BigUint::is_even
gifnksm May 12, 2013
f2f10bd
auto merge of #6420 : huonw/rust/rm-exec, r=thestinger
bors May 12, 2013
35e6ce5
auto merge of #6426 : gifnksm/rust/new-iter, r=catamorphism
bors May 12, 2013
ed41864
Warning police
catamorphism May 9, 2013
a279d65
clean up the last bit of warnings
emberian May 11, 2013
1f62b23
auto merge of #6431 : catamorphism/rust/warnings, r=catamorphism
bors May 12, 2013
36771ef
auto merge of #6429 : gifnksm/rust/bigint-is_even, r=catamorphism
bors May 12, 2013
258abf1
Fix failing test
emberian May 12, 2013
0acb6ab
Add use declaration for container::Set
samebchase May 12, 2013
638b394
auto merge of #6427 : catamorphism/rust/issue-6319, r=nikomatsakis
bors May 12, 2013
7dc94b8
auto merge of #6414 : samebchase/rust/experimental, r=graydon
bors May 12, 2013
a9f2132
Adds atomic_load, atomic_load_acq, atomic_store, and atomic_store_rel…
Thiez May 12, 2013
2a9a4a8
Don't create subprocesses for the `rust` command
alexcrichton May 12, 2013
4f8084a
Make Float::classify matching more clear for f64 and f32
brendanzab May 12, 2013
830b945
auto merge of #6439 : bjz/rust/float-classify, r=brson
bors May 12, 2013
fa1a172
Removed unnecessary check from build.rs
Thiez May 12, 2013
8d1a09c
auto merge of #6348 : sstewartgallus/rust/incoming, r=brson
bors May 12, 2013
06ef889
libsyntax: Remove `extern mod foo { ... }` from the language.
pcwalton May 9, 2013
5d3559e
librustc: Make `self` and `static` into keywords
pcwalton May 10, 2013
db0693a
libsyntax: Tighten up expressions in patterns to only allow identifie…
pcwalton May 11, 2013
58a37a1
libstd: Fix merge fallout.
pcwalton May 13, 2013
e605536
actually fix failing test
emberian May 13, 2013
8291e36
auto merge of #6400 : cmr/rust/remove_useless_import_error, r=thestinger
bors May 13, 2013
943b9d5
Add vec.rs each2_mut function
recrack May 13, 2013
1d1c502
Add vec.rs each2_mut testsuite
recrack May 10, 2013
8a5561b
auto merge of #6438 : alexcrichton/rust/issue-5387, r=thestinger
bors May 13, 2013
be82449
Better error for some unresolved imports
emberian May 12, 2013
103a68b
Correct #[always_inline] -> #[inline(always)] and __attribute((...)) …
luqmana May 13, 2013
8d4a3d5
auto merge of #6447 : luqmana/rust/6446, r=thestinger
bors May 13, 2013
d43908a
doc: document the #[deriving] attribute.
huonw May 13, 2013
2210d2d
Use backticks to delineate paths/identifiers
emberian May 13, 2013
2774392
auto merge of #6448 : huonw/rust/deriving-doc, r=Aatch
bors May 13, 2013
852af34
Tidy
Thiez May 13, 2013
1bf2f68
auto merge of #6437 : Thiez/rust/atomic, r=Aatch
bors May 13, 2013
56a1ee8
librustdoc: Remove old-style extern mods from rustdoc tests.
pcwalton May 13, 2013
935b7ba
auto merge of #6443 : cmr/rust/resolution, r=bstrie
bors May 13, 2013
ae07170
Update make dependencies of librust
alexcrichton May 13, 2013
1b88336
auto merge of #6452 : alexcrichton/rust/fix-deps, r=bstrie
bors May 13, 2013
26a28da
test: Fix broken benchmark test
pcwalton May 13, 2013
4f44624
core: Move unstable to unstable/mod.rs
brson May 9, 2013
fa1d047
core: Move locks, atomic rc to unstable::sync
brson May 10, 2013
369231b
core: Rename SharedMutableState to UnsafeAtomicRcBox
brson May 10, 2013
3abc5b3
auto merge of #6417 : pcwalton/rust/exprs-in-patterns, r=pcwalton
bors May 13, 2013
ad5bfd6
auto merge of #6387 : brson/rust/unstable, r=brson
bors May 13, 2013
66e1e51
Remove re-exports from libcore/core.rc
alexcrichton May 13, 2013
e1a1992
revert PriorityQueue to using init()
thestinger May 13, 2013
7d81c80
auto merge of #6388 : recrack/rust/each2_mut, r=pcwalton
bors May 14, 2013
d0da21d
Upgrade libuv
brson May 14, 2013
62640f5
auto merge of #6456 : brson/rust/libuv, r=brson
bors May 14, 2013
3aa1122
auto merge of #6461 : thestinger/rust/fix_priority_queue, r=pcwalton
bors May 14, 2013
5a2f65f
auto merge of #6441 : alexcrichton/rust/issue-5531, r=luqmana
bors May 14, 2013
d204cfd
Issue #5967: Make rvalues mutable
nikomatsakis May 14, 2013
87398f3
Add explanatory comment to is_rvalue_or_immutable()
nikomatsakis May 14, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4

* text=auto
*.cpp rust
*.h rust
*.rs rust
src/rt/msvc/* -whitespace
src/rt/vg/* -whitespace
src/rt/linenoise/* -whitespace
1 change: 0 additions & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,3 @@ their own copyright notices and license terms:
has chosen for the collective work, enumerated at the top
of this file. The only difference is the retention of
copyright itself, held by the contributor.

7 changes: 5 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ endif

ifdef CFG_ENABLE_DEBUG
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
CFG_RUSTC_FLAGS +=
CFG_RUSTC_FLAGS += --cfg debug
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
else
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG
Expand All @@ -110,6 +110,9 @@ endif
ifdef SAVE_TEMPS
CFG_RUSTC_FLAGS += --save-temps
endif
ifdef ASM_COMMENTS
CFG_RUSTC_FLAGS += -z asm-comments
endif
ifdef TIME_PASSES
CFG_RUSTC_FLAGS += -Z time-passes
endif
Expand Down Expand Up @@ -238,7 +241,7 @@ $(foreach target,$(CFG_TARGET_TRIPLES),\

CORELIB_CRATE := $(S)src/libcore/core.rc
CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \
core.rc *.rs */*.rs */*/*rs))
core.rc *.rs */*.rs */*/*rs */*/*/*rs))

######################################################################
# Standard library variables
Expand Down
6 changes: 3 additions & 3 deletions RELEASES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Version 0.3 (July 2012)
* Slices and fixed-size, interior-allocated vectors
* #!-comments for lang versioning, shell execution
* Destructors and iface implementation for classes;
type-parameterized classes and class methods
type-parameterized classes and class methods
* 'const' type kind for types that can be used to implement
shared-memory concurrency patterns

Expand All @@ -261,7 +261,7 @@ Version 0.3 (July 2012)
'crust', 'native' (now 'extern'), 'cont' (now 'again')

* Constructs: do-while loops ('do' repurposed), fn binding,
resources (replaced by destructors)
resources (replaced by destructors)

* Compiler reorganization
* Syntax-layer of compiler split into separate crate
Expand All @@ -276,7 +276,7 @@ Version 0.3 (July 2012)
* Extensive work on libuv interface
* Much vector code moved to libraries
* Syntax extensions: #line, #col, #file, #mod, #stringify,
#include, #include_str, #include_bin
#include, #include_str, #include_bin

* Tool improvements
* Cargo automatically resolves dependencies
Expand Down
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ then
probe CFG_ZCAT zcat
fi

step_msg "looking for target specific programs"

probe CFG_ADB adb

if [ ! -z "$CFG_PANDOC" ]
then
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |
Expand Down
6 changes: 3 additions & 3 deletions doc/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The markdown docs are only generated by make when node is installed (use
`make doc`). If you don't have node installed you can generate them yourself.
Unfortunately there's no real standard for markdown and all the tools work
`make doc`). If you don't have node installed you can generate them yourself.
Unfortunately there's no real standard for markdown and all the tools work
differently. pandoc is one that seems to work well.

To generate an html version of a doc do something like:
Expand All @@ -10,4 +10,4 @@ The syntax for pandoc flavored markdown can be found at:
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown

A nice quick reference (for non-pandoc markdown) is at:
http://kramdown.rubyforge.org/quickref.html
http://kramdown.rubyforge.org/quickref.html
164 changes: 88 additions & 76 deletions doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ each of which may have some number of [attributes](#attributes) attached to it.

~~~~~~~~ {.ebnf .gram}
item : mod_item | fn_item | type_item | struct_item | enum_item
| static_item | trait_item | impl_item | foreign_mod_item ;
| static_item | trait_item | impl_item | extern_block ;
~~~~~~~~

An _item_ is a component of a crate; some module items can be defined in crate
Expand Down Expand Up @@ -752,10 +752,11 @@ link_attr : ident '=' literal ;
~~~~~~~~

An _`extern mod` declaration_ specifies a dependency on an external crate.
The external crate is then bound into the declaring scope as the `ident` provided in the `extern_mod_decl`.
The external crate is then bound into the declaring scope
as the `ident` provided in the `extern_mod_decl`.

The external crate is resolved to a specific `soname` at compile time, and a
runtime linkage requirement to that `soname` is passed to the linker for
The external crate is resolved to a specific `soname` at compile time,
and a runtime linkage requirement to that `soname` is passed to the linker for
loading at runtime. The `soname` is resolved at compile time by scanning the
compiler's library path and matching the `link_attrs` provided in the
`use_decl` against any `#link` attributes that were declared on the external
Expand Down Expand Up @@ -992,10 +993,10 @@ Thus the return type on `f` only needs to reflect the `if` branch of the conditi
#### Extern functions

Extern functions are part of Rust's foreign function interface,
providing the opposite functionality to [foreign modules](#foreign-modules).
Whereas foreign modules allow Rust code to call foreign code,
extern functions with bodies defined in Rust code _can be called by foreign code_.
They are defined in the same way as any other Rust function,
providing the opposite functionality to [external blocks](#external-blocks).
Whereas external blocks allow Rust code to call foreign code,
extern functions with bodies defined in Rust code _can be called by foreign
code_. They are defined in the same way as any other Rust function,
except that they have the `extern` modifier.

~~~
Expand All @@ -1011,7 +1012,8 @@ let fptr: *u8 = new_vec;
~~~

The primary motivation for extern functions is
to create callbacks for foreign functions that expect to receive function pointers.
to create callbacks for foreign functions that expect to receive function
pointers.

### Type definitions

Expand Down Expand Up @@ -1308,64 +1310,61 @@ impl Seq<bool> for u32 {
}
~~~~

### Foreign modules
### External blocks

~~~ {.ebnf .gram}
foreign_mod_item : "extern mod" ident '{' foreign_mod '} ;
foreign_mod : [ foreign_fn ] * ;
extern_block_item : "extern" '{' extern_block '} ;
extern_block : [ foreign_fn ] * ;
~~~

Foreign modules form the basis for Rust's foreign function interface. A
foreign module describes functions in external, non-Rust
libraries.
Functions within foreign modules are declared in the same way as other Rust functions,
with the exception that they may not have a body and are instead terminated by a semicolon.
External blocks form the basis for Rust's foreign function interface.
Declarations in an external block describe symbols
in external, non-Rust libraries.

Functions within external blocks
are declared in the same way as other Rust functions,
with the exception that they may not have a body
and are instead terminated by a semicolon.

~~~
# use core::libc::{c_char, FILE};
# #[nolink]

extern mod c {
extern {
fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
}
~~~

Functions within foreign modules may be called by Rust code, just like functions defined in Rust.
The Rust compiler automatically translates between the Rust ABI and the foreign ABI.

The name of the foreign module has special meaning to the Rust compiler in
that it will treat the module name as the name of a library to link to,
performing the linking as appropriate for the target platform. The name
given for the foreign module will be transformed in a platform-specific way
to determine the name of the library. For example, on Linux the name of the
foreign module is prefixed with 'lib' and suffixed with '.so', so the
foreign mod 'rustrt' would be linked to a library named 'librustrt.so'.
Functions within external blocks may be called by Rust code,
just like functions defined in Rust.
The Rust compiler automatically translates
between the Rust ABI and the foreign ABI.

A number of [attributes](#attributes) control the behavior of foreign
modules.
A number of [attributes](#attributes) control the behavior of external
blocks.

By default foreign modules assume that the library they are calling use the
standard C "cdecl" ABI. Other ABIs may be specified using the `abi`
attribute as in
By default external blocks assume
that the library they are calling uses the standard C "cdecl" ABI.
Other ABIs may be specified using the `abi` attribute as in

~~~{.xfail-test}
// Interface to the Windows API
#[abi = "stdcall"]
extern mod kernel32 { }
extern { }
~~~

The `link_name` attribute allows the default library naming behavior to
be overridden by explicitly specifying the name of the library.
The `link_name` attribute allows the name of the library to be specified.

~~~{.xfail-test}
#[link_name = "crypto"]
extern mod mycrypto { }
extern { }
~~~

The `nolink` attribute tells the Rust compiler not to do any linking for the foreign module.
This is particularly useful for creating foreign
modules for libc, which tends to not follow standard library naming
conventions and is linked to all Rust programs anyway.
The `nolink` attribute tells the Rust compiler
not to do any linking for the external block.
This is particularly useful for creating external blocks for libc,
which tends to not follow standard library naming conventions
and is linked to all Rust programs anyway.

## Attributes

Expand Down Expand Up @@ -1425,6 +1424,8 @@ names are effectively reserved. Some significant attributes include:
* The `test` attribute, for marking functions as unit tests.
* The `allow`, `warn`, `forbid`, and `deny` attributes, for controlling lint checks. Lint checks supported
by the compiler can be found via `rustc -W help`.
* The `deriving` attribute, for automatically generating
implementations of certain traits.

Other attributes may be added or removed during development of the language.

Expand Down Expand Up @@ -1467,8 +1468,8 @@ A complete list of the built-in language items follows:
: Elements can be subtracted.
`mul`
: Elements can be multiplied.
`quot`
: Elements have a quotient operation.
`div`
: Elements have a division operation.
`rem`
: Elements have a remainder operation.
`neg`
Expand Down Expand Up @@ -1526,6 +1527,47 @@ A complete list of the built-in language items follows:
> **Note:** This list is likely to become out of date. We should auto-generate it
> from `librustc/middle/lang_items.rs`.

### Deriving

The `deriving` attribute allows certain traits to be automatically
implemented for data structures. For example, the following will
create an `impl` for the `Eq` and `Clone` traits for `Foo`, the type
parameter `T` will be given the `Eq` or `Clone` constraints for the
appropriate `impl`:

~~~
#[deriving(Eq, Clone)]
struct Foo<T> {
a: int,
b: T
}
~~~

The generated `impl` for `Eq` is equivalent to

~~~
# struct Foo<T> { a: int, b: T }
impl<T: Eq> Eq for Foo<T> {
fn eq(&self, other: &Foo<T>) -> bool {
self.a == other.a && self.b == other.b
}

fn ne(&self, other: &Foo<T>) -> bool {
self.a != other.a || self.b != other.b
}
}
~~~

Supported traits for `deriving` are:

* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
* Serialization: `Encodable`, `Decodable`. These require `std`.
* `Clone`, to perform deep copies.
* `IterBytes`, to iterate over the bytes in a data type.
* `Rand`, to create a random instance of a data type.
* `ToStr`, to convert to a string. For a type with this instance,
`obj.to_str()` has the same output as `fmt!("%?", obj)`.

# Statements and expressions

Rust is _primarily_ an expression language. This means that most forms of
Expand Down Expand Up @@ -1857,7 +1899,7 @@ The default meaning of the operators on standard types is given here.
Calls the `mul` method on the `core::ops::Mul` trait.
`/`
: Quotient.
Calls the `quot` method on the `core::ops::Quot` trait.
Calls the `div` method on the `core::ops::Div` trait.
`%`
: Remainder.
Calls the `rem` method on the `core::ops::Rem` trait.
Expand Down Expand Up @@ -1946,35 +1988,6 @@ fn avg(v: &[float]) -> float {
}
~~~~

#### Swap expressions

A _swap expression_ consists of an [lvalue](#lvalues-rvalues-and-temporaries) followed by a bi-directional arrow (`<->`) and another [lvalue](#lvalues-rvalues-and-temporaries).

Evaluating a swap expression causes, as a side effect, the values held in the left-hand-side and right-hand-side [lvalues](#lvalues-rvalues-and-temporaries) to be exchanged indivisibly.

Evaluating a swap expression neither changes reference counts,
nor deeply copies any owned structure pointed to by the moved [rvalue](#lvalues-rvalues-and-temporaries).
Instead, the swap expression represents an indivisible *exchange of ownership*,
between the right-hand-side and the left-hand-side of the expression.
No allocation or destruction is entailed.

An example of three different swap expressions:

~~~~~~~~
# let mut x = &mut [0];
# let mut a = &mut [0];
# let i = 0;
# struct S1 { z: int };
# struct S2 { c: int };
# let mut y = S1{z: 0};
# let mut b = S2{c: 0};

x <-> a;
x[i] <-> a[i];
y.z <-> b.c;
~~~~~~~~


#### Assignment expressions

An _assignment expression_ consists of an [lvalue](#lvalues-rvalues-and-temporaries) expression followed by an
Expand Down Expand Up @@ -2015,7 +2028,7 @@ as
== !=
&&
||
= <->
=
~~~~

Operators at the same precedence level are evaluated left-to-right.
Expand Down Expand Up @@ -2393,7 +2406,7 @@ variables in the arm's block, and control enters the block.
An example of an `match` expression:


~~~~ {.xfail-test}
~~~~
# fn process_pair(a: int, b: int) { }
# fn process_ten() { }

Expand Down Expand Up @@ -3351,4 +3364,3 @@ Additional specific influences can be seen from the following languages:
* The typeclass system of Haskell.
* The lexical identifier rule of Python.
* The block syntax of Ruby.

Loading