Commit Graph

11771 Commits

Author SHA1 Message Date
Brian Anderson
a005b1af60 Fix some broken tests 2012-09-18 18:49:23 -07:00
Brian Anderson
be490c7f81 Fix run-pass-fulldeps/qquote.rs 2012-09-18 18:46:45 -07:00
Brian Anderson
b3b1e62750 rustdoc: Camel case 2012-09-18 16:48:58 -07:00
Graydon Hoare
e86e8c16e6 Revert "change relative priority of auto-slice and auto-ptr"
This reverts commit 2ac64d91ac.
2012-09-18 16:41:51 -07:00
Graydon Hoare
9b58369f6b Treat static slices and rptrs as sendable. 2012-09-18 16:28:16 -07:00
Patrick Walton
e653d493fb rustc: Remove legacy mode inference, unless #[legacy_modes] is used 2012-09-18 15:53:04 -07:00
Brian Anderson
d53cfd225a core: Move Exclusive and SharedMutableState to the private mod 2012-09-18 15:23:57 -07:00
Niko Matsakis
2ac64d91ac change relative priority of auto-slice and auto-ptr
rationale: if you have an impl for &const ~[T] or &mut ~[T]
and one for &[T], the first will be more likely to work and not lead
to borrowck errors.  I could imagine us wanting to offer multiple
impls for methods we select the ptr-to-array when possible and
the slice when necessary.  Also, taking a ptr seems like fewer
adaptations than slicing, and we tend to prefer fewer adaptations.
2012-09-18 14:24:52 -07:00
Gareth Daniel Smith
5d925b212e Make vec::view a method too. 2012-09-18 21:46:53 +01:00
Erick Tryzelaar
e3f5403052 libcore: str::unsafe::from_buf_len_nocopy => form_slice 2012-09-18 12:56:57 -07:00
Erick Tryzelaar
d0d68c6036 libcore: make a copyless io::BytesWriter 2012-09-18 12:56:57 -07:00
Brian Anderson
eb35039fe8 Change 'must' to 'should' in non_camel_case_types message 2012-09-18 12:18:00 -07:00
Brian Anderson
76c8b83efa Consolidate tests for non_camel_case_types 2012-09-18 11:56:08 -07:00
Brian Anderson
6473cf1757 docs: Remove elipses from examples instead of commenting them out
This causes bugs since comments aren't nestable
2012-09-18 11:54:45 -07:00
Brian Anderson
2d11a04e74 libsyntax: Remove 'unchecked_blk' from AST 2012-09-18 11:51:17 -07:00
Patrick Walton
c755449fd6 Revert "rustc: Change all non-keyword uses of "link""
This reverts commit 3b013cd800.
2012-09-18 11:47:04 -07:00
Brian Anderson
d0d8b7fe64 Remove 'unchecked' keyword 2012-09-18 11:31:58 -07:00
Brian Anderson
2cdb23bbc0 Replace uses of 'unchecked' with 'unsafe' 2012-09-18 11:31:57 -07:00
Niko Matsakis
efa6675f1d make filetype() include the "." (fixes #3412) 2012-09-18 11:29:53 -07:00
Patrick Walton
3b013cd800 rustc: Change all non-keyword uses of "link" 2012-09-18 11:27:37 -07:00
Brian Anderson
859a892eb0 Add allow(non_camel_case_types) to unconverted crates 2012-09-18 11:21:07 -07:00
Brian Anderson
5c18bf6cdd core: Rename at_vec::unsafe to raw 2012-09-18 11:19:17 -07:00
Niko Matsakis
1af4a70759 Revert "Adapt callee to avoid intermediary for move/copy arguments (cc #3402)"
This reverts commit 044fbea416.
2012-09-18 10:41:05 -07:00
Brian Anderson
f563c0b525 warn(non_camel_case_types) by default 2012-09-17 18:52:50 -07:00
Patrick Walton
409bc6fc2c libcore: Fix cleanup for i386 2012-09-17 12:01:24 -07:00
Niko Matsakis
2469cba0b1 Make auto-slice, auto-ptr not exclusive (fixes #3514) 2012-09-17 11:00:50 -07:00
Niko Matsakis
527a6f60f1 WIP: make autoslice, autoptr not be mutually exclusive 2012-09-17 09:49:53 -07:00
Niko Matsakis
48496fc1b6 add a test and correct terminology
newtype'd enums have 1 variant, and 1 field.
denegerate have only 1 variant but may have more fields.
2012-09-17 06:34:36 -07:00
Patrick Walton
be162da961 libcore: Log newtyped enums correctly. Closes #3506. 2012-09-16 09:28:21 -07:00
Brian Anderson
864cca14ee docs: Make supplemental tutorials testable 2012-09-15 18:06:20 -07:00
Erick Tryzelaar
d0d84348ef Make most send_map functions pure 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
1834249e8d libcore: add find_ref/get_ref to SendMap trait 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
10e317de54 vec::u8 => vec::bytes (#3444) 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
8dc9e6643a io::Reader::chars_from_buf => chars_from_bytes (#3444) 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
b73f801cc1 int/uint parse_buf => parse_bytes (#3444) 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
651e63cc5c libcore: rename *flate_buf to *flate_bytes (#3444) 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
f1f5739256 libcore: fix whitespace in str test 2012-09-15 13:38:41 -07:00
Erick Tryzelaar
8cf09305a7 libcore: send_map test simplification. 2012-09-15 13:38:41 -07:00
Niko Matsakis
e874d37569 add some debug!'s to help diagnose failure of issue-1763.rs 2012-09-15 13:37:35 -07:00
Niko Matsakis
4cad58c464 Fix broken assertion in regionck for code like (a[])() 2012-09-15 12:29:36 -07:00
Niko Matsakis
39d33a653f regionck: fix bug where autoref regions are not inferred to be large enough 2012-09-15 07:35:09 -07:00
Patrick Walton
73e8ce1e1f rustc: Back out box annihilator 2012-09-14 19:59:07 -07:00
Graydon Hoare
aa2ab2659f Add core::reflect, start migrating core::repr to use it. Tidy up various Repr types. 2012-09-14 19:09:38 -07:00
Patrick Walton
1c5db46f8e rustc: Call the box annihilator in main 2012-09-14 18:05:15 -07:00
Patrick Walton
24c89693f0 libcore: Remove the annihilation tests; there's no easy way to make them work.
This should hopefully put out the burning tree.
2012-09-14 16:58:23 -07:00
Patrick Walton
ce773352d0 rustc: Make the box annihilator a language item 2012-09-14 16:50:12 -07:00
Brian Anderson
c7e5c870f3 Remove restricted keyword tests 2012-09-14 16:16:46 -07:00
Patrick Walton
bc96ea2a18 libcore: Implement a box annihilator, not called yet 2012-09-14 16:13:13 -07:00
Niko Matsakis
7107b4eff5 Have parser recognize static, self region.
Fixes a bug in methods that &self couldn't be referenced in the
body. Also fixes #2479.
2012-09-14 15:22:15 -07:00
Niko Matsakis
34cece99cc replace with_find_ref() with find_ref(), which is just nicer to use 2012-09-14 15:22:15 -07:00
Patrick Walton
6a3756b0ba test: Use vec::as_imm_buf in bug-2470-bounds-check-overflow.rs 2012-09-14 12:15:40 -07:00
Niko Matsakis
044fbea416 Adapt callee to avoid intermediary for move/copy arguments (cc #3402) 2012-09-14 12:03:28 -07:00
Patrick Walton
bbfc6f8945 libcore: Make enum logging significantly less clownshoes.
Fixes the log-knows-the-names* tests.
2012-09-14 11:22:17 -07:00
Graydon Hoare
127c0d40ac Teach path to collapse double-slashes in components. Close #3430. 2012-09-13 19:53:30 -07:00
Graydon Hoare
c5347b4bf9 Fix implicit-instantiation of non-implicitly-copyable warnings. 2012-09-13 19:53:30 -07:00
Graydon Hoare
120a3dede0 Fix unused variable warning. 2012-09-13 19:53:30 -07:00
Brian Anderson
d71179f410 Promote 'fail' to a strict keyword 2012-09-13 17:10:01 -07:00
Graydon Hoare
989536083d Fix stray vec::as_buf, try to put out fire on win32. 2012-09-13 16:16:15 -07:00
Graydon Hoare
ccd4a0e362 Doc fix, close #3419 2012-09-13 16:10:21 -07:00
Brian Anderson
8a8ca1863d Fix broken test in core::task 2012-09-13 15:06:40 -07:00
Niko Matsakis
43924f1f9f fix some of the broken tests (the ones that were doing the right thing) 2012-09-13 15:05:30 -07:00
Brian Anderson
a544b83788 core: Fix stray usage of vec::unsafe on FreeBSD 2012-09-13 14:33:15 -07:00
Niko Matsakis
0e584f2e74 Fix bug in auto-ref on bounded type parameters 2012-09-13 13:24:34 -07:00
Niko Matsakis
2f6b66ecd3 s/vec::as_buf/vec::as_imm_buf/, fix comment, remove set.rs
hat tip to @jruderman
2012-09-13 13:24:33 -07:00
Kevin Cantu
c43426e35b CamelCase and demode json.rs and deque.rs 2012-09-13 12:05:03 -07:00
Brian Anderson
6f9539a15c Merge pull request #3487 from Blei/fix-3465
rt: Implement ThreadPerCore scheduling mode
2012-09-13 12:01:15 -07:00
Brian Anderson
b776395263 core: Remove old definition of rt_fail 2012-09-13 11:49:55 -07:00
Philipp Brüschweiler
62b51d9152 rt: Implement ThreadPerCore scheduling mode
Fixes #3465.
2012-09-13 20:48:33 +02:00
Brian Anderson
1faa288a36 Register snapshots 2012-09-13 11:41:50 -07:00
Patrick Walton
57f99326a7 libcore: Make logging of structural subcomponents after a pointer not crash 2012-09-13 11:20:19 -07:00
Niko Matsakis
e0845eb589 repr: emit closing ) for enum variants, test that nullary variants names print 2012-09-13 11:10:05 -07:00
Niko Matsakis
e21b48c0ce remove commented code that used to cause borrowck error
Fixes #2280
2012-09-13 09:14:49 -07:00
Niko Matsakis
0a504890f3 Convert package list to dvec (cc #2280) 2012-09-13 09:14:49 -07:00
Niko Matsakis
109055c7d3 make iter::position() not require Eq 2012-09-13 09:14:49 -07:00
Niko Matsakis
7e5661214a Remove unnecessary temporary, add type annot to help inferencer (cc #2280) 2012-09-13 09:14:49 -07:00
Brian Anderson
308ca06012 Rename str::unsafe to str::raw 2012-09-12 19:55:16 -07:00
Patrick Walton
59c3c6c147 libcore: Remove debugging code from transmute.
Was causing huge code bloat.
2012-09-12 19:08:01 -07:00
Patrick Walton
df712ab3d5 libcore: Make %? use the visitor, not shape glue 2012-09-12 18:59:14 -07:00
Patrick Walton
45f5f8ec45 libcore: Add some visitor-based logging functionality 2012-09-12 18:22:08 -07:00
Erick Tryzelaar
8299f3a447 libcore: add send_map::with_find_ref and with_get_ref. 2012-09-12 18:19:06 -07:00
Erick Tryzelaar
35a418eb88 libcore: modernize send_map's whitespacing 2012-09-12 18:19:06 -07:00
Niko Matsakis
34bf0b9e97 trans: overhaul match bindings. No more phi, one code path for guards.
Fixes #3256.
Fixes #3291.
2012-09-12 18:15:22 -07:00
Brian Anderson
ff54ac8e59 Rename vec::unsafe to vec::raw 2012-09-12 17:45:36 -07:00
Graydon Hoare
37cf649311 Document IterBytes, Eq, Cmp, Hash. Close #3449. 2012-09-12 17:08:25 -07:00
Philipp Brüschweiler
7a6df9c90f core: Implement ToStr for @str 2012-09-12 17:08:25 -07:00
Brian Anderson
7568dd4564 Promote 'const', 'copy', 'fn' to strict keywords 2012-09-12 16:00:22 -07:00
Niko Matsakis
7eb10c4ce1 purge the separate path for rel ops (e.g., ==) vs other bin ops 2012-09-12 15:41:22 -07:00
Brian Anderson
3057790f4b Rename 'contextual' keywords to 'temporary' 2012-09-12 15:22:34 -07:00
Brian Anderson
287114a3b9 Remove some transitional code 2012-09-12 15:09:21 -07:00
Brian Anderson
fa74edf1a0 rustc: Use the correct 'fail' rtcall 2012-09-12 15:04:40 -07:00
Graydon Hoare
719a4750ba Add some monomorphizing instrumentation, simplify types before emitting glue. 2012-09-12 14:48:18 -07:00
Graydon Hoare
4ce2ee12be Add a bunch of inline hints. 2012-09-12 14:48:18 -07:00
Brian Anderson
3c14dae4a6 Register snapshots 2012-09-12 14:36:35 -07:00
Niko Matsakis
5d540de769 fixup mutability of vec::each, make iter_bytes pure
also, change DVec() to work with imm vectors rather than mut ones
2012-09-12 13:29:31 -07:00
Brian Anderson
8fbe4b5841 Rename core::rt_fail to core::rt_fail_ 2012-09-12 11:52:00 -07:00
Tim Chevalier
86e02554fd Make moves in arguments explicit in libsyntax and rustc 2012-09-12 11:33:40 -07:00
Brian Anderson
320331fe35 Use a different strategy for transitioning to camel case extfmt 2012-09-12 11:22:48 -07:00
Niko Matsakis
2eef6658c3 update to store map on stack, taking advantage of auto-ref 2012-09-12 06:47:28 -07:00
Niko Matsakis
8a8f200d10 Introduce auto adjustment table to subsume autoderef/autoref/borrowings.
Fixes #3261
Fixes #3443
2012-09-11 21:25:01 -07:00
Tim Chevalier
02b41097e4 Make the 'move mode but datum will not store' error fatal 2012-09-11 20:02:34 -07:00
Tim Chevalier
8f34752975 Remove dead code 2012-09-11 20:02:34 -07:00
Tim Chevalier
c087886e93 Make moves explicit in arguments 2012-09-11 20:02:34 -07:00
Brian Anderson
2c6c963f61 Convert core::extfmt to camel case 2012-09-11 19:41:07 -07:00
Brian Anderson
ec225166cd rustdoc: Fix formatting of -h 2012-09-11 19:40:20 -07:00
Brian Anderson
be1fdf983f Promote 'impl' from restricted keyword to strict 2012-09-11 19:28:44 -07:00
Brian Anderson
3d2a74a160 Reserve 'be' as a keyword 2012-09-11 19:26:48 -07:00
Brian Anderson
ea01ee2e9e Convert 'use' to 'extern mod'. Remove old 'use' syntax 2012-09-11 19:25:43 -07:00
Brian Anderson
fb851242b7 Promote 'pub' and 'priv' from restricted to strict keywords 2012-09-11 18:17:26 -07:00
Brian Anderson
8672b9003f Merge pull request #3440 from jld/vec-dedup
Add vec::dedup for in-place consecutive duplicate element removal.
2012-09-11 17:25:21 -07:00
Drew Willcoxon
98bd4a992c Improve unexpected error scanner for compile-fail tests (Closes #1476) 2012-09-11 17:22:24 -07:00
Brian Anderson
dc11e87b84 Fix combine-tests.py for new syntax 2012-09-11 17:17:16 -07:00
Brian Anderson
27cc0a36b6 Promote 'struct' from a restricted keyword to a strict keyword 2012-09-11 17:15:33 -07:00
Brian Anderson
1203da3b9d Remove priv sections from classes. Obsolete the syntax 2012-09-11 15:29:37 -07:00
Tim Chevalier
3aa5b0cb44 Make moves explicit in rustc 2012-09-11 13:59:57 -07:00
Patrick Walton
4a865401f5 rustc: Remove a bunch of unused upcalls 2012-09-11 12:17:48 -07:00
Patrick Walton
23880daef2 rustc: Remove the cmp type upcall 2012-09-11 12:12:13 -07:00
Brian Anderson
cd8ec6d923 Fix ebml tests 2012-09-10 19:36:11 -07:00
Brian Anderson
298eb8c726 Convert 'import' to 'use'. Remove 'import' keyword. 2012-09-10 19:04:26 -07:00
Brian Anderson
1a8a0a77b1 Camel case std::serialization 2012-09-10 19:02:57 -07:00
Tim Chevalier
f8b3eaae82 Make all moves explicit in libsyntax 2012-09-10 18:28:47 -07:00
Brian Anderson
6957af770b Report obsolete trait lists on structs 2012-09-10 18:12:35 -07:00
Tim Chevalier
9869d071d1 Make remaining moves explicit in libstd 2012-09-10 17:51:24 -07:00
Brian Anderson
73eb894305 Report obsolete class method syntax 2012-09-10 17:48:33 -07:00
Brian Anderson
df79026169 Promote 'return' from a restricted keyword to a strict keyword 2012-09-10 17:27:10 -07:00
Patrick Walton
2aa67e9aa9 rustc: Stop calling cmp shape glue in trans.
XFAIL's alt-borrowed_str for now. Will need to fix this up in the future.
2012-09-10 17:26:17 -07:00
Brian Anderson
cb7a5395dd Convert std::map to camel case 2012-09-10 17:08:36 -07:00
Niko Matsakis
29003c799f Rename the poorly named Managed<T> type to Mut<T>.
The Mut<T> type is intended to allow freezable data stuctures to be stored in
`@mut` boxes. Currently this causes borrowck to be very conserivative since it
cannot prove that you are not modifying such a structure while iterating over
it, for example.  But if you do `@Mut<T>` instead of `@mut T`, you will
effectively convert borrowck's static checks into dynamic ones.  This lets
you use the e.g. send_map just like a Java Map or something else.
2012-09-10 16:50:07 -07:00
Niko Matsakis
2026359518 fix a implicitly copyable warning 2012-09-10 16:50:07 -07:00
Tim Chevalier
f2d9d0ba41 Make all remaining moves explicit in libcore 2012-09-10 16:31:39 -07:00
Brian Anderson
93d3b8aa6b Convert class methods to impl methods. Stop parsing class methods 2012-09-10 16:13:08 -07:00
Patrick Walton
bea6fe0ec1 rustc: Trim down and rename trans_compare. Now only eq shape glue remains. 2012-09-10 15:48:05 -07:00
Brian Anderson
10aa849d28 Fix broken tests 2012-09-10 15:36:04 -07:00
Patrick Walton
7e9f98a8c9 rustc: Make range literals use compare_scalar_types instead of trans_compare 2012-09-10 15:27:12 -07:00
Tim Chevalier
5eccf84919 Capitalize Copy trait in test 2012-09-10 15:24:42 -07:00
Tim Chevalier
1a33c25d6f Make moves explicit in pipes and pipe compiler 2012-09-10 15:15:10 -07:00
Patrick Walton
3c7cc9a1b8 rustc: Long lines 2012-09-10 15:12:37 -07:00
Patrick Walton
d6ceef95ba rustc: Move trans_compare into alt.rs 2012-09-10 15:10:28 -07:00
Brian J. Burg
10a7865428 Provide naive implementations of cmp::Eq and to_bytes::IterBytes for net::url::Url 2012-09-10 14:20:39 -07:00
Tim Chevalier
a07ea73bdb Make moves explicit in task; also make option::unwrap take its argument by move 2012-09-10 13:36:54 -07:00
Niko Matsakis
04f1763409 Combine the vtable_origins from impl + method.
Not as clean as it could be, but fixes #3314.
2012-09-10 12:59:17 -07:00
Patrick Walton
22b8757705 rustc: Make shape-based compare glue never called for comparison operators.
Only called for string patterns.
2012-09-10 12:48:42 -07:00
Tim Chevalier
9a15c50f6c Uppercase Send bound and make test for #2834 work 2012-09-10 12:38:52 -07:00
Tim Chevalier
e666fe89dd Make more moves explicit in libcore 2012-09-10 12:38:52 -07:00
Brian Anderson
ef9aa80438 Promote most restricted keywords to strict keywords 2012-09-10 12:07:19 -07:00
Tim Chevalier
233e595b61 Un-xfail test for #2834
Since it seems to work now.

Closes #2834
2012-09-10 12:06:27 -07:00
Tim Chevalier
c104745255 Make moves explicit in vec
I'm continuing to make moves explicit, despite #3413, because that
seems like the most reliable way to make these changes. Once I've made
all the moves explicit, the test for #3413 will be that I can remove them.
2012-09-10 11:15:36 -07:00
Jed Davis
4ea45669b8 Add vec::dedup for in-place consecutive duplicate element removal. 2012-09-10 00:42:58 -07:00
Patrick Walton
e5cb6cc123 libstd: Fix botched exports for net_tcp 2012-09-09 21:58:28 -07:00
Brian Anderson
901543ff89 Reformat comments 2012-09-09 17:42:00 -07:00
Brian Anderson
e7a01b7383 Introduce 'strict' keywords, that may not be used as idents anywhere 2012-09-09 17:35:56 -07:00
Brian Anderson
e0c232025c Long lines 2012-09-09 17:23:29 -07:00
Brian Anderson
528373b79b Turn most contextual keywords into restricted keywords 2012-09-09 16:53:47 -07:00
Brian Anderson
f53c2948aa Rename variables that clash with keywords 2012-09-09 16:53:19 -07:00
Brian Anderson
9007afab0a std: warn(non_camel_case_types) -> deny 2012-09-09 15:00:29 -07:00
Brian Anderson
a026e9a5cd core: warn(non_camel_case_types) -> deny 2012-09-09 14:51:56 -07:00
Brian Anderson
9c98d0f99b Fix some old syntax 2012-09-08 20:04:21 -07:00
Brian Anderson
25dc59dc59 libsyntax: Parse and report errors for a few obsolete syntaxes 2012-09-08 20:04:21 -07:00
Jeff Olson
2508c24276 core: fix separator for Future<A> property 2012-09-08 14:22:16 -07:00
Jeff Olson
8e86cd0aa7 test: bunch of test cleanup from sendable_futures change 2012-09-08 14:22:16 -07:00
Jeff Olson
12439b0b24 core: missed rebase cruft cleanup 2012-09-08 14:22:16 -07:00
Jeff Olson
3e58158375 core: most rebase cruft cleanup 2012-09-08 14:22:16 -07:00
Jeff Olson
6d84d86736 core: change FutureState Forced(A) to Forced(~A) 2012-09-08 14:22:16 -07:00
Jeff Olson
2ed00ff928 core: change notify_chan eq checks to is_none(), instead 2012-09-08 14:22:16 -07:00
Jeff Olson
02ddbadc10 core: patch from nmatsakis to make futures non-copyable 2012-09-08 14:22:15 -07:00
Jeff Olson
27129c6aba core/std: finish making futures sendable + test.. still issues 2012-09-08 14:22:15 -07:00
Jeff Olson
6bdda1e0de core/std: an unending parade of minor tweaks due to renaming Option et al 2012-09-08 14:22:15 -07:00
Jeff Olson
9ee7b31414 std: cleanup in sync.rs for things missed in last rebase 2012-09-08 14:22:15 -07:00
Jeff Olson
2f32c0d5c3 core: cleanup in task.rs for things missed in last rebase 2012-09-08 14:22:15 -07:00
Jeff Olson
d41af3e002 core: fix breakage in TaskBuilder.future_result
the actual "fix" in this change is the chunk that moves
`let x = self.consume()` to after the option dance that results in
the `notify_chan` in TaskBuilder.try()

the rest is cleanup/sense-making of what some of this code is doing (I'm
looking at you, future_result)
2012-09-08 14:22:15 -07:00
Jeff Olson
a8fc771f20 core: changing pipes::port/chan_one to Port/ChanOne in unsafe.rs 2012-09-08 14:22:15 -07:00
Brian Anderson
70e5a19ebf core: Fix stage0 build errors 2012-09-08 14:22:15 -07:00
Jeff Olson
63e25946f0 core: port task.rs to comm::Chan/Port to pipes::Chan/Port 2012-09-08 14:22:15 -07:00
Kevin Cantu
00d1d4e647 (fix incoming) Add the necessary traits to some generic functions 2012-09-07 21:57:40 -07:00
Kevin Cantu
a12e90b65f (partially fix incoming) More hash function simplification 2012-09-07 21:08:37 -07:00
Brian Anderson
3bd1f32cd9 Convert all kind bounds to camel case. Remove send, owned keywords. 2012-09-07 18:10:11 -07:00
Brian Anderson
07fe5611ad Remove import and export from intrinsic.rs 2012-09-07 18:08:03 -07:00
Brian Anderson
cd3956054d Fix obsolete struct syntax in test 2012-09-07 17:54:47 -07:00
Brian Anderson
2810ea9a68 Convert 'again' to 'loop'. Remove 'again' keyword 2012-09-07 17:39:03 -07:00
Graydon Hoare
073df63c72 Fix long line. 2012-09-07 17:27:05 -07:00
Graydon Hoare
8b39e73697 Fix whitespace. 2012-09-07 17:26:10 -07:00
Graydon Hoare
5d823d46ad Migrate std::map to use core:#️⃣:Hash trait. Disable many hokey hashes. 2012-09-07 17:24:16 -07:00
Tim Chevalier
f5093dff7b Remove support for multiple traits in a single impl
There was half-working support for them, but they were never fully
implemented or even approved. Remove them altogether.

Closes #3410
2012-09-07 17:22:04 -07:00
Tim Chevalier
53ce42dc4f Implement &-patterns
Closes #2855
2012-09-07 17:09:07 -07:00
Graydon Hoare
e9f5a099df Add an ignore! macro, remove support for nested block comments, re: #2755. 2012-09-07 16:58:36 -07:00
Brian Anderson
249668f223 Remove module keyword 2012-09-07 16:53:21 -07:00
Brian Anderson
f0eae8f1c1 Convert field terminators to commas. Stop parsing semis. 2012-09-07 16:12:15 -07:00
Patrick Walton
3078830934 libcore: Make str_eq not break with coretest 2012-09-07 16:09:38 -07:00
Patrick Walton
1fcfee674a rustc: Add a str_eq lang item for pattern matching 2012-09-07 15:46:08 -07:00
Brian Anderson
2572e80355 Remove 'let' syntax for struct fields 2012-09-07 14:02:33 -07:00
Niko Matsakis
14303bad89 Do not copy values of type () or _|_
This can trigger a crash because we assume we
can supply null ptrs and undefined values for
values of those types, as we should be treated
them as zero-size.

Interestingly, this crash only shows up (atm)
in non-optimized builds.  Therefore, I added
a -Z no-opt flag so that the new test
(capture_nil) can specify that it should not
run with optimizations enabled.
2012-09-07 13:00:03 -07:00
Patrick Walton
c21b3ff818 rustc: Make "ne" use traits 2012-09-07 12:44:53 -07:00
Patrick Walton
b4d879a2ef rustc: Trailing whitespace 2012-09-07 12:27:44 -07:00
Patrick Walton
feb014eb3c rustc: Add an "ne" method to the Eq trait, and implement it everywhere 2012-09-07 12:24:48 -07:00
Tim Chevalier
ac1f84c153 Don't check impl ty params for equality with trait ty params
This was too restrictive. We need to check the number of ty params,
and that the bounds are equal, but otherwise require_same_types does the job.

Closes #2611
2012-09-07 12:11:17 -07:00
Tim Chevalier
c6b51547c1 In typeck, don't assume traits with default methods are in the same crate
But note that default methods still don't work cross-crate (see #2794) --
this just makes it so that when a method is missing in a cross-crate impl,
the right error message gets printed.

Closes #3344
2012-09-07 10:27:29 -07:00
Niko Matsakis
cd3cc6d17b Ensure that scratch datum's are zeroed out in the alloca phase.
This should address the valgrind failure that @elliotslaughter
was seeing, though I am not sure why the bots / test continued
to pass, since this is precisely the condition this test was looking
for!
2012-09-07 09:32:56 -07:00
Elliott Slaughter
cb53623341 gc: Add early abort when GC is disabled. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
244b95490b gc: Refactoring. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
d22b7ca39a gc: Documentation. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
8d17308eca rt: Add rust_gc_metadata to rustrt.def.in. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
5637126449 rt: Fix GC metadata for 64-bit systems. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
961bd48724 gc: Fix for GC missing stack frames across segment boundaries. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
578b036f9b gc: Don't expect sentinel when core is compiled without GC. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
7823ad8586 gc: Avoid walking stack above caller frame.
Mark the base GC stack frame with a sentinel value so we know when to
start collecting.
2012-09-07 09:21:21 -07:00
Elliott Slaughter
88f5ab3163 gc: Fix for deallocating resources on the shared heap while cleaning stack. 2012-09-07 09:21:21 -07:00
Elliott Slaughter
3405c548e8 gc: Avoid freeing null pointers. 2012-09-07 09:21:21 -07:00
Elliott Slaughter
9ea4afe5da gc: Avoid double free when pointer appears on stack multiple times. 2012-09-07 09:21:21 -07:00
Elliott Slaughter
3f0d207b32 gc: Add stack walker for new garbage collector.
Safe points are exported in a per-module list via the crate map. A C
runtime call walks the crate map at startup and aggregates the list of
safe points for the program.

Currently the GC doesn't actually deallocate memory on malloc and
free. Adding the GC at this stage is primarily of testing value.

The GC does attempt to clean up exchange heap and stack-allocated
resource on failure.

A result of this patch is that the user now needs to be careful about
what code they write in destructors, because the GC and/or failure
cleanup may need to call destructors. Specifically, calls to malloc
are considered unsafe and may result in infinite loops or segfaults.
2012-09-07 09:21:21 -07:00
Niko Matsakis
fb8786fe52 Refactor fn_ty, working towards #3320 2012-09-07 07:54:11 -07:00
Brian Anderson
699505899e Register snappshots 2012-09-06 19:58:42 -07:00
Tim Chevalier
8152164a34 Another test for #2587 2012-09-06 16:46:59 -07:00
Tim Chevalier
46990ad111 Use callee ID when kind-checking expressions that may be overloaded
And fix up test cases that should have failed if not for this bug.

Closes #2587
2012-09-06 15:44:10 -07:00
Niko Matsakis
c5e2cf2ee5 Repair long lines 2012-09-06 15:40:11 -07:00
Niko Matsakis
ee4ba4490d Issue #3402: Load immediate rvalues right away
Should lead to smaller stack frames, hopefully reducing
the perf hits we saw
2012-09-06 15:23:03 -07:00
Niko Matsakis
fe9f0556d2 Refactor ty_var and ty_var_integral into one ty_infer variant 2012-09-06 12:31:33 -07:00
Niko Matsakis
d5b3e44b47 emacs mode: include use as a keyword 2012-09-06 12:31:33 -07:00
Tim Chevalier
a5285f148c Add test for issue 3305 2012-09-06 12:30:47 -07:00
Tim Chevalier
55bd6cee2f Test that merge sort is stable -- thanks to Jesse Jones
Closes #3399
2012-09-06 12:11:48 -07:00
Brian Anderson
b4e547d71a Remove struct ctors 2012-09-06 10:52:26 -07:00
Niko Matsakis
5e36a99794 Refactor trans to replace lvalue and friends with Datum.
Also:
- report illegal move/ref combos whether or not ref comes first
- commented out fix for #3387, too restrictive and causes an ICE
2012-09-06 06:11:12 -07:00
Patrick Walton
adc1427282 libcore: Expose glues to core 2012-09-05 21:10:22 -07:00
Patrick Walton
f6d50d866a libcore: Make to_upper() and to_lower() pure 2012-09-05 20:55:28 -07:00
Patrick Walton
d155410674 rt: Make the boxed region come earlier in the rust_task structure.
This is so that GC can find it more easily.
2012-09-05 20:08:00 -07:00
Tim Chevalier
2d116cbbed Start making moves explicit in libcore
This is in preparation for issue 2633. Replaced implicit moves that
rely on last-use with explicit moves in char, float, and str.
2012-09-05 19:20:01 -07:00
Patrick Walton
2ba632a683 vim: Turn "pub" into a big asterisk for those who dislike the look of it.
This is not the default and must be turned on.
2012-09-05 18:59:01 -07:00
Tim Chevalier
3a34c96086 Add a lint pass for structural records
Closes #3322
2012-09-05 18:35:30 -07:00
Patrick Walton
0a852e0da0 rustc: Make "priv" work on enum variants 2012-09-05 17:24:28 -07:00
Brian Anderson
9097410b43 Fix tutorial tests 2012-09-05 17:04:51 -07:00
Graydon Hoare
0ddae5ec7d Add str::trim{_,_left_,_right_}chars. 2012-09-05 16:53:55 -07:00
Graydon Hoare
15b4734d0c Remove 'use' line that's confusing pp-exact during use/import transition. 2012-09-05 16:53:55 -07:00
Graydon Hoare
81695d85dc Mark crate metadata with a version tag. Close #3390. 2012-09-05 16:53:55 -07:00
Patrick Walton
31af60b257 rustc: Fix double-reporting of private item errors. Un-XFAIL private-item-simple.rs. 2012-09-05 16:21:53 -07:00
Brian Anderson
f7681f9236 Accept Copy, Send, Const, Owned, as kind bounds 2012-09-05 15:31:38 -07:00
Patrick Walton
e7fe903d88 libsyntax: Make "pub use" mean the same thing as the former "import" in all circumstances 2012-09-05 13:26:46 -07:00
Patrick Walton
f686896f60 test: "import" -> "use" 2012-09-05 12:32:05 -07:00
Patrick Walton
47dac47e96 rustc: "import" -> "use" in .rc files 2012-09-05 11:46:25 -07:00
Patrick Walton
ba94b64698 cargo: "import" -> "use" 2012-09-05 11:39:22 -07:00
Patrick Walton
e4e9788b3a fuzzer: "import" -> "use" 2012-09-05 11:38:37 -07:00
Patrick Walton
914b6fead9 test: Fix smallintmap test 2012-09-05 11:24:44 -07:00
Tim Chevalier
9db4445454 Merge pull request #3316 from Vincent-Belliard/issue_3222
fix issue #3222
2012-09-05 10:58:16 -07:00
Patrick Walton
fa2fb0f868 rustdoc: "import" -> "use" 2012-09-05 10:41:47 -07:00
Vincent Belliard
d12128f56f fix issue #3222 2012-09-05 16:38:00 +02:00
Patrick Walton
9b88b5fe38 rustc: Don't allow private fields to be named in constructors or destructured 2012-09-04 19:07:23 -07:00
Patrick Walton
fba673b26b rustc: Implement private methods.
Doesn't work cross-crate yet.
2012-09-04 18:30:27 -07:00
Brian Anderson
a618d0d7ce std: Convert test to camel case 2012-09-04 18:26:30 -07:00
Brian Anderson
9c988eb40d Whitespace 2012-09-04 17:54:20 -07:00
Brian Anderson
eb0cf3a715 std: Remove struct ctors 2012-09-04 17:27:03 -07:00
Tim Chevalier
268850f67b xfail-fast anon-extern-mod-cross-crate-2 2012-09-04 17:23:26 -07:00
Tim Chevalier
451da07718 Allow anonymous extern mods
Now you can write:

extern {
  f() -> int;
}

and f will be accessible in the enclosing scope.
2012-09-04 16:41:19 -07:00
Brian Anderson
c491bf939e std: Camel case smallintmap 2012-09-04 16:04:10 -07:00
Brian Anderson
200959d7ce Remove 'with' 2012-09-04 15:47:04 -07:00
Brian Anderson
02b1c32e4d core: Remove struct ctors 2012-09-04 15:46:33 -07:00
Brian Anderson
ab9cf45a7c syntax: Remove 'of' and 'check' from keyword table 2012-09-04 15:43:46 -07:00
Patrick Walton
8415515cbe libcore: Make as_bytes_slice() not include the null byte 2012-09-04 15:23:30 -07:00
Patrick Walton
127144bf38 rustc: Implement private fields for max/min classes 2012-09-04 14:50:46 -07:00
Brian Anderson
8182497359 std: Camel case sort 2012-09-04 14:37:47 -07:00
Brian Anderson
a04cb8ebb7 Fix broken test case 2012-09-04 14:36:21 -07:00
Brian Anderson
0684c065a9 std: Camel case treemap 2012-09-04 14:35:43 -07:00
Brian Anderson
3764fe3f2a std: Camel case list 2012-09-04 14:12:49 -07:00
Brian Anderson
d3e75ea375 Parse 'loop' and 'again' the same 2012-09-04 13:37:11 -07:00
Gareth Daniel Smith
92f3b74db2 Use struct+impl syntax instead of the (deprecated) struct with embedded methods syntax. Also standardise the comment indentation and add some whitespace between items. 2012-09-04 13:23:23 -07:00
Gareth Daniel Smith
c5f674ae2a fix two issues with the exports:
1. from_bytes, from_bools and from_fn were not exported but should have been.
2. lots of stuff that either didnt exist or didnt need exporting was being exported.
2012-09-04 13:23:22 -07:00
Gareth Daniel Smith
9297c76598 add additional Bitv constructors (as proposed in issue #2964) 2012-09-04 13:23:22 -07:00
Brian Anderson
f445497d6b Merge pull request #3383 from crabtw/fbsd
use native log2 function and enable freebsd tests in uv_ll
2012-09-04 12:14:09 -07:00
Patrick Walton
a26837c478 rustc: "import" -> "use" 2012-09-04 11:54:36 -07:00
Patrick Walton
8ff18acc82 libsyntax: "import" -> "use" 2012-09-04 11:43:23 -07:00
Kevin Cantu
3f92cf2659 Demode libstd/net_ip.rs 2012-09-04 11:33:23 -07:00
Kevin Cantu
d072bc09a7 Demode libstd/net_url.rs 2012-09-04 11:33:23 -07:00
Kevin Cantu
9c8b0c6006 Demode treemap.rs 2012-09-04 11:30:49 -07:00
Kevin Cantu
100368ab86 Confirm demoding of smallintmap.rs 2012-09-04 11:30:48 -07:00
Kevin Cantu
3283b137b7 Confirm demoding of term.rs 2012-09-04 11:30:01 -07:00
Brian Anderson
d55917ea59 std: Fix net::url constructor names 2012-09-04 11:28:38 -07:00
Andrew Paseltiner
225cdc4894 add test for eq_slice fix 2012-09-04 11:27:11 -07:00
Andrew Paseltiner
21172ee280 fix str::eq_slice off-by-one error 2012-09-04 11:27:11 -07:00
Patrick Walton
2d690ae43f libstd: "import" -> "use" 2012-09-04 11:23:53 -07:00
Patrick Walton
437073868e libcore: "import" -> "use" 2012-09-04 11:12:17 -07:00
Jyun-Yan You
ff4b754958 use native log2 function and enable freebsd tests in uv_ll 2012-09-05 02:03:56 +08:00
Patrick Walton
7550e45930 libstd: Make ToBase64 take slices 2012-09-03 22:41:10 -07:00
Patrick Walton
0c2674f947 libstd: Make URL parsing not require unique strings, and have URLs implement FromStr.
I considered changing FromStr to return a Result<E> parameterized
over an error type E, but I decided that was premature abstraction.
If you want the URL parsing error, call url::from_str() directly.
2012-09-03 17:03:19 -07:00
Brian Anderson
5aedabf1a3 rustc: Run all intrinsics through the monomorphiser
Intrinsics always want to be inlined.
2012-09-03 16:46:15 -07:00
Patrick Walton
bb348ccab1 libstd: Export query_to_str from net::url 2012-09-03 16:10:01 -07:00
Brian Anderson
ac31fdd9c4 Fix cross-crate inlining of intrinsics 2012-09-03 16:01:51 -07:00
Patrick Walton
cd15eac9cf libcore: Add missing from_str.rs 2012-09-03 15:59:37 -07:00
Patrick Walton
8f840f9ea0 libstd: Implement a Sort trait.
This depends on the previous fix to not assert.
2012-09-03 15:59:10 -07:00
Patrick Walton
5573ad723f rustc: Fix an LLVM assertion that tripped when borrowing a by-val method receiver.
In certain lvalue code paths, the type of the borrowed value was not
being used to generate temporary spills. I'm a bit surprised we didn't
hit this sooner.
2012-09-03 15:59:10 -07:00
Brian Anderson
e767011b77 core: Add missing from_str.rs 2012-09-03 14:14:17 -07:00
Patrick Walton
199ed4d940 libstd: Export the url() constructor from net_url 2012-09-03 13:25:32 -07:00
Patrick Walton
aefc884cf6 libcore: Add a from_str trait 2012-09-03 13:09:24 -07:00
Patrick Walton
07ee2997e6 libstd: Make net_url::encode no longer require a unique string 2012-09-03 12:33:51 -07:00
Patrick Walton
c2f8cf9dc1 libcore: Remove as_bytes_slice 2012-09-03 12:33:43 -07:00
Patrick Walton
68704e4ca7 libstd: Make URLs structs 2012-09-02 20:59:46 -07:00
Brian Anderson
f393100b7c Camel case core::ops 2012-09-02 18:13:56 -07:00
Brian Anderson
cb0eb66672 std: Camel case the rope module 2012-09-02 17:32:22 -07:00
Patrick Walton
b808cfbb74 rustc: Don't translate the expression twice when adapting a borrowed method receiver. Closes #3357.
Adds a test case. I had to stare at this one for a bit.
2012-09-02 16:51:05 -07:00
Brian Anderson
49c9ac175f Silence non-implicitly-copyable-typarams in coretest 2012-09-02 16:34:36 -07:00
Brian Anderson
ffa5d76a78 core: Only warn about implicitly copying vecs 2012-09-02 16:21:57 -07:00
Brian Anderson
117aa8cfee core: warn(non_camel_case_types) everywhere, with few exceptions 2012-09-02 16:14:26 -07:00
Brian Anderson
a80b7dc709 Fix use of reinterpret_cast in to_mut_unsafe_ptr 2012-09-02 16:03:37 -07:00
Brian Anderson
512a769f6f std: Allow camel case for list type 2012-09-02 15:57:49 -07:00
Patrick Walton
f03ed73c5e libcore: Add ptr::to_mut_unsafe_ptr 2012-09-02 15:54:24 -07:00