Niko Matsakis
2b67d88809
Rewrite the coercion code to be more readable, more sound, and to reborrow when
...
needed.
Regarding soundness: there was a subtle bug in how it was done before; see the
compile-fail test for an example.
Regarding reborrowing: reborrowing allows mut and const
slices/borrowed-pointers to be used with pure fns that expect immutable data.
r=brson
2013-01-28 10:01:59 -08:00
Niko Matsakis
2e10ea58c3
Integrate vec patterns into borrow checker.
...
The tail portion of the pattern effectively borrows a vector,
but the borrow checker knew nothing about this.
r=catamorphism
2013-01-28 10:00:32 -08:00
Niko Matsakis
d4fd30c6ac
Link the lifetimes of regions resulting from borrows of the
...
contents of other borrowed pointers to the lifetimes of the
borrowed value. Fixes #3148 .
r=catamorphism
2013-01-28 10:00:23 -08:00
Brian Anderson
83ca034d2e
Merge remote-tracking branch 'brson/nocommupstream2'
2013-01-26 14:57:58 -08:00
Tim Chevalier
bb183b93ea
testsuite: Eliminate structural records from run-fail tests
2013-01-26 11:38:00 -08:00
Tim Chevalier
6d4907a742
testsuite: Eliminate uses of structural records from most run-pass tests
...
Except the pipes tests (that needs a snapshot)
2013-01-26 11:35:17 -08:00
Tyler Bindon
c89afc3971
Fix Option camel case in a compile-fail test
...
The compile fails for another reason, that triggers before the the failure for non-camel cased option, some or none undefined errors.
2013-01-25 19:42:24 -07:00
Tyler Bindon
5a69cd75fb
Fix Option camel case in commented portion of test
2013-01-25 19:42:24 -07:00
Tyler Bindon
edc94f5c23
Fix Option camel case in xfailed/ignored tests
2013-01-25 19:42:23 -07:00
Brian Anderson
1ef83945c1
Merge remote-tracking branch 'brson/nocommupstream'
...
Conflicts:
src/libcore/private.rs
src/libcore/task/mod.rs
src/libcore/task/spawn.rs
src/libstd/net_tcp.rs
src/libstd/uv_global_loop.rs
src/libstd/uv_iotask.rs
2013-01-25 18:06:30 -08:00
Tim Chevalier
d753ad4ee4
testsuite: Fix Windows breakage harder in x86stdcall2
2013-01-25 16:58:04 -08:00
Graydon Hoare
d1f771ca34
test: fix x86stdcall test, r=burningtree.
2013-01-25 15:18:45 -08:00
Daniel Micay
e4337a9def
remove remaining is_not_empty functions/methods
2013-01-24 23:24:57 -05:00
Erick Tryzelaar
5085eb3c28
Convert pipes::Buffer into a struct
2013-01-24 16:24:31 -08:00
Erick Tryzelaar
6e2ae2c2c1
remove support for records from auto_encode
2013-01-24 16:24:30 -08:00
Patrick Walton
ad25e208ee
librustc: Allow &mut
to be loaned; allow self
to be loaned; make &mut
loanable to &
. r=nmatsakis
2013-01-24 13:52:22 -08:00
Patrick Walton
bbbb80559c
librustc: Disallow &mut
loans from overlapping with any other loans
2013-01-24 13:52:21 -08:00
Patrick Walton
163b97b7bb
librustc: Make C functions unsafe
2013-01-24 13:52:21 -08:00
Tim Chevalier
86b8bf37bb
testsuite: Capitalize error message, unbreak build
2013-01-24 12:14:26 -08:00
Tim Chevalier
f3ec278e46
Merge pull request #4609 from sonwow/keyword-super
...
Make `super` a keyword
2013-01-24 11:17:52 -08:00
Tim Chevalier
5b64c796a4
syntax/rustc: Improve error message for misuse of for
loop
...
Print out a clearer error message when a `for` gets
used with the wrong type of iterator. Also fix spans on `for` loop
bodies, and suppress some more derived errors.
r=brson
Closes #3651
2013-01-24 11:04:54 -08:00
Youngsoo Son
4b2aa286d8
Make super
a keyword
2013-01-24 16:07:04 +09:00
Tim Chevalier
a202dcccca
Merge pull request #4594 from thestinger/map
...
more work on the map trait and TreeMap/LinearMap
2013-01-23 20:10:47 -08:00
Daniel Micay
bba5520d62
fix tests
2013-01-23 21:46:33 -05:00
Graydon Hoare
ab8d77474c
test: fix benchmark unsafe blocks, r=burningtree.
2013-01-23 18:02:22 -08:00
Brian Anderson
b9608fe423
std: Convert uv_global_loop to use pipes
2013-01-23 17:35:34 -08:00
Daniel Micay
dbd65577ad
fix core-map.rs benchmark
2013-01-23 19:51:49 -05:00
Graydon Hoare
721c174b6c
test: fix issue 2526 'unsafe' block-keyword, r=burningtree.
2013-01-23 16:28:10 -08:00
Patrick Walton
d9c842847d
libsyntax: Fix parsing of pub unsafe fn
inside extern
blocks. rs=bugfix
2013-01-23 15:14:12 -08:00
Daniel Micay
7f0fa143bc
switch LinearMap to current constructor convention
2013-01-23 18:01:24 -05:00
Tim Chevalier
ab13beb05a
Merge pull request #4587 from sanxiyn/divide-by-zero
...
Handle divide by zero in constant evaluator
2013-01-23 14:56:07 -08:00
Patrick Walton
154488df19
libsyntax: Implement assert
as a macro (called fail_unless!
on a transitionary basis to avoid conflicting with the keyword right now). r=brson
2013-01-23 14:46:24 -08:00
Patrick Walton
54b2cad8b3
libsyntax: Remove fn() unsafe { ... }
. r=graydon
2013-01-23 14:41:08 -08:00
John Clements
0b958e74ac
renaming to adhere to conventions
2013-01-23 11:46:19 -08:00
Patrick Walton
6dbfb5da0b
libcore: Use LLVM intrinsics for floor; add a new Perlin noise benchmark. r=brson
2013-01-23 11:37:32 -08:00
Daniel Micay
b7ef28c33a
rename send_map to hashmap
...
This makes the module much more discoverable, and is in line with the
'treemap' naming.
2013-01-23 14:25:01 -05:00
Patrick Walton
778aec998b
libsyntax: Implement the +
syntax for multiple trait bounds. r=tjc
2013-01-23 11:15:10 -08:00
Tim Chevalier
995ccc0d82
Merge pull request #4596 from Trinick/tomutrename
...
core: Rename to_mut and from_mut to cast_to_mut and cast_from_mut
2013-01-23 10:56:08 -08:00
Trinick
9dc8e96c5f
core: Rename to_mut and from_mut to cast_to_mut and cast_from_mut
2013-01-23 10:09:45 +00:00
Tim Chevalier
54344c2468
testsuite: Add tests for mutable function arguments
2013-01-22 23:34:35 -08:00
Seo Sanghyeon
3ed39ce26f
Handle divide by zero in constant evaluator
2013-01-23 15:07:00 +09:00
Tim Chevalier
14d721388b
Add test case for change in 039bfe
2013-01-22 16:22:55 -08:00
Josh Matthews
72259e0772
Translate const references to extern functions as *i8 instead of the typical closure pair. Fixes #4522 .
2013-01-22 16:22:55 -08:00
Tim Chevalier
9d672671e2
Make borrowck's notion of scopes consistent with trans's notion of scopes
...
This eliminates an ICE in trans where the scope for a particular
borrow was a statement ID, but the code in trans that does cleanups
wasn't finding the block with that scope. As per #3860
preserve looks at a node ID to see if it's for a statement -- if it
is, it uses the enclosing scope instead when updating the map that
trans looks at later.
I added a comment noting that this is not the best fix (since it may
cause boxes to be frozen for longer than necessary) and referring
to #3511 .
r=nmatsakis
2013-01-22 15:59:45 -08:00
Tim Chevalier
885f0a2eab
testsuite: Un-xfail test for #3029 and move to run-fail
2013-01-20 20:35:24 -08:00
Tim Chevalier
b9920b052b
testsuite: Tweak tests for #3888
2013-01-20 19:51:33 -08:00
Tim Chevalier
e5bf6d1afa
testsuite: Update error message, unbreak build
2013-01-20 18:22:11 -08:00
Tim Chevalier
ef0f71dc3f
testsuite: Add xfailed test for #4335
2013-01-19 17:39:15 -08:00
Tim Chevalier
1e1707ccb8
testsuite: Add license
2013-01-19 17:38:12 -08:00
Tim Chevalier
96b4f43675
Handle region errors where the actual scope is a statement
...
Prevents a case of "unknown scope, this is a bug".
I judged this too small to review. Closes #4500
2013-01-19 17:06:36 -08:00