bors
5e1a691125
auto merge of #9613 : jld/rust/enum-discrim-size.r0, r=alexcrichton
...
Allows an enum with a discriminant to use any of the primitive integer types to store it. By default the smallest usable type is chosen, but this can be overridden with an attribute: `#[repr(int)]` etc., or `#[repr(C)]` to match the target's C ABI for the equivalent C enum.
Also adds a lint pass for using non-FFI safe enums in extern declarations, checks that specified discriminants can be stored in the specified type if any, and fixes assorted code that was assuming int.
2013-10-30 00:31:23 -07:00
Patrick Walton
7e77bf1769
librustc: Implement the proc
type as sugar for ~once fn
and proc
...
notation for closures, and disable the feature gate for `once fn` if
used with the `~` sigil.
2013-10-29 10:34:17 -07:00
Jed Davis
01097cbab0
Unbreak the debuginfo tests.
...
The variant used in debug-info/method-on-enum.rs had its layout changed
by the smaller discriminant, so that the `u32` no longer overlaps both
of the `u16`s, and thus the debugger is printing partially uninitialized
data when it prints the wrong variant.
Thus, the test runner is modified to accept wildcards (using a string
that should be unlikely to occur literally), to allow for this.
2013-10-29 09:09:20 -07:00
Alex Crichton
72557d8312
Remove the extension traits for Readers/Writers
...
These methods are all excellent candidates for default methods, so there's no
need to require extra imports of various traits.
2013-10-28 10:16:45 -07:00
Alex Crichton
61ed2cfb55
Remove even more of std::io
...
Big fish fried here:
extra::json
most of the compiler
extra::io_util removed
extra::fileinput removed
Fish left to fry
extra::ebml
2013-10-24 14:21:57 -07:00
Alex Crichton
daf5f5a4d1
Drop the '2' suffix from logging macros
...
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Kevin Ballard
6eade9e914
path2: Update for latest master
...
Also fix some issues that crept into earlier commits during the conflict
resoution for the rebase.
2013-10-16 11:18:06 -07:00
Kevin Ballard
0c7e8f7a92
path2: Remove some API functions
...
Delete the following API functions:
- set_dirname()
- with_dirname()
- set_filestem()
- with_filestem()
- add_extension()
- file_path()
Also change pop() to return a boolean instead of an owned copy of the
old filename.
2013-10-16 10:26:48 -07:00
Kevin Ballard
bab7eb20df
path2: Update based on more review feedback
...
Standardize the is_sep() functions to be the same in both posix and
windows, and re-export from path. Update extra::glob to use this.
Remove the usage of either, as it's going away.
Move the WindowsPath-specific methods out of WindowsPath and make them
top-level functions of path::windows instead. This way you cannot
accidentally write code that will fail to compile on non-windows
architectures without typing ::windows anywhere.
Remove GenericPath::from_c_str() and just impl BytesContainer for
CString instead.
Remove .join_path() and .push_path() and just implement BytesContainer
for Path instead.
Remove FilenameDisplay and add a boolean flag to Display instead.
Remove .each_parent(). It only had one caller, so just inline its
definition there.
2013-10-16 10:26:48 -07:00
Kevin Ballard
c01a97b7a9
path2: Remove .with_display_str and friends
...
Rewrite these methods as methods on Display and FilenameDisplay. This
turns
do path.with_display_str |s| { ... }
into
do path.display().with_str |s| { ... }
2013-10-15 22:19:53 -07:00
Kevin Ballard
d6d9b92683
path2: Adjust the API to remove all the _str mutation methods
...
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.
Convert Path::from_vec and ::from_str to one function, Path::new().
Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15 22:18:30 -07:00
Kevin Ballard
73d3d00ec4
path2: Replace the path module outright
...
Remove the old path.
Rename path2 to path.
Update all clients for the new path.
Also make some miscellaneous changes to the Path APIs to help the
adoption process.
2013-10-15 21:56:54 -07:00
Alex Crichton
2290ce14f2
Remove some users of io::file_reader
2013-10-10 03:38:51 -07:00
Alex Crichton
b07ab1fe4b
Migrate users of io::fd_t to io::native::file::fd_t
2013-10-10 03:38:51 -07:00
Alex Crichton
a0d2f71e8e
Implement io::native::process
2013-10-09 11:24:15 -07:00
Daniel Micay
6a90e80b62
option: rewrite the API to use composition
2013-10-09 09:17:29 -04:00
Alex Crichton
630082ca89
rpass: Remove usage of fmt!
2013-09-30 23:21:19 -07:00
Alex Crichton
86e613c632
compiletest: Remove usage of fmt!
2013-09-30 23:21:19 -07:00
Marvin Löbel
06d1dccf95
Turned extra::getopts functions into methods
...
Some minor api and doc adjustments
2013-09-19 12:32:18 +02:00
blake2-ppc
b5d560a9e0
std: Remove {float,f64,f32}::from_str in favor of from_str
...
Like issue #9209 , remove float::{from_str, from_str_radix} in favor of
the two corresponding traits. The same for modules f64 and f32.
New usage is
from_str::<float>("1.2e34")
2013-09-18 04:02:42 +02:00
Erick Tryzelaar
45c62c08f9
std: rename Option::unwrap_or_default() to unwrap_or()
2013-09-12 18:54:11 -07:00
Florian Hahn
de39874801
Rename str::from_bytes to str::from_utf8, closes #8985
2013-09-05 14:17:24 +02:00
Felix S. Klock II
7f834c5c07
Update clients of path.rs to use new API.
...
In most cases this involved removing a ~str allocations or clones
(yay), or coercing a ~str to a slice. In a few places, I had to bind
an intermediate Path (e.g. path.pop() return values), so that it would
live long enough to support the borrowed &str.
And in a few places, where the code was actively using the property
that the old API returned ~str's, I had to put in to_owned() or
clone(); but in those cases, we're trading an allocation within the
path.rs code for one in the client code, so they neutralize each
other.
2013-09-04 13:10:32 +02:00
bors
64ff315584
auto merge of #8950 : sanxiyn/rust/cross-xfail, r=brson
2013-09-03 23:15:56 -07:00
Seo Sanghyeon
877e7f3463
Correctly determine OS to xfail in cross build
2013-09-03 19:34:23 +09:00
Alex Crichton
aeb2f88a48
Raise the file descriptor limits when running compiletest
...
We already do this for libstd tests automatically, and compiletest runs into the
same problems where when forking lots of processes lots of file descriptors are
created. On OSX we can use specific syscalls to raise the limits, in this
situation, though.
Closes #8904
2013-09-02 21:50:50 -07:00
bors
6a225951e3
auto merge of #8886 : cmr/rust/test-restructure, r=cmr
2013-08-30 14:00:43 -07:00
Corey Richardson
f585767fba
Revert "Teach compiletest to use multiple --src-base's"
...
This reverts commit 8a07f57081
.
2013-08-30 16:17:32 -04:00
Corey Richardson
fdcc415957
Revert "Teach the makefile to use multiple src-base's"
...
This reverts commit 43f851d2cb
.
2013-08-30 16:17:29 -04:00
bors
974f854bb5
auto merge of #8839 : sanxiyn/rust/env, r=thestinger
2013-08-30 00:15:47 -07:00
bors
7c6c7519a7
auto merge of #8458 : cmr/rust/test-restructure, r=brson
...
This should make benchmarks easier to understand. But, it doesn't work.
BENCH_RS in mk/tests.mk has everything, from what I can tell in remake, but
only those that are direct children of src/test/bench get build and run.
@graydon, can you lend your expertise? I can't make heads or tails of this
makefile.
2013-08-29 18:45:47 -07:00
Brian Anderson
3c5a43e5b6
Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
...
This reverts commit b8d1fa3994
, reversing
changes made to f22b4b1698
.
Conflicts:
mk/rt.mk
src/libuv
2013-08-29 14:23:44 -07:00
Seo Sanghyeon
97b542bd84
Android: Pass the environment when running tests
2013-08-28 21:44:55 +09:00
Seo Sanghyeon
fcce7e82db
Remove --newrt option
2013-08-28 21:25:12 +09:00
Corey Richardson
43f851d2cb
Teach the makefile to use multiple src-base's
2013-08-28 08:16:21 -04:00
Corey Richardson
8a07f57081
Teach compiletest to use multiple --src-base's
2013-08-28 08:16:19 -04:00
Alex Crichton
b89e1c000e
Implement process bindings to libuv
...
Closes #6436
2013-08-27 20:46:43 -07:00
Vadim Chugunov
a903f741b0
Since we assume that GDB output is UTF-8, make sure it is so on all platforms.
...
Otherwise it'll choose some "appropriate" platform-specific default (e.g. CP1252 on Windows).
2013-08-26 01:23:17 -07:00
Graydon Hoare
2fb5c49abb
test: add support for sharding testsuite by passing --test-shard=a.b
2013-08-23 15:30:23 -07:00
Graydon Hoare
610b2b58ec
compiletest: do not run tests in sub-threads if on valgrind.
2013-08-19 15:09:20 -07:00
bors
8ac17731eb
auto merge of #8531 : brson/rust/test-waitpid-workaround, r=graydon
...
...er
I believe the calls to waitpid are interacting badly with the message passing that goes
on between schedulers and causing us to have very little parallelism in
the test suite. I don't fully understand the sequence of events that causes
the problem here but clearly blocking on waitpid is something that a
well-behaved task should not be doing.
Unfortunately this adds quite a bit of overhead to each test: one thread, two
tasks, three stacks, so there's a tradeoff. The time to execute run-pass on
my 4-core machine goes from ~750s to ~300s.
This should have a pretty good impact on cycle times.
cc @toddaaro
2013-08-17 00:22:05 -07:00
Brian Anderson
15fca2dad7
compiletest: Run tests in their own thread to avoid blocking the scheduler
...
The calls to waitpid are interacting badly with the message passing that goes
on between schedulers and causing us to have very little parallelism in
the test suite. I don't fully understand the sequence of events that causes
the problem here but clearly blocking on waitpid is something that a
well-behaved task should not be doing.
Unfortunately this adds quite a bit of overhead to each test: one thread, two
tasks, three stacks, so there's a tradeoff. The time to execute run-pass on
my 4-core machine goes from ~750s to ~300s.
2013-08-14 23:41:31 -07:00
Tim Chevalier
cf4694e73b
std: Change ProcessOptions struct to have an option of a ~ vector
...
This is a workaround for #8498
2013-08-14 16:52:05 -07:00
Erick Tryzelaar
f9dee04aaa
std: Iterator.len_ -> .len
2013-08-10 07:33:22 -07:00
Erick Tryzelaar
68f40d215e
std: Rename Iterator.transform -> .map
...
cc #5898
2013-08-10 07:33:21 -07:00
blake2-ppc
8523f6d643
rustc: Fix for-range loops that can use iterators
...
Transform range loops that can be regular iterator loops.
2013-08-07 22:39:57 -04:00
Erick Tryzelaar
1e490813b0
core: option.map_consume -> option.map_move
2013-08-07 08:52:09 -07:00
Erick Tryzelaar
5c08237456
option.get -> option.unwrap
2013-08-07 08:16:37 -07:00
bors
3dfb55ab09
auto merge of #8313 : msullivan/rust/cleanup, r=catamorphism
2013-08-06 08:44:05 -07:00
Marvin Löbel
0ac7a219f0
Updated std::Option, std::Either and std::Result
...
- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05 22:42:21 +02:00
Michael Sullivan
7dbc5ae79f
Get rid of some NOTEs.
2013-08-05 12:30:28 -07:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Daniel Micay
b3ad685f7f
replace all remaining for
with foreach
or do
2013-08-03 03:00:42 -04:00
Daniel Micay
234acad404
replace range
with an external iterator
2013-08-02 00:51:14 -04:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Jordi Boggiano
f7ebab4403
Do not enforce two newlines after the options
2013-07-30 18:40:01 +02:00
bors
63c9b112b5
auto merge of #8003 : crnobog/rust/case-insensitive-error-prefix, r=cmr
...
Paths are case insensitive on windows and rustc and compiletest may disagree on casing.
Fixes test compile-fail/circular_modules_main on win32
2013-07-29 07:31:24 -07:00
bors
5c4cd30f80
auto merge of #7979 : crnobog/rust/auxfiles-path-windows, r=cmr
2013-07-26 17:49:40 -07:00
Daniel Micay
254339fd39
fix fmt! usage
2013-07-24 09:45:20 -04:00
crnobog
6f4e2b2147
Compare file:line prefix case-insensitively on win32
...
Paths are case insensitive on windows and rustc and compiletest may disagree on casing.
Fixes test compile-fail/circular_modules_main
2013-07-23 19:24:54 +01:00
crnobog
46394758aa
Change libaux directory to fix aux crate tests on Windows
2013-07-22 23:15:20 +01:00
Gareth Smith
a6263694ff
Remove what appears to be redundant indirection from
...
os::list_dir_path.
2013-07-21 18:33:29 +01:00
Patrick Walton
d300a64520
compiletest: Remove stray copies.
2013-07-17 18:03:48 -07:00
Patrick Walton
dc4bf173f8
test: Fix tests.
2013-07-17 14:57:55 -07:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Graydon Hoare
bc4c89c10a
compiletest: Add support for metrics and ratchet modes.
2013-07-16 09:33:54 -07:00
Graydon Hoare
bbdbd3c69d
extra: add explicit ratchet-noise-percent option to benchmark ratchet, plus a few test breaking fixes.
2013-07-11 15:16:11 -07:00
Graydon Hoare
e14cd392a4
initial sketch of codegen mode for compiletest; doesn't measure / compare / ratchet the disassembly yet
2013-07-11 13:15:52 -07:00
Alex Crichton
8552a74775
Bring compiletest/rustpkg/driver up to date on std vs core
2013-07-04 16:30:48 -07:00
Huon Wilson
f19fb2459f
Remove standalone comparison functions in vec, make the trait impls better.
2013-07-04 00:46:50 +10:00
Huon Wilson
c437a16c5d
rustc: add a lint to enforce uppercase statics.
2013-07-01 17:52:57 +10:00
bors
07feeb95c5
auto merge of #7487 : huonw/rust/vec-kill, r=cmr
...
Continuation of #7430 .
I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
2013-06-30 21:14:13 -07:00
Brian Anderson
a766a955a9
Bump version from 0.7-pre to 0.7
2013-06-30 16:36:48 -07:00
Huon Wilson
c0a20d2929
Remove vec::{map, mapi, zip_map} and the methods, except for .map, since this
...
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
2013-06-30 21:59:44 +10:00
Patrick Walton
a1531ed946
librustc: Remove the broken overloaded assign-ops from the language.
...
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
2013-06-28 10:44:16 -04:00
bors
63afb8ccc8
auto merge of #7430 : huonw/rust/vec-kill, r=thestinger
2013-06-27 15:01:58 -07:00
Huon Wilson
d2e3e1e52b
Convert vec::{head, tail, init, last} (and similar fns) to methods.
2013-06-27 22:37:00 +10:00
Huon Wilson
d0512b1055
Convert vec::[mut_]slice to methods, remove vec::const_slice.
2013-06-27 22:36:09 +10:00
Brian Anderson
332671c479
Whitespace
2013-06-26 15:34:12 -07:00
Brian Anderson
5d3ca4b843
Merge remote-tracking branch 'mozilla/master' into incoming
...
Conflicts:
src/librustc/middle/astencode.rs
src/librustc/middle/check_const.rs
2013-06-25 19:32:00 -07:00
Daniel Micay
e67c48a591
remove each
from vec, HashMap and HashSet
2013-06-25 16:28:02 -04:00
Alex Crichton
42b44b21b1
Rename all files with the 'rc' extension
2013-06-25 08:55:15 -07:00
Brian Anderson
30f8621386
Merge remote-tracking branch 'brson/shorttestnames' into HEAD
2013-06-24 14:10:30 -07:00
Brian Anderson
3da7c8f7e1
compiletest: Shorten test names
2013-06-23 12:50:11 -07:00
Daniel Micay
d2e9912aea
vec: remove BaseIter implementation
...
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04:00
Daniel Micay
cbad1da3db
vec: remove eachi
...
replaced by the `enumerate` method from std::iterator
2013-06-21 03:20:22 -04:00
Vadim Chugunov
51d82f572f
Converted vec::map to member.
2013-06-17 08:41:25 -07:00
Huon Wilson
ee25cf8d75
std: test-fixes, remove warnings, syntax highlighting for code examples.
2013-06-16 10:50:28 +10:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Huon Wilson
9e60e2e297
std: convert str::replace to a method.
2013-06-12 12:21:04 +10:00
Huon Wilson
3c23a0a836
std: replace str::append with a method
2013-06-12 12:21:03 +10:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Huon Wilson
e8782eeb63
fix tests, remove some warnings
2013-06-11 02:34:14 +10:00
Huon Wilson
838191c40b
std: replace str::{starts,ends}_with with the method.
2013-06-11 01:03:24 +10:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
ec5a028ada
std: convert str::char_at* to methods.
2013-06-10 23:02:55 +10:00
Huon Wilson
a64e886e3c
std: remove str::contains in favour of the method
2013-06-10 23:02:55 +10:00
Huon Wilson
017450a611
std: replace str::find_str* with a method
2013-06-10 23:02:54 +10:00
Huon Wilson
0cfc08d81e
std: convert character-based str::find_* to methods. Add .slice_{to,from} methods.
2013-06-10 23:02:54 +10:00
Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Huon Wilson
b29cd22bce
std: replace str::all/any fns and methods with iterators
2013-06-10 23:02:54 +10:00
Huon Wilson
1e8982bdb2
std: replace str::each_split* with an iterator
2013-06-10 23:02:54 +10:00
Daniel Micay
de367157b5
remove deprecated vec::{is_empty, len} functions
2013-06-08 23:19:30 -04:00
Huon Wilson
98ba91f81b
remove unused import warnings
2013-06-09 02:22:23 +10:00
Huon Wilson
4b806b4d06
std: remove each_char* fns and methods from str, replaced by iterators.
2013-06-09 02:22:23 +10:00
bors
5d2cadbfea
auto merge of #6895 : cmr/rust/jemalloc, r=brson
2013-06-06 18:43:37 -07:00
Philipp Brüschweiler
34ee63e93b
std::cell: Modernize constructors
...
Part of #3853
2013-06-04 12:03:58 +02:00
Corey Richardson
2d635179f0
Windows fixes
2013-06-01 17:50:26 -04:00
Young-il Choi
18bee38bbe
compiletest: update for language change
2013-06-01 18:09:20 +09:00
Young-il Choi
89c5ad69f0
compiletest: runtest.rs tidy
2013-06-01 17:33:11 +09:00
Young-il Choi
8b24a96e17
compiletest: runtest.rs cleanup
2013-06-01 17:30:22 +09:00
Young-il Choi
0521d54ca1
etc: adb_run_wrapper argument change
2013-06-01 17:28:58 +09:00
Young-il Choi
fe1dc3280f
compiletest: improve exit code handling with adb_run_wrapper
2013-06-01 17:28:58 +09:00
Björn Steinbrink
1720d9f663
Remove a bunch of unnecessary allocations and copies
2013-05-30 11:49:04 +02:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Luqman Aden
c49e41c42f
compiletest: Add #[no_core] to fix check-stage1.
2013-05-28 15:58:35 -04:00
gareth
76c31217be
Refactor core::run in order to address many of the issues
...
mentioned in #2625 .
This change makes the module more oriented around
Process values instead of having to deal with process ids
directly.
Apart from issues mentioned in #2625 , other changes include:
- Changing the naming to be more consistent - Process/process
is now used instead of a mixture of Program/program and
Process/process.
- More docs/tests.
Some io/scheduler related issues remain (mentioned in #2625 ).
2013-05-27 13:50:33 +01:00
Erick Tryzelaar
88a1219336
cleanup warnings from compiletest
2013-05-23 17:57:08 -07:00
Patrick Walton
f3723cf7c4
libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra
2013-05-22 21:57:07 -07:00
Daniel Micay
20ef4238bb
reduce the usage of explicit version markers
2013-05-19 00:21:41 -04:00
Youngmin Yoo
a2a8596c3d
Rename vec::len(var) to var.len()
2013-05-15 11:05:28 +09:00
Alex Crichton
2951527528
compiletest: Remove #[allow(vecs_implicitly_copyable)]
2013-05-14 12:24:43 -04:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Tim Chevalier
ed41864464
Warning police
2013-05-11 20:36:44 -07:00
Youngsoo Son
24ef88cee9
renamed str::from_slice to str::to_owned
2013-05-10 20:08:56 +09:00
Sean Moon
bd4ee7c7d2
Fix typos
2013-05-09 02:34:47 +09:00
bors
bd5fd6e42a
auto merge of #6150 : yichoi/rust/arm-test-pull, r=brson
...
Support #5297
install.mk : install-runtime-target added for conveneice
automatically push runtime library to android device
test.mk : expanded to support android test automation with adb
compiletest : expanded to support android test automation with adb
2013-05-06 13:15:38 -07:00
Young-il Choi
5681571f6c
compiletest: remove --host and cleanup
2013-05-04 10:35:07 +09:00
Young-il Choi
84bdd05acc
compiletest: fix decision rule to run and cleanup
2013-05-04 00:49:18 +09:00
Young-il Choi
6f6dd86248
compiletest: configurable test dir for ARM
2013-05-02 13:16:01 +09:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Graydon Hoare
08dd625d45
compiletest: stop ignoring all tests.
2013-05-01 14:58:21 -07:00
Erick Tryzelaar
e9688fcfe3
remove some warnings
2013-05-01 07:49:41 -07:00
Young-il Choi
9d6544667e
compiletest: fix to remove trailing whitespace
2013-05-01 19:18:57 +09:00
Young-il Choi
f7ef71d491
compiletest: expanded to ARM test automation
2013-05-01 18:52:08 +09:00
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00
Marvin Löbel
3759b5711d
Fixed typo... And a billion other things.
2013-04-24 22:28:02 +02:00
Marvin Löbel
dd74807957
Removed ascii functions from other modules
...
Replaced str::to_lowercase and str::to_uppercase
2013-04-24 22:26:09 +02:00
Brian Anderson
decd3901d5
core::comm: Modernize constructors to use new
2013-04-18 14:07:35 -07:00
Alex Crichton
59e69aa0e7
test: remove unnecessary unsafe blocks/functions
2013-04-14 01:15:46 -04:00
Brian Anderson
23e44a529b
Bump version to 0.7-pre
2013-04-10 13:12:53 -07:00
Brian Anderson
23251b2438
Bump version to 0.7-pre
2013-04-09 10:59:32 -07:00
Brian Anderson
34b2336dd0
Fix compiletest on windows
2013-04-03 11:54:49 -07:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
Patrick Walton
0a4d0f37ca
librustc: Enforce that extern mod
directives come first, then use
directives, then items.
...
Resolve them in this order as well.
2013-03-26 21:30:17 -07:00
Daniel Micay
34c5a09ce3
option: rm functions that duplicate methods
2013-03-26 22:44:40 -04:00
Marvin Löbel
06c371605b
Fixed all use sites and tests
2013-03-26 14:59:17 +01:00
Brian Anderson
30d4124a37
Merge remote-tracking branch 'brson/rt'
...
Conflicts:
src/libcore/rt/context.rs
src/libcore/rt/sched.rs
src/libcore/rt/thread.rs
src/libcore/rt/uv.rs
2013-03-25 12:28:54 -07:00
Patrick Walton
28efc234f4
libcore: Fix obsolete syntax in extfmt
2013-03-22 23:09:15 -07:00
bors
1616ffd0c2
auto merge of #5398 : dbaupp/rust/core-readlines, r=graydon
...
The `each_line` function in `ReaderUtil` acts very differently to equivalent functions in Python, Ruby, Clojure etc. E.g. given a file `t` with contents `trailing\nnew line\n` and `n` containing `no trailing\nnew line`:
Rust:
```Rust
t: ~[~"trailing", ~"new line", ~""]
n: ~[~"no trailing", ~"new line"]
```
Python:
```Python
>>> open('t').readlines()
['trailing\n', 'new line\n']
>>> open('n').readlines()
['no trailing\n', 'new line']
```
Ruby:
```Ruby
irb(main):001:0> File.readlines('t')
=> ["trailing\n", "new line\n"]
irb(main):002:0> File.readlines('n')
=> ["no trailing\n", "new line"]
```
Clojure
```Clojure
user=> (read-lines "t")
("trailing" "new line")
user=> (read-lines "n")
("no trailing" "new line")
```
The extra string that rust includes at the end is inconsistent, and means that it is impossible to distinguish between the "real" empty line a file that ends `...\n\n`, and the "fake" one after the last `\n`.
The code attached makes Rust's `each_line` act like Clojure (and PHP, i.e. not including the `\n`), as well as adjusting `str::lines` to fix the trailing empty line problem.
Also, add a convenience `read_lines` method to read all the lines in a file into a vector.
2013-03-22 09:24:53 -07:00
Huon Wilson
f8323397aa
compiletest: Use lines_each instead of lines(..).each, or split(.., n).each
2013-03-23 00:15:06 +11:00
Andrew Paseltiner
6e883c730e
compiletest: replace uses of old deriving attribute with new one
2013-03-22 06:30:59 -04:00
Marvin Löbel
9d9a209e9a
back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> slice_unique
2013-03-21 14:05:57 +01:00
Marvin Löbel
a7d296f24c
renamed str::view -> slice_DBG_BRWD
...
renamed str::slice -> slice_DBG_UNIQ
changed vec slice method -> to_owned()
renamed vec view method -> slice_V_DBG_BRWD
2013-03-21 01:50:32 +01:00
Luqman Aden
480e9ff8df
compiletest: Make pretty tests actually use compile-flags.
2013-03-19 16:36:06 -07:00
Brian Anderson
044703435b
Add a way to run the test suite with the new scheduler
...
TESTARGS=--newrt make check-stage1-rpass
Conflicts:
src/rt/rustrt.def.in
2013-03-18 17:00:35 -07:00
bors
7e6020db63
auto merge of #5319 : brson/rust/debuginfo, r=brson
...
Continuing #5140
For the sake of getting this merged I've disabled debuginfo tests on mac (where running gdb needs root). Please feel free to follow up with further improvements.
2013-03-13 11:34:00 -07:00
Brian Anderson
82f190355b
Remove uses of log
2013-03-11 23:19:42 -07:00
Brian Leibig
6152425180
More descriptive error messages for debug info tests
2013-03-11 14:09:06 -07:00
Brian Leibig
c978025d0d
Debuginfo revamp
2013-03-11 14:09:06 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
bors
eddefbc893
auto merge of #5212 : thestinger/rust/iter, r=graydon
...
A small step towards fixing #2827
2013-03-05 02:06:50 -08:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00
Daniel Micay
af645e8487
replace option::iter with a BaseIter impl
2013-03-03 11:01:17 -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
bors
c316189d15
auto merge of #5081 : brson/rust/pipes, r=pcwalton
...
r?
2013-02-22 11:24:38 -08:00
Brian Anderson
dab6a85230
core: Extract comm from pipes. #4742
2013-02-21 17:36:54 -08:00
Luqman Aden
9ea6a49696
Remove the last bits of structural records from tests/rustc/rusti/rustpkg.
2013-02-21 15:19:40 -08:00
bors
566bcf2225
auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brson
...
Issue #3869
review? @nikomatsakis
Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
Fix windows build error. `buf` is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 13:54:49 -08:00
Luqman Aden
e61b243edf
compiletest: Get rid of move
.
2013-02-15 02:49:54 -08:00
Nick Desaulniers
5d62a4a52e
Convert all uses of vec::slice to vec::view Issue #3869
...
Rename const_view to const_slice
Renamed mut_view to mut_slice
2013-02-14 16:14:32 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
bors
d5bf3b85d1
auto merge of #4908 : bstrie/rust/rimov3, r=pcwalton
...
This patch finishes removing inner vector mutability from the vast majority of the compiler. Exceptions:
* core::dvec: ideally this entire type will be able to be replaced by `~[]`, but Niko asked me to hold off on removing Dvecs until he makes some fixes to borrowed pointers.
* liveness: liveness.rs is an impenetrable neutron star of deprecated semantics.
* compile-fail: I'm not sure if a lot of these tests are testing inner mutability or mutability in general. I figure that RIMOVing this folder should wait until this syntax is removed from the parser.
I also took this chance to remove many of the inner-mutability-related functions from core::vec, or as many uses of those functions as possible where still necessary. consume_mut and append_mut have been axed. cast_to_mut and cast_from_mut are still needed in a few places.
2013-02-13 15:09:07 -08:00
Graydon Hoare
e5aa399e0d
rustc and std: teach about #[bench], modernize to use quote_expr! some.
2013-02-13 11:46:25 -08:00
Ben Striegel
e6c82c0375
RIMOV core::vec
...
Also remove as many uses as possible of vec::cast_to_mut and
cast_from_mut
2013-02-13 12:48:24 -05:00
Brian Leibig
6bfbdadd3b
Add debug info tests
2013-02-09 13:09:19 -05: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
Nick Desaulniers
aee7929469
Replace most invocations of fail keyword with die! macro
2013-01-31 20:12:49 -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
dd38af240b
compiletest: Allow legacy records
...
But also remove most uses of structural records.
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
Daniel Micay
d95c9cbe38
replace ConstVector trait with the Container trait
2013-01-24 23:02:44 -05:00
Erick Tryzelaar
e84576b888
convert most of libstd over to structs
2013-01-24 16:24:31 -08:00
Patrick Walton
54b2cad8b3
libsyntax: Remove fn() unsafe { ... }
. r=graydon
2013-01-23 14:41: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
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
Graydon Hoare
896dcd4eb3
compiletest: more win32 fallout from 2db3abd
2013-01-09 09:48:17 -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
ILyoan
2d3c22ae59
arrange core::os::consts
2013-01-08 14:35:28 -08:00
Erick Tryzelaar
2d7b96ab72
Fix compiling compiletest. rs=fire
2012-12-28 11:50:27 -05:00
Erick Tryzelaar
5b2b13bff8
test: option variants get imported by default
2012-12-28 11:28:36 -05:00
Graydon Hoare
dbd36111fe
bump 0.5 => 0.6, redirect some URLs in docs.
2012-12-21 15:35:49 -08:00
Graydon Hoare
12c32e944d
Add license boilerplate to more files.
2012-12-10 17:32:58 -08:00
Graydon Hoare
00c856c0b1
Update license, add license boilerplate to most files. Remainder will follow.
2012-12-03 17:12:14 -08:00
Brian Anderson
5a282ec26f
core: Convert some records to structs
2012-11-28 21:50:09 -08:00
Brian Anderson
fc06114ddf
Merge remote-tracking branch 'brson/companion' into incoming
...
Conflicts:
src/compiletest/compiletest.rs
src/libcargo/cargo.rs
src/libcore/core.rs
src/librustc/rustc.rs
src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Brian Anderson
8179e268ef
Register snapshots
2012-11-28 12:33:00 -08:00
Brian Anderson
be6613e048
Remove the crate language
2012-11-26 18:13:54 -08:00
Tim Chevalier
f74fe894fc
[libstd] getopts, now with fewer copies
...
Change the opt_ functions in getopts to take a reference to a
Matches, instead of taking a Matches by-value, as suggested in
2012-11-24 12:52:27 -08:00
Patrick Walton
318e534895
rustc: Implement explicit self for Eq and Ord. r=graydon
2012-11-19 15:33:11 -08:00
Tim Chevalier
2d7d12b902
Make moves explicit in compiletest
2012-10-12 20:43:37 -07:00
Graydon Hoare
57b4d10ff6
bump version to 0.5.
2012-10-12 16:41:32 -07:00
Brian Anderson
edc317b821
Remove arg vectors from main functions. Stop supporting them.
2012-10-04 15:07:49 -07:00
Brian Anderson
c9e90de19f
Fix a compilation error on windows
2012-09-29 19:25:04 -07:00
Brian Anderson
c9fb1b19aa
Add allow(deprecated_\*) to syntax, rustc, rustdoc, et al
2012-09-28 18:38:59 -07:00
Niko Matsakis
21519bc7e0
demode vec
2012-09-28 13:27:45 -07:00
Brian Anderson
438bdd687b
core: More option demoding
2012-09-27 17:49:10 -07:00
Brian Anderson
e8fe718bfd
core: Replace map/map_default with map_ref/map_default_ref
2012-09-26 20:15:23 -07:00
Niko Matsakis
67a8e7128a
Demode vec::push (and convert to method)
2012-09-26 18:02:07 -07:00
Brian Anderson
d05e2ad66c
Demode core::result
2012-09-25 17:48:22 -07:00
Niko Matsakis
267ab11cca
use + mode for (almost) everything when not using legacy modes
2012-09-25 12:47:35 -07:00
Brian Anderson
afd91f8a56
Register snapshots. Remove redundant Eq impls, Makefile hacks
2012-09-23 23:01:49 -07:00
Brian Anderson
4a78f9b166
core: Demode option
2012-09-23 17:15:00 -07:00
Patrick Walton
d48396c986
libcore: De-mode str
2012-09-21 18:37:06 -07:00
Graydon Hoare
dffe188991
Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports];
2012-09-21 18:11:43 -07:00
Patrick Walton
9117dcb968
rustc: De-mode all overloaded operators
2012-09-20 09:48:05 -07:00
Brian Anderson
80524d3ad3
std: Demode test
2012-09-19 19:12:35 -07:00
Niko Matsakis
cfed923600
demode the each() method on vec and other iterables.
2012-09-19 17:03:01 -07:00
Niko Matsakis
9cf271fe96
De-mode vec::each() and many of the str iteration routines
...
Note that the method foo.each() is not de-moded, nor the other
vec routines.
2012-09-19 10:52:59 -07:00
Niko Matsakis
8d4928f780
Revert "replace explicit calls to vec::each with vec::each_ref, partially demode str"
...
This reverts commit 1be24f0758
.
Not quite ready.
2012-09-18 21:41:13 -07:00
Niko Matsakis
1be24f0758
replace explicit calls to vec::each with vec::each_ref, partially demode str
2012-09-18 21:31:00 -07:00
Brian Anderson
859a892eb0
Add allow(non_camel_case_types) to unconverted crates
2012-09-18 11:21:07 -07:00
Brian Anderson
7568dd4564
Promote 'const', 'copy', 'fn' to strict keywords
2012-09-12 16:00:22 -07:00
Brian Anderson
ea01ee2e9e
Convert 'use' to 'extern mod'. Remove old 'use' syntax
2012-09-11 19:25:43 -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
298eb8c726
Convert 'import' to 'use'. Remove 'import' keyword.
2012-09-10 19:04:26 -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
feb014eb3c
rustc: Add an "ne" method to the Eq trait, and implement it everywhere
2012-09-07 12:24:48 -07:00
Brian Anderson
a618d0d7ce
std: Convert test to camel case
2012-09-04 18:26:30 -07:00
Zack Corr
638db28c47
jit: Correct formatting and argv[0] for JITted programs
2012-08-31 16:20:36 -07:00
Brian Anderson
e27b8f7f02
Add JIT testing to compiletest with --jit
2012-08-31 16:20:36 -07:00
Brian Anderson
65b05a6ce8
Bump version to 0.4
2012-08-30 14:05:59 -07:00
Graydon Hoare
2d31c2afc4
Fix another Eq missing case.
2012-08-30 13:10:36 -07:00
Ben Striegel
a605fd0cad
CamelCasify lots of std
2012-08-28 18:52:44 -07:00
Brian Anderson
0c6e470a25
Convert core::result to camel case
2012-08-27 14:37:04 -07:00
Brian Anderson
8337fa1a54
Camel case the option type
2012-08-26 15:56:16 -07:00
Brian Anderson
d9a6a63653
Fix build breakage
2012-08-26 13:51:10 -07:00
Graydon Hoare
c284b8b1dc
Start using core::path2::Path in a lot of places.
2012-08-24 15:51:16 -07:00
Paul Stansifer
29f32b4a72
m1!{...}
-> m1!(...)
2012-08-23 11:14:14 -07:00
Eric Holk
5f57588887
Update the rock-paper-scissors example in the tutorial, and rename some types in core::pipes
2012-08-16 17:50:36 -07:00
Eric Holk
8bbe70c207
Allocate less on empty reads in procsrv
2012-08-16 16:46:20 -07:00
Brian Anderson
9c6890f488
Convert more core types to camel case
2012-08-15 17:46:05 -07:00
Brian Anderson
11258310e2
Convert more core types to camel case
2012-08-14 18:26:03 -07:00
Brian Anderson
b756c36b52
Fix compiletest breakage
2012-08-14 15:08:08 -07:00
Brian Anderson
6a0720b439
Convert impls to new syntax
2012-08-08 18:19:24 -07:00
Brian Anderson
ecaf9e39c9
Convert alt to match. Stop parsing alt
2012-08-06 15:36:30 -07:00
Eric Holk
bd9d5e50be
Add missing =>
2012-08-06 09:55:53 -07:00
Eric Holk
9f287c211e
Refcount tasks in packets to avoid races.
...
Revert "Once again, revert "Use pipes in compiletest""
Fixes #3098
2012-08-06 09:10:19 -07:00
Brian Anderson
025d86624d
Switch alts to use arrows
2012-08-05 22:08:09 -07:00
Eric Holk
618d311c3d
Once again, revert "Use pipes in compiletest"
...
This reverts commit 1d04b0ed5a
.
2012-08-03 15:22:01 -07:00
Eric Holk
1d04b0ed5a
Revert "Revert "Use pipes in compiletest""
...
This reverts commit 96c6f57d18
.
2012-08-02 18:55:44 -07:00
Brian Anderson
b355936b4d
Convert ret to return
2012-08-01 19:16:06 -07:00
Graydon Hoare
7f60c56c3e
Clean out transitional lint.
2012-08-01 13:35:40 -07:00
Brian Anderson
7b2026bf21
Introduce 'return', 'match' and 'module' as synonyms
2012-07-31 17:22:30 -07:00
Paul Stansifer
a9cc5066ee
Change syntax extension syntax: #m[...]
-> m!{...}
.
2012-07-30 18:38:15 -07:00
Graydon Hoare
dbbaa50290
Nomenclature fixes in the lint checker. Fewer double-negatives.
...
New style is allow(foo), warn(foo), deny(foo) and forbid(foo),
mirrored by -A foo, -W foo, -D foo and -F foo on command line.
These replace -W no-foo, -W foo, -W err-foo, respectively.
Forbid is new, and means "deny, and you can't override it".
2012-07-26 17:08:33 -07:00
Eric Holk
bf96298ff9
Import reader_util
2012-07-24 10:51:30 -07:00
Niko Matsakis
54cd5e1814
~strify win32-specific fns
2012-07-14 18:28:20 -07:00
Niko Matsakis
41a21f053c
remove typestate from code, tests, and docs
2012-07-14 17:37:20 -07:00
Michael Sullivan
13c377b3b5
More platform specific deprecated strings...
2012-07-14 11:05:10 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Graydon Hoare
aa7b3cc929
Fix some version numbers.
2012-07-11 09:09:08 -07:00
Ben Striegel
f2e2a14f36
Remove empty argument lists from do expressions
2012-07-04 17:21:29 -07:00
Brian Anderson
569467eb0d
Merge remote-tracking branch 'Dretch/prettydocs'
...
Conflicts:
src/compiletest/errors.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/comments.rs
src/test/compile-fail/ambig_impl_unify.rs
src/test/compile-fail/assign-super.rs
src/test/compile-fail/bad-for-loop.rs
src/test/compile-fail/bad-var-env-capture-in-block-arg.rs
src/test/compile-fail/block-arg-as-stmt-with-value.rs
src/test/compile-fail/borrowck-assign-comp-idx.rs
src/test/compile-fail/borrowck-lend-flow.rs
src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs
src/test/compile-fail/borrowck-loan-rcvr.rs
src/test/compile-fail/borrowck-loan-vec-content.rs
src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs
src/test/compile-fail/cap-clause-with-stack-closure.rs
src/test/compile-fail/do1.rs
src/test/compile-fail/do2.rs
src/test/compile-fail/empty-vec-trailing-comma.rs
src/test/compile-fail/evec-subtyping.rs
src/test/compile-fail/issue-1896.rs
src/test/compile-fail/issue-2149.rs
src/test/compile-fail/issue-2150.rs
src/test/compile-fail/issue-2487-b.rs
src/test/compile-fail/kindck-implicit-close-over-mut-var.rs
src/test/compile-fail/liveness-issue-2163.rs
src/test/compile-fail/liveness-use-in-index-lvalue.rs
src/test/compile-fail/no-reuse-move-arc.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/non-const.rs
src/test/compile-fail/pure-higher-order.rs
src/test/compile-fail/pure-loop-body.rs
src/test/compile-fail/regions-addr-of-upvar-self.rs
src/test/compile-fail/regions-escape-loop-via-vec.rs
src/test/compile-fail/regions-scoping.rs
src/test/compile-fail/seq-args.rs
src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs
src/test/compile-fail/tstate-unsat-in-fn-expr.rs
src/test/compile-fail/vec-add.rs
src/test/compile-fail/vec-concat-bug.rs
src/test/compile-fail/vector-no-ann.rs
2012-07-02 15:23:41 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00
Gareth Daniel Smith
6d86969260
change the test suite //! kind
syntax to //~ kind
in order to avoid a
...
conflict with the new single-line-sugared-inner-doc-comment (`//! ...`).
2012-06-30 12:23:59 +01:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Graydon Hoare
312faf31df
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
2012-06-21 16:44:10 -07:00
Eric Holk
51ba3518ec
Remove some singleton vector appends.
2012-06-21 16:11:11 -07:00
Tim Chevalier
c3d384b18f
Comment only: annotate FIXME
2012-06-21 08:59:17 -07:00
Brian Anderson
4dcf84e4f4
Remove bind. Issue #2189
2012-06-20 17:27:28 -07:00
Brian Anderson
8fea5260c2
core: Don't deadlock on io streams in run::program_output
...
We can't just read all of stdout before stderr or it will cause
deadlocks for children that want to write a lot to stderr
I could not come up with an obvious cross-platform way to easily
test this.
2012-06-08 23:00:59 -07:00
Lindsey Kuper
1a3b8fc43c
Have "aborting due to previous errors" message show an error count
2012-06-05 10:08:32 -07:00
Michael Sullivan
6396e2c3c3
Make vecs implicitly copyable for all of our projects.
2012-06-04 19:53:30 -07:00
Brian Anderson
7335b2a51c
compiletest: Add the libaux path to PATH on win32
2012-06-01 18:24:55 -07:00
Brian Anderson
432c6cbde9
core: Make range follow the for loop protocol
2012-05-26 02:28:00 -07:00
Tim Chevalier
37f23303e6
Fix compiletest::header::iter_header to work with new-style for loops
...
Gets rid of a FIXME -- yay!
2012-05-03 17:45:06 -07:00
Brian Anderson
0d5d1175d7
compiletest: Unbreak on Win32
2012-04-27 11:55:13 -07:00
Niko Matsakis
dfc548ddda
add option exec-env to set env variables during test execution
2012-04-13 12:41:37 -07:00
Haitao Li
0364d60b28
test: Build auxiliary libraries for each test
...
Closes #2162
2012-04-10 16:04:05 +08:00
Tim Chevalier
9d274ec5f2
Re-rename option functions
...
get_with_default (nee from_maybe) => get_default
with_option (nee maybe) => map_default
with_option_do (nee may) => iter
As per discussion of 21be1379d5
2012-04-06 12:20:13 -07:00
Marijn Haverbeke
fc202ca034
Remove support for old-style for
...
Closes #1619
2012-04-06 20:38:23 +02:00
Marijn Haverbeke
c902eafa14
Convert old-style for loops to new-style
...
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
2012-04-06 20:38:23 +02:00
Niko Matsakis
ef566acb8e
handle the case where multiple instances of same error are expected on the same line
2012-04-05 21:16:28 -07:00
Brian Anderson
d13c0c77a2
Explicitly use version 0.2 of crates
2012-04-05 20:29:42 -07:00
Grahame Bowland
5cc050b265
Logfile output from tests; summarise in make check
...
Add an optional --logfile argument to std::test::test_main and to
compiletest.
Use this features and the new 'check-summary.py' script to
summarise all the tests performed by the 'check' target. This is
a short term fix for #2075 .
2012-04-04 11:52:27 -07:00
Tim Chevalier
21be1379d5
Rename some core::option functions
...
from_maybe => get_with_default
maybe => with_option
may => with_option_do
I know these names are kind of ridiculous, but it's the best I could think of.
Feel free to bikeshed. Closes #2081
2012-04-02 16:12:49 -07:00
Jonathan Sternberg
3a0477c398
Fixing issue 1919. list_dir is the more general version that returns a vector with the contents of the directory. list_dir_path contains the old behavior (as a convenience function).
2012-04-01 11:39:17 -04:00
Graydon Hoare
0622a74c48
Fix long line.
2012-03-28 15:16:32 -07:00
Niko Matsakis
3955b3a41a
refactor so that pretty mode tests also run aux-build. Fixes #2060 .
2012-03-28 14:59:36 -07:00
Niko Matsakis
dc07280b08
make --enforce-mut-vars always on, add mut annotations to remaining files
2012-03-22 09:58:19 -07:00
Brian Anderson
4debe71785
compiletest: Remove FIXME. Closes #1984
2012-03-17 14:57:13 -07:00
Tim Chevalier
48ccb3fbfd
Associate FIXME with an issue in compiletest.rs
2012-03-15 17:50:22 -07:00
Tim Chevalier
f67f2388f7
Use str::is_whitespace instead of dup'd is_whitespace function
2012-03-15 15:40:43 -07:00
Tim Chevalier
e697456d52
Associate FIXMEs with issue numbers (comments only)
2012-03-15 15:40:43 -07:00
Brian Anderson
cd72b1f848
Overhaul constructor naming in libs
2012-03-13 11:07:22 -07:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Brian Anderson
3ed6f6520f
core: Remove _mut functions from vec
...
Instead, use vec::to_mut/from_mut to transform vectors in place as
needed.
2012-03-02 15:49:49 -08:00
Niko Matsakis
def72bda47
retool inline encoding to handle methods, fix tests
2012-03-02 06:47:25 -08:00
Niko Matsakis
5c1338a18e
add ability to run multi-crate tests, run tests with --inline
2012-02-28 06:31:29 -08:00
Marijn Haverbeke
780f8277f4
Finish cleanup of core::str
...
Closes #1849
2012-02-23 17:00:19 +01:00
Kevin Cantu
7782f5d692
(core::str) remove len_bytes alias
2012-02-23 17:00:19 +01:00
Kevin Cantu
1b957c0942
(core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes with find[_from]
2012-02-23 17:00:19 +01:00
Brian Anderson
4220dcf1e9
core: New task API
2012-02-20 18:58:04 -08:00
Marijn Haverbeke
67cc89f38d
Rewrite exhaustiveness checker
...
Issue #352
Closes #1720
The old checker would happily accept things like 'alt x { @some(a) { a } }'.
It now properly descends into patterns, checks exhaustiveness of booleans,
and complains when number/string patterns aren't exhaustive.
2012-02-15 15:47:42 +01:00
Kevin Cantu
c81867474a
(core::str) add find_bytes and export it...
2012-02-13 01:56:58 -08:00
Kevin Cantu
2b4f5136a5
(core::str) rename byte_len -> len_bytes and rename char_len -> len
2012-02-12 15:30:20 -08:00
Ted Horst
9fde2a54f4
use task::spawn_sched to read stdout and stderr at the same time
...
Hopefully this addresses the root cause of the hangs when running make check on windows.
2012-02-10 19:42:32 -08:00
Ted Horst
9fd2fcc99c
read stderr before stdout
...
tests all write to stderr, so read stderr first to keep from blocking while reading stdout
2012-02-10 19:42:32 -08:00
Ted Horst
36d5074f8f
log to stderr instead of stdout
...
includes rustc diagnostics
runtest updated to check stderr for errors
2012-02-10 19:42:32 -08:00
Marijn Haverbeke
8ffd6e4e8a
Suppress warnings in compiletest
2012-02-08 10:45:50 +01:00
Graydon Hoare
93450abb4b
Make process-spawning take environments and working directories, remove procsrv task from compiletest.
2012-02-07 19:57:03 -08:00
Kevin Cantu
a3f5626ad1
String split renaming:
...
* Renamed str::split -> str::split_byte
* Renamed str::splitn -> str::splitn_byte
* Renamed str::split_func -> str::split
* Renamed str::split_char -> str::split_char
* Renamed str::split_chars_iter -> str::split_char_iter
* Added u8::is_ascii
* Fixed the behavior of str::split_str, so that it matches split_chars
and split (i.e. ["", "XXX", "YYY", ""] == split_str(".XXX.YYY.", "."))
* Fixed str::split_byte and str::splitn_byte so that they handle
splitting UTF-8 strings on a given UTF-8/ASCII byte and also handle ""
as the others do
2012-02-07 16:25:35 -08:00
Brian Anderson
3bd0338c19
Revert "log to stderr instead of stdout"
...
This is causing mysterious hangs on windows. Issue #1769 .
This reverts commit d65eabd5de
.
2012-02-06 18:29:58 -08:00
Ted Horst
d65eabd5de
log to stderr instead of stdout
...
includes rustc diagnostics
runtest updated to check stderr for errors
2012-02-03 20:55:53 -08:00
Kevin Cantu
8f367ebfeb
Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
...
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01 21:56:53 -08:00
Kevin Cantu
fceec03da0
Propagating unsafe::slice 3
2012-02-01 21:56:53 -08:00
Tim Chevalier
e5d095d67e
Change option::t to option
...
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.
The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
2012-01-31 17:05:20 -08:00
Kevin Cantu
64ce563c05
Replacing str::unsafe_from_bytes with str::from_bytes (part 2)
2012-01-25 01:00:21 -08:00
Niko Matsakis
5e13d19cc0
s/block()/fn()/g
2012-01-23 19:06:33 -08:00
Graham Fawcett
7763b40c71
issue #1352 : change param order on vec::init_elt, putting block in final position.
...
To match the init_fn() and init_fn_mut() changes.
2012-01-21 13:33:16 -08:00
Patrick Walton
d1fe582040
misc: ';' to ',' in enums in cargo, compiletest, and fuzzer
2012-01-19 18:47:30 -08:00
Brian Anderson
6d4884d983
libcore: Use 4x the number of scheduler threads for testing
...
An arbitrary number. I've done no measurements but it's intended to overcome
the effects of tasks randomly being scheduled to threads and no work stealing.
If scheduler threads == 1 then we just use a single test task.
2012-01-19 17:54:21 -08:00
Patrick Walton
035b56d8aa
misc: "tag" -> "enum" for cargo, compiletest, fuzzer, rustdoc
2012-01-19 16:21:33 -08:00
Brian Anderson
f15182fffc
Use fn~ to simplify the core::test interface
2012-01-19 13:37:01 -08:00
Tim Chevalier
04a2887f87
Remove '.' after nullary tags in patterns
...
Does what it says on the tin.
The next commit will remove support for this syntax.
2012-01-18 23:17:34 -08:00
Brian Anderson
c0df13958c
Update crates with correct crate_type attribute
2012-01-17 15:13:43 -08:00
Marijn Haverbeke
34d7f05292
Major clean-up of std::io
...
Use ifaces instead of objs, stop wrapping everything in two (or three)
layers of no-value-added indirection, and remove some of the more
pointless/outdated idioms from the code.
2012-01-11 21:00:11 +01:00
Niko Matsakis
9f84f88276
port over the tests to use the new API
2012-01-06 22:40:31 -08:00
Niko Matsakis
1dec1c8813
make scanning more efficient by avoiding recomputation
2012-01-04 15:25:17 -08:00
Niko Matsakis
70c808d173
extend tester so that error msgs can be attached to lines
2012-01-04 15:25:17 -08:00
User Jyyou
a59c4b1b47
freebsd support
2012-01-01 20:18:55 -08:00
Graydon Hoare
f0dfbe7b1b
Register new snapshots, purge log_err and log_full in favour of log(...).
2011-12-22 17:53:53 -08:00
Graydon Hoare
389329ef1e
Merge all 3 log syntaxes, tidy up residual misuses.
2011-12-22 16:14:00 -08:00
Graydon Hoare
8b580954fe
Register snapshots and switch logging over to use of log_full or #error / #debug.
2011-12-22 14:42:52 -08:00
Stefan Plantikow
fa27724a4b
std: getopts now uses result::t ( fixes #1289 )
2011-12-18 18:55:39 -08:00
Niko Matsakis
2833ca478c
reorder args to the various vec, option fns so blk comes last
2011-12-16 07:17:23 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00
Niko Matsakis
4b13fdbf27
when type checking still pass in the rustc args from cmd line
...
otherwise we use the wrong target and things start to fail
2011-11-29 12:51:10 -08:00
Haitao Li
beced3612e
runtest.rs: Fix typo in error message
2011-11-22 00:19:17 +08:00
Niko Matsakis
adc79e2f44
remove compile-command from local variable blocks
2011-11-17 11:46:13 -08:00
Niko Matsakis
c572b793fe
fix mismatched types---make check passes on x86_64!
2011-11-16 15:24:37 -08:00
Brian Anderson
f157d0b32c
Fix S_IRUSR/S_IWUSR constants on mac. Closes #726
2011-11-16 12:18:15 -08:00
Haitao Li
7ee8b852fd
Cleanup unused imports in tests
2011-11-10 19:19:40 -08:00
Brian Anderson
0f1af17a60
Remove all uses of native cdecl except for those that yield
2011-11-08 11:29:10 -08:00
Matt Brubeck
76077a9fb7
Add should_fail annotation for unit tests
...
This allows test cases to assert that a function is expected to fail.
Tests annotated with "should_fail" will succeed only if the function
fails.
2011-11-01 16:55:39 -07:00
Brian Anderson
e0f44730e8
rustc: Support 'companion mod's for crates and directory mods
...
Under this scheme when parsing foo.rc the parser will also look for
foo.rs to fill in the crate-level module, and when evaluating a
directory module directive it will look for a .rs file with the
same name as the directory.
2011-10-29 01:40:20 -07:00
Brian Anderson
2cebef095e
stdlib: Make io failures recoverable by returning a result
2011-10-29 01:25:11 -07:00
Marijn Haverbeke
cfdf193c46
Update our code to new type parameter kind syntax
...
Closes #1067
2011-10-25 15:56:55 +02:00
Marijn Haverbeke
050170d2af
Remove remaining uses of iter and for-each
...
Issue #1056
2011-10-21 13:34:35 +02:00
Brian Anderson
ebc61e39d7
Remove temporary fn# syntax
2011-10-20 20:34:04 -07:00
Brian Anderson
c10eb221da
Get windows working under the bare function regime
...
Had to ignore some task failure tests due to the current implementation
of spawn which guarantees that there's always something in the spawned
task that needs to be unwound.
Fixed some win-specific build problems.
2011-10-20 18:23:48 -07:00
Brian Anderson
29ad3bdb10
Make fn denote a bare function. Convert fn to fn@ as needed
2011-10-20 18:23:48 -07:00
Brian Anderson
686d6a485f
Drop the 2 from the spawn*2 functions
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
3b54dcfa79
Convert the test runners to typesafe spawn
...
Issue #1022
2011-10-20 18:23:47 -07:00
Niko Matsakis
e8a0e592da
reimplement some of the unsafe stuff which got lost
...
- blocks inherit unsafety
- remove the --check-unsafe flag
- add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00
Niko Matsakis
db16fce77f
all tests pass
2011-10-12 16:33:06 -07:00
Niko Matsakis
85da98db4a
continue to annotate functions as unsafe where neccessary
2011-10-12 16:33:06 -07:00
Marijn Haverbeke
33167f7dec
Adjust function signatures to allow for vecs being immediate
...
Some code was relying on vectors being implicitly by-reference (as
non-immediate value). This adds the necessary &&-sigils.
Closes #1021
2011-10-10 16:01:51 +02:00
Brian Anderson
96f6a1861c
Revert "Revert "Stop using (DY)LD_LIBRARY_PATH on Unix""
...
This reverts commit 941d5e737c
.
2011-10-09 15:23:41 -07:00
Brian Anderson
941d5e737c
Revert "Stop using (DY)LD_LIBRARY_PATH on Unix"
...
This reverts commit 4b58071f96
.
2011-10-09 15:05:12 -07:00
Brian Anderson
4b58071f96
Stop using (DY)LD_LIBRARY_PATH on Unix
2011-10-06 15:23:20 -07:00
Brian Anderson
3a6f3cf275
Move compiletest to src/ and cleanup build rules
2011-10-02 17:28:59 -07:00