Commit Graph

175 Commits

Author SHA1 Message Date
Patrick Walton
4faf63e472 libstd: Remove all newtype enums from std and core. 2013-03-11 09:35:59 -07:00
Patrick Walton
d18f785457 librustc: Replace all uses of fn() with &fn(). rs=defun 2013-03-11 09:35:58 -07:00
Ben Striegel
fdf69dd7b0 Finish de-implicit-selfing everything but the test suite 2013-03-08 19:34:39 -05:00
Patrick Walton
d661711cc2 test: Fix tests. 2013-03-07 22:37:58 -08:00
Patrick Walton
d7e74b5e91 librustc: Convert all uses of assert over to fail_unless! 2013-03-07 22:37:57 -08:00
Patrick Walton
239e64242c libsyntax: Stop parsing structural record types 2013-03-07 22:32:52 -08:00
Patrick Walton
6b5d1afeec librustc: Remove "extern mod { ... }" from librustc, librustdoc, and tests. rs=deexterning 2013-03-07 22:32:52 -08:00
Niko Matsakis
3168fe06ff Add manual &self/ and &static/ and /&self declarations that
are currently inferred.  New rules are coming that will require
them to be explicit.  All add some explicit self declarations.
2013-03-06 15:12:57 -05:00
Erick Tryzelaar
a18bf8c67d rustc: minor code cleanup 2013-03-05 19:37:50 -08:00
Erick Tryzelaar
5ae06ae9de core: convert vec::{tail,tailn} to return references 2013-03-05 19:37:04 -08:00
Erick Tryzelaar
359bb3e10b core: convert vec::{head,head_opt} to return references 2013-03-05 19:37:04 -08:00
Erick Tryzelaar
431e756fd7 rustdoc: change paragraphs fn to take &str 2013-03-05 19:37:04 -08:00
Erick Tryzelaar
ac4016ff99 rustdoc: Remove a unused variable warning 2013-03-05 19:37:04 -08:00
Alex Crichton
cb4ab76e4a Adding missing imports for tests, and gate off others 2013-03-04 12:27:01 -05:00
Alex Crichton
dfb5c10dea Remove unused imports throughout src/ 2013-03-04 12:27:01 -05:00
Patrick Walton
ce3b17badd librustdoc: Remove fn@, fn~, and fn& from compiletest, fuzzer, rustdoc, and rt. rs=defun 2013-03-02 18:47:47 -08:00
Patrick Walton
a3f728238b librustc: Forbid chained imports and fix the logic for one-level renaming imports 2013-03-02 16:49:30 -08:00
Erick Tryzelaar
aa3505d8ff Merge remote-tracking branch 'remotes/origin/incoming' into incoming 2013-03-01 20:35:55 -08:00
Patrick Walton
9519ee5d80 librustc: "APL2" -> "ASL2". rs=license-fix 2013-03-01 08:41:31 -08:00
Patrick Walton
c355f17943 Merge remote branch 'sevrak/issue-5164' into incoming 2013-03-01 08:39:02 -08:00
Erick Tryzelaar
85fecd0ba7 Merge remote-tracking branch 'remotes/origin/incoming' into incoming 2013-03-01 07:01:48 -08:00
Patrick Walton
107bf96ff0 librustc: Mark all type implementations public. rs=impl-publicity 2013-02-28 11:32:24 -08:00
Erick Tryzelaar
d2c4b6492d Merge remote-tracking branch 'remotes/origin/incoming' into incoming 2013-02-28 07:25:49 -08:00
Erick Tryzelaar
3953bdd812 Merge remote-tracking branch 'remotes/origin/incoming' into incoming 2013-02-28 07:25:31 -08:00
sevrak
833ad6018e Fix license attribute on crates 2013-02-28 13:34:01 +00:00
bors
c705440ee3 auto merge of #5155 : bstrie/rust/dedrop, r=pcwalton
This removes all but 6 uses of `drop {}` from the entire codebase. Removing any of the remaining uses causes various non-trivial bugs; I'll start reporting them once this gets merged.
2013-02-27 23:30:40 -08:00
bors
d0a12347de auto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, r=nikomatsakis
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846

r? @graydon
2013-02-27 17:36:41 -08:00
Niko Matsakis
c623d21e38 Introduce lifetime declarations into the lists of type parameters.
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846
2013-02-27 19:42:09 -05:00
Ben Striegel
43d43adf6b Turn old drop blocks into Drop traits 2013-02-27 19:14:19 -05:00
Patrick Walton
07c3f5c0de librustc: Forbid pub or priv before trait implementations 2013-02-27 09:40:16 -08:00
bors
99a902c81d auto merge of #5120 : jbclements/rust/macros-have-scope, r=pcwalton
r?

After this patch, macros declared in a module, function, or block can only be used inside of that module, function or block, with the exception of modules declared with the #[macro_escape] attribute; these modules allow macros to escape, and can be used as a limited macro export mechanism.

This pull request also includes miscellaneous comments, lots of new test cases, a few renamings, and a few as-yet-unused data definitions for hygiene.
2013-02-26 20:00:38 -08:00
John Clements
5328f3c1ee Remove space from the middle of path 2013-02-26 10:26:42 -08:00
Patrick Walton
e2f90091cf libcore: Move Cell to core and de-~mut core and std 2013-02-26 04:18:12 -08:00
Patrick Walton
1144fdde1f librustpkg: De-mut librustdoc and librustpkg. rs=demuting 2013-02-22 16:09:17 -08:00
Brian Anderson
dab6a85230 core: Extract comm from pipes. #4742 2013-02-21 17:36:54 -08:00
Patrick Walton
bf2a225c0b librustc: Separate most trait bounds with '+'. rs=plussing 2013-02-20 21:14:20 -08:00
Erick Tryzelaar
a2b754788d convert syntax::attr to use @~strs 2013-02-19 10:02:51 -08:00
Seth Pink
1f4c758f9b Remove use of capture clause #4965 2013-02-17 11:02:23 +10:00
Patrick Walton
bb833ca0f0 librustc: Stop parsing impl Type : Trait and fix several declarations that slipped through. r=tjc 2013-02-15 16:59:56 -08:00
Luqman Aden
78f3e0da70 librustdoc: Get rid of move. 2013-02-15 02:49:54 -08:00
Patrick Walton
9143688197 librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping 2013-02-14 14:44:12 -08:00
Nick Desaulniers
4445b38df2 Remove die!, raplace invocations with fail! Issue #4524 pt 3 2013-02-13 17:01:32 -08:00
Tim Chevalier
3b8f1fa2b6 core: Remove structural records from the rest of core, except pipes
That will, sadly, require one more snapshot.
2013-02-07 22:48:57 -08:00
Niko Matsakis
a32498d846 Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
correct handling of moves for struct-record update.

Part of #3678.  Fixes #2828, #3904, #4719.
2013-02-07 05:53:30 -08:00
Patrick Walton
801f3225b2 oldmap: use &K instead of K in find and get
This reverts commit a4250a96fd.

This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd Revert "oldmap: use &K instead of K in find and get"
This reverts commit 8e643525d4.
2013-02-05 14:30:53 -08:00
bors
bffe3088c7 auto merge of pull req #4777 from thestinger/rust, r=graydon 2013-02-04 17:24:40 -08:00
Brian Anderson
e08a805b30 Merge remote-tracking branch 'bstrie/rimov' into incoming
Conflicts:
	src/libsyntax/parse/parser.rs
	src/test/bench/graph500-bfs.rs
	src/test/bench/sudoku.rs
	src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
	src/test/run-pass/empty-mutable-vec.rs
	src/test/run-pass/foreach-nested.rs
	src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00
Daniel Micay
8e643525d4 oldmap: use &K instead of K in find and get 2013-02-03 23:30:56 -05:00
Daniel Micay
1b4eb145f9 oldmap: implement core::container::Container 2013-02-03 15:55:10 -05:00
Daniel Micay
319eeb1c79 rename map -> oldmap and mark it as deprecated
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
Brian Anderson
5633783f47 rustdoc: Convert to pipes 2013-02-01 21:22:49 -08:00
Brian Anderson
90f00a1c37 rustdoc: Remove stray mode 2013-02-01 21:22:49 -08:00
Brian Anderson
b80d711912 rustdoc: Remove another use of oldcomm 2013-02-01 21:22:49 -08:00
Brian Anderson
65f711a617 rustdoc: Fix some search-and-replace fallout 2013-02-01 21:22:49 -08:00
Brian Anderson
c6e8af446f rustdoc: Remove definitions of spawn_listener and spawn_conversation 2013-02-01 21:22:49 -08:00
Brian Anderson
9dc6938292 Merge remote-tracking branch 'nickdesaulniers/issue4524' into nocomm1 2013-02-01 11:18:58 -08:00
Brian Anderson
e30388f682 Long lines 2013-02-01 00:17:07 -08:00
Brian Anderson
c1a1722ca1 rustdoc: Convert page_pass to pipes 2013-02-01 00:16:14 -08:00
Brian Anderson
63c16e9e79 rustdoc: Convert astsrv to pipes 2013-02-01 00:00:17 -08:00
Nick Desaulniers
6fb4239bb3 Replace most invocations of fail keyword with die! macro 2013-01-31 22:25:12 -08:00
Nick Desaulniers
aee7929469 Replace most invocations of fail keyword with die! macro 2013-01-31 20:12:49 -08:00
Niko Matsakis
0682ad0eb9 Finalize moves-based-on-type implementation.
Changes:

- Refactor move mode computation
- Removes move mode arguments, unary move, capture clauses
  (though they still parse for backwards compatibility)
- Simplify how moves are handled in trans
- Fix a number of illegal copies that cropped up
- Workaround for bug involving def-ids in params
  (see details below)

Future work (I'll open bugs for these...):

- Improve error messages for moves that are due
  to bindings
- Add support for moving owned content like a.b.c
  to borrow check, test in trans (but I think it'll
  "just work")
- Proper fix for def-ids in params

Def ids in params:

Move captures into a map instead of recomputing.

This is a workaround for a larger bug having to do with the def-ids associated
with ty_params, which are not always properly preserved when inlining.  I am
not sure of my preferred fix for the larger bug yet.  This current fix removes
the only code in trans that I know of which relies on ty_param def-ids, but
feels fragile.
2013-01-31 12:09:00 -08:00
Ben Striegel
a8ff91a630 Removing interior mut on vectors, round 1
find ./ -type f -name "*.rs" -exec sed -i "s/let mut\(.*\)\[mut[ ]\?/let
mut\1\[/g" {} \;
2013-01-30 23:16:56 -05:00
Brian Anderson
7d8ae4403e rustdoc: deny(deprecated_self) 2013-01-30 19:56:37 -08:00
Brian Anderson
63b2b9c4a8 rustdoc: Remove structural records 2013-01-30 19:45:39 -08:00
Brian Anderson
baf301cd3e rustdoc: De-mode 2013-01-30 19:32:36 -08:00
Brian Anderson
16ea4b06ab rustdoc: Stop using a custom error handler. Closes #4698 2013-01-30 19:02:31 -08:00
Brian Anderson
409d8af3c4 rustdoc: deny(deprecated_mode) 2013-01-30 18:52:31 -08:00
Brian Anderson
1ee94529d9 rustdoc: Various bits of modernization 2013-01-30 18:20:45 -08:00
Patrick Walton
83ced67d0b librustdoc: De-export compiletest, combine-tests, libcargo, libfuzzer, and librustdoc. rs=deexporting 2013-01-30 14:30:42 -08:00
Tim Chevalier
87acde8826 rustdoc: Remove structural records from tests. Fixes build breakage 2013-01-29 19:49:47 -08:00
Patrick Walton
226cd68f13 librustc: De-implicit-self the visitor. r=graydon 2013-01-29 10:43:12 -08:00
Patrick Walton
eb4d39e1fe libstd: Remove "dual impls" from the language and enforce coherence rules. r=brson
"Dual impls" are impls that are both type implementations and trait
implementations. They can lead to ambiguity and so this patch removes them
from the language.

This also enforces coherence rules. Without this patch, records can implement
traits not defined in the current crate. This patch fixes this, and updates
all of rustc to adhere to the new enforcement. Most of this patch is fixing
rustc to obey the coherence rules, which involves converting a bunch of records
to structs.
2013-01-29 10:42:45 -08:00
Tim Chevalier
31d78b2f07 Add #[legacy_records] crate attribute
In rustc, rustdoc, rusti, syntax, and std.
2013-01-28 19:41:56 -08:00
Daniel Micay
e4337a9def remove remaining is_not_empty functions/methods 2013-01-24 23:24:57 -05:00
Erick Tryzelaar
1f5e9ff362 convert ast::struct_def to a struct 2013-01-14 18:15:54 -08:00
Erick Tryzelaar
530a113bfa convert ast::item into a struct 2013-01-14 18:15:53 -08:00
Erick Tryzelaar
5c0d674a45 convert ast::foreign_item to a struct 2013-01-14 18:14:16 -08:00
Tim Chevalier
0c05a6c092 Use filtered instead of filter in rustdoc. Fixes segfault.
...of course, it shouldn't be segfaulting, but this fixes the
build.

rs=breakage
2013-01-10 21:26:56 -08:00
Patrick Walton
ca71c6ec5b librustc: Make all external functions unsafe. r=tjc 2013-01-10 21:24:08 -08:00
Niko Matsakis
2b92962aa2 A collection of refactorings that I found it hard/tiresome to divide:
- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns.  This is both
  eliminating use of deprecated features and more forwards compatible
  with fn reform.

r=pcwalton
2013-01-09 14:59:07 -08:00
Erick Tryzelaar
2891a49f0d core: rename vec.filter to vec.filtered 2013-01-09 08:55:37 -08:00
Patrick Walton
2db3abddcd librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37 Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
This reverts commit a8d37af247.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247 librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 19:27:57 -08:00
Tim Chevalier
89acd1f57f Rename option::get_default => get_or_default, get_zero => get_or_zero 2013-01-04 16:01:26 -08:00
Tim Chevalier
d91b2d428b Change "interface" to "trait" in rustdoc
Closes #4337
2013-01-03 11:34:08 -08:00
Patrick Walton
2822365106 librustdoc: More text fixes. rs=busted 2012-12-29 21:17:06 -08:00
Patrick Walton
015ed66950 librustdoc: Fix typo. rs=busted 2012-12-29 20:44:25 -08:00
Patrick Walton
47cd1e4fc8 librustdoc: Fix a bunch of rustdoc tests. rs=bustage 2012-12-29 17:38:20 -08:00
Patrick Walton
57c599914a librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon 2012-12-27 10:02:54 -08:00
Graydon Hoare
dbd36111fe bump 0.5 => 0.6, redirect some URLs in docs. 2012-12-21 15:35:49 -08:00
Erick Tryzelaar
85bb1fc2c4 Change iter::find's closure to take a ref 2012-12-17 22:01:38 -08:00
Brian Anderson
e6d1b02359 Rename core::comm to core::oldcomm 2012-12-14 14:59:32 -08:00
Brian Anderson
80ef7243ea Remove spawn_listener, spawn_conversation
These are not needed in a pipe-based Rustiverse
2012-12-14 14:59:32 -08:00
Brian Anderson
ed4fac01b5 Rename Send trait to Owned 2012-12-13 15:52:50 -08:00
Patrick Walton
e71ec06118 librustdoc: Try to unbreak the test. rs=burning 2012-12-13 15:01:57 -08:00
Patrick Walton
4c2e4c37ce librustc: Make use statements crate-relative by default. r=brson 2012-12-13 13:05:22 -08:00
Tim Chevalier
38bd694df1 Reverse the order of the results of pipes::stream
As per #3637.
2012-12-11 19:23:28 -08:00