Commit Graph

21443 Commits

Author SHA1 Message Date
Jeff Olson
10ff5355b3 std: UvFileStream implements HomingIO + .home_for_io() wrapper usage 2013-08-22 16:31:58 -07:00
Jeff Olson
c3a819b01c std: writing to stdout only works when using -1 offset.. 2013-08-22 16:31:58 -07:00
Jeff Olson
a7ee85b50b std: stripping unneeded fcntl.h include from rust_uv.cpp 2013-08-22 16:31:58 -07:00
Jeff Olson
0e9964189d std: lint appeasement for unused param in condition handler 2013-08-22 16:31:58 -07:00
Jeff Olson
05c8cc70c9 std: rework file io.. support [p]read,[p]write, impl seek/tell + more tests 2013-08-22 16:31:57 -07:00
Jeff Olson
48d6761028 std: adding #[fixed_stack_segment] as needed in new uvll calls 2013-08-22 16:31:57 -07:00
Jeff Olson
4015b4a9b4 std: add FileStream::unlink + more tests 2013-08-22 16:31:57 -07:00
Jeff Olson
f6d897d7d9 std: rt::io::file::FileStream fleshed out.. needs more work.. see extended
- change all uses of Path in fn args to &P
- FileStream.read assumptions were wrong (libuv file io is non-positional)
- the above will mean that we "own" Seek impl info .. should probably
  push it in UvFileDescriptor..
- needs more tests
2013-08-22 16:31:57 -07:00
Jeff Olson
47f0e91689 std: CRUD file io bindings in uvio, fs_open()/unlink() in IoFactory + test 2013-08-22 16:31:57 -07:00
Jeff Olson
f60bd75f4d std: remove fcntl const bindings + making valgrind clean w/ no owned vecs 2013-08-22 16:31:57 -07:00
Jeff Olson
e0a80ee332 std: support async/threadpool & sync paths in uv_fs_* calls + add sync test 2013-08-22 16:31:57 -07:00
Jeff Olson
c49c2921b0 std: add read and unlink to low-level FileDescriptor + end-to-end CRUD test 2013-08-22 16:31:57 -07:00
Jeff Olson
dabbac1d6c std: working tests for low-level libuv open, write and close operations 2013-08-22 16:31:57 -07:00
Jeff Olson
a901b16690 std: bootstrapping libuv-based fileio in newrt... open & close
the test "touch"es a new file
2013-08-22 16:31:57 -07:00
bors
f858452391 auto merge of #8688 : alexcrichton/rust/fix, r=graydon 2013-08-22 15:16:30 -07:00
Alex Crichton
d765522511 Don't attempt to run tidy over libuv or llvm 2013-08-22 14:58:06 -07:00
bors
063a005459 auto merge of #8669 : lkuper/rust/infer-refactor, r=nikomatsakis
This commit removes the "super_*" functions from
typeck::infer::combine, and adds them as default methods on the
Combine trait instead, making it possible to remove a lot of
boilerplate from the various impls of Combine.

I've been wanting to do this for over a year.  In fact, it was my
original motivation for default methods!

It might be possible to tighten things up even more, but this is the
bulk of it.
2013-08-22 10:31:25 -07:00
bors
5003f607ec auto merge of #8642 : sanxiyn/rust/arm-test, r=catamorphism
`stdtest` and `extratest` expects to be able to write to `tmp` directory under the current working directory, so the first commit creates `tmp` directory and changes the directory before running tests.

The second commit adds `--bench` argument to test runs and copies metrics from the remote device.
2013-08-22 08:31:28 -07:00
bors
4e3dbf959a auto merge of #8666 : nikomatsakis/rust/issue-3678-extern-fn-types, r=pcwalton
Change the type of crust fns like this one:

    extern fn foo() { ... }

from `*u8` to `extern "C" fn()`.

r? @pcwalton (or whomever)
2013-08-22 07:01:27 -07:00
bors
3f6f79b789 auto merge of #8627 : kballard/rust/fix-rusti, r=catamorphism
Commit 0932ab336 accidentally broke rusti by making it parse the binary
name as the input, instead of parsing what the user typed.
2013-08-22 04:41:27 -07:00
bors
7e50260f13 auto merge of #8626 : kballard/rust/issue-8615, r=catamorphism
Fixes #8615.
2013-08-22 03:11:29 -07:00
bors
b95c135621 auto merge of #8620 : brson/rust/issue-7563, r=alexcrichton 2013-08-22 01:41:30 -07:00
bors
f51d30d729 auto merge of #8616 : kballard/rust/url-parse-errors, r=catamorphism
Fixes issue #8612.
2013-08-22 00:01:32 -07:00
bors
f1132496dd auto merge of #8590 : blake2-ppc/rust/std-str, r=alexcrichton
Implement CharIterator as a separate struct, so that it can be .clone()'d. Fix `.char_range_at_reverse` so that it performs better, closer to the forwards version. This makes the reverse iterators and users like `.rfind()` perform better.

    Before
    test str::bench::char_iterator ... bench: 146 ns/iter (+/- 0)
    test str::bench::char_iterator_ascii ... bench: 397 ns/iter (+/- 49)
    test str::bench::char_iterator_rev ... bench: 576 ns/iter (+/- 8)
    test str::bench::char_offset_iterator ... bench: 128 ns/iter (+/- 2)
    test str::bench::char_offset_iterator_rev ... bench: 425 ns/iter (+/- 59)
    
    After
    test str::bench::char_iterator ... bench: 130 ns/iter (+/- 1)
    test str::bench::char_iterator_ascii ... bench: 307 ns/iter (+/- 5)
    test str::bench::char_iterator_rev ... bench: 185 ns/iter (+/- 8)
    test str::bench::char_offset_iterator ... bench: 131 ns/iter (+/- 13)
    test str::bench::char_offset_iterator_rev ... bench: 183 ns/iter (+/- 2)

To be able to use a string slice to represent the CharIterator, a function `slice_unchecked` is added, that does the same as `slice_bytes` but without any boundary checks.

It would be possible to implement CharIterator with pointer arithmetic to make it *much more efficient*, but since vec iterator is still improving, it's too early to attempt to re-implement it in other places. Hopefully CharIterator can be implemented on top of vec iterator without any unsafe code later.

Additional changes fix the documentation about null termination.
2013-08-21 21:51:30 -07:00
bors
8e776c75e9 auto merge of #8570 : catamorphism/rust/2013-08-16-rollup, r=catamorphism
Nothing arguable here, as far as I can tell.
2013-08-21 20:21:32 -07:00
bors
3ddfb72512 auto merge of #8562 : bblum/rust/superkinds, r=nikomatsakis
For #7083.

The metadata issue with the old version is now fixed. Ready for review.

This is also not the full solution to #7083, because this is not supported yet:
```
trait Foo : Send { }

impl <T: Send> Foo for T { }

fn foo<T: Foo>(val: T, chan: std::comm::Chan<T>) {
    chan.send(val);
}
```

cc @nikomatsakis
2013-08-21 18:51:42 -07:00
Tim Chevalier
a9aa4ad2a0 rustpkg: Add test for #7348. Closes #7348 2013-08-21 18:05:10 -07:00
Brian Anderson
a02a759f14 test: Add test for #7563. Closes #7563 2013-08-21 17:50:18 -07:00
Ben Blum
b795fab046 oops v2, apparently writing std::comm::stream() doesn't work on check-fast; fix this 2013-08-21 20:33:56 -04:00
Tim Chevalier
5fd47c7aac rustpkg: Re-enable some more tests 2013-08-21 17:26:18 -07:00
bors
fca75199c7 auto merge of #8595 : vadimcn/rust/print_link_args, r=alexcrichton
This resolves issue #8569
2013-08-21 17:21:33 -07:00
Tim Chevalier
996989cdb4 rustpkg: Add test for #7338. Closes #7338 2013-08-21 17:20:43 -07:00
Tim Chevalier
ef8a5044ff rustc: More helpful error message when using a struct type like a function
Closes #6702
2013-08-21 17:17:50 -07:00
Tim Chevalier
5622ce10fe testsuite: Un-xfail test for #5917 2013-08-21 17:17:50 -07:00
Tim Chevalier
8e3a4f13c5 testsuite: Test for #4447
Closes #4447
2013-08-21 17:17:50 -07:00
Tim Chevalier
120c5503a6 rustc: Remove FIXME (see #4949) 2013-08-21 17:17:50 -07:00
Tim Chevalier
21720a09de testsuite: Test for #6132
Closes #6132
2013-08-21 17:17:50 -07:00
Tim Chevalier
fb9f97ebee rustc: More helpful error message when using a struct type like a function
Closes #6702
2013-08-21 17:17:50 -07:00
Tim Chevalier
393a130b3d Testsuite: Test for #7013. Closes #7013 2013-08-21 17:17:49 -07:00
Tim Chevalier
1b860881ab extra: change XXX to FIXME and elaborate on comments 2013-08-21 17:17:47 -07:00
Tim Chevalier
5da4b4d928 std/extra: changing XXX to FIXME; cleanup
* Get rid of by-value-self workarounds; it works now
* Remove type annotations, they're not needed anymore
2013-08-21 17:17:41 -07:00
Tim Chevalier
77279a73cb testsuite: Tests for #6458. Closes #6458 2013-08-21 17:14:31 -07:00
bors
9feaf1d023 auto merge of #8594 : bytewiseand/rust/static-fn-ptr, r=pcwalton
Fixes #8588
2013-08-21 15:51:34 -07:00
blake2-ppc
93de60e511 std::str: Add test for CharIterator .clone() 2013-08-22 00:35:43 +02:00
Ben Blum
22ad36d75b oops, xfail-fast the cross-crate superkind tests 2013-08-21 15:52:31 -04:00
bors
18144b12b1 auto merge of #8546 : jld/rust/discrim-symbol-rm, r=pcwalton
Given that bootstrapping and running the testsuite works without
exporting discriminant values as global constants, I conclude that
they're unused and can be removed.
2013-08-21 12:51:40 -07:00
Vadim Chugunov
2b10968542 Trimmed whitespace 2013-08-21 11:54:30 -07:00
bors
0c6cc11e05 auto merge of #8445 : Florob/rust/unicode, r=graydon
This adds support for performing Unicode Normalization Forms D and KD on strings.
To enable this the decomposition and canonical combining class properties are added to std::unicode.
On my system this increases libstd's size by ~250KiB.
2013-08-21 11:01:44 -07:00
Lindsey Kuper
3613c22c8c Refactor type combining to use default methods. Woohoo!
This commit removes the "super_*" functions from
typeck::infer::combine, and adds them as default methods on the
Combine trait instead, making it possible to remove a lot of
boilerplate from the various impls of Combine.

I've been wanting to do this for over a year.  In fact, it was my
original motivation for default methods!

It might be possible to tighten things up even more, but this is the
bulk of it.
2013-08-21 13:33:30 -04:00
Andreas Martens
5ed9f60a97 Changed fn main to pub fn main 2013-08-21 18:32:04 +02:00