]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agolibstd: Add missing constants for arm/linux.
Luqman Aden [Wed, 5 Feb 2014 22:11:28 +0000 (17:11 -0500)]
libstd: Add missing constants for arm/linux.

10 years agoauto merge of #11894 : alexcrichton/rust/io-clone, r=brson
bors [Wed, 5 Feb 2014 20:56:34 +0000 (12:56 -0800)]
auto merge of #11894 : alexcrichton/rust/io-clone, r=brson

This is part of the overall strategy I would like to take when approaching
issue #11165. The only two I/O objects that reasonably want to be "split" are
the network stream objects. Everything else can be "split" by just creating
another version.

The initial idea I had was the literally split the object into a reader and a
writer half, but that would just introduce lots of clutter with extra interfaces
that were a little unnnecssary, or it would return a ~Reader and a ~Writer which
means you couldn't access things like the remote peer name or local socket name.

The solution I found to be nicer was to just clone the stream itself. The clone
is just a clone of the handle, nothing fancy going on at the kernel level.
Conceptually I found this very easy to wrap my head around (everything else
supports clone()), and it solved the "split" problem at the same time.

The cloning support is pretty specific per platform/lib combination:

* native/win32 - uses some specific WSA apis to clone the SOCKET handle
* native/unix - uses dup() to get another file descriptor
* green/all - This is where things get interesting. When we support full clones
              of a handle, this implies that we're allowing simultaneous writes
              and reads to happen. It turns out that libuv doesn't support two
              simultaneous reads or writes of the same object. It does support
              *one* read and *one* write at the same time, however. Some extra
              infrastructure was added to just block concurrent writers/readers
              until the previous read/write operation was completed.

I've added tests to the tcp/unix modules to make sure that this functionality is
supported everywhere.

10 years agoImplement clone() for TCP/UDP/Unix sockets
Alex Crichton [Thu, 23 Jan 2014 03:32:16 +0000 (19:32 -0800)]
Implement clone() for TCP/UDP/Unix sockets

This is part of the overall strategy I would like to take when approaching
issue #11165. The only two I/O objects that reasonably want to be "split" are
the network stream objects. Everything else can be "split" by just creating
another version.

The initial idea I had was the literally split the object into a reader and a
writer half, but that would just introduce lots of clutter with extra interfaces
that were a little unnnecssary, or it would return a ~Reader and a ~Writer which
means you couldn't access things like the remote peer name or local socket name.

The solution I found to be nicer was to just clone the stream itself. The clone
is just a clone of the handle, nothing fancy going on at the kernel level.
Conceptually I found this very easy to wrap my head around (everything else
supports clone()), and it solved the "split" problem at the same time.

The cloning support is pretty specific per platform/lib combination:

* native/win32 - uses some specific WSA apis to clone the SOCKET handle
* native/unix - uses dup() to get another file descriptor
* green/all - This is where things get interesting. When we support full clones
              of a handle, this implies that we're allowing simultaneous writes
              and reads to happen. It turns out that libuv doesn't support two
              simultaneous reads or writes of the same object. It does support
              *one* read and *one* write at the same time, however. Some extra
              infrastructure was added to just block concurrent writers/readers
              until the previous read/write operation was completed.

I've added tests to the tcp/unix modules to make sure that this functionality is
supported everywhere.

10 years agoauto merge of #11984 : olsonjeffery/rust/libserialize, r=alexcrichton
bors [Wed, 5 Feb 2014 18:41:34 +0000 (10:41 -0800)]
auto merge of #11984 : olsonjeffery/rust/libserialize, r=alexcrichton

- `extra::json` didn't make the cut, because of `extra::json`'s required
   dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`,
   then `extra::json` could move into `libserialize`
- `libextra`, `libsyntax` and `librustc` depend on the newly created
  `libserialize`
- The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap`
  and `TreeSet` for `Encodable`/`Decodable` were moved into the respective
  modules in `extra`
- There is some trickery, evident in `src/libextra/lib.rs` where a stub
  of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for
  use in the stage0 build, where the snapshot rustc is still making
  deriving for `Encodable` and `Decodable` point at extra. Big props to
  @huonw for help working out the re-export solution for this
- @pcwalton's change in 449a7a8 didn't sneak back in

10 years agopull extra::{serialize, ebml} into a separate libserialize crate
Jeff Olson [Wed, 5 Feb 2014 16:52:54 +0000 (08:52 -0800)]
pull extra::{serialize, ebml} into a separate libserialize crate

- `extra::json` didn't make the cut, because of `extra::json` required
   dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`,
   then `extra::json` could move into `serialize`
- `libextra`, `libsyntax` and `librustc` depend on the newly created
  `libserialize`
- The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap`
  and `TreeSet` for `Encodable`/`Decodable` were moved into the respective
  modules in `extra`
- There is some trickery, evident in `src/libextra/lib.rs` where a stub
  of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for
  use in the stage0 build, where the snapshot rustc is still making
  deriving for `Encodable` and `Decodable` point at extra. Big props to
  @huonw for help working out the re-export solution for this

extra: inline extra::serialize stub

fix stuff clobbered in rebase + don't reexport serialize::serialize

no more globs in libserialize

syntax: fix import of libserialize traits

librustc: fix bad imports in encoder/decoder

add serialize dep to librustdoc

fix failing run-pass tests w/ serialize dep

adjust uuid dep

more rebase de-clobbering for libserialize

fixing tests, pushing libextra dep into cfg(test)

fix doc code in extra::json

adjust index.md links to serialize and uuid library

10 years agoauto merge of #11939 : JeremyLetang/rust/move-libsync, r=alexcrichton
bors [Wed, 5 Feb 2014 17:21:34 +0000 (09:21 -0800)]
auto merge of #11939 : JeremyLetang/rust/move-libsync, r=alexcrichton

This time everything should be okay, No break due to a failed merge or rebase...

Sorry for the abuse of pull request.

So this move extra::sync, extra::arc, extra::future, extra::comm and extra::task_pool to libsync.

10 years agomove concurrent stuff from libextra to libsync
JeremyLetang [Thu, 30 Jan 2014 20:04:47 +0000 (15:04 -0500)]
move concurrent stuff from libextra to libsync

10 years agoauto merge of #12045 : thestinger/rust/glue, r=pcwalton
bors [Wed, 5 Feb 2014 16:06:37 +0000 (08:06 -0800)]
auto merge of #12045 : thestinger/rust/glue, r=pcwalton

A solid step towards fixing #11998. Eventually, the size may always be
passed to `exchange_free` but this will not be required to fix the bug.

10 years agoauto merge of #12035 : chromatic/rust/tutorial_improvements, r=alexcrichton
bors [Wed, 5 Feb 2014 11:16:35 +0000 (03:16 -0800)]
auto merge of #12035 : chromatic/rust/tutorial_improvements, r=alexcrichton

This cleans up a warning about an unused variable and explains the code
further.

10 years agoauto merge of #12025 : lilac/rust/feature-gate-quote, r=brson
bors [Wed, 5 Feb 2014 09:06:32 +0000 (01:06 -0800)]
auto merge of #12025 : lilac/rust/feature-gate-quote, r=brson

Closes #11630.

10 years agostop calling `exchange_free` on 0-size types
Daniel Micay [Wed, 5 Feb 2014 07:11:06 +0000 (02:11 -0500)]
stop calling `exchange_free` on 0-size types

A solid step towards fixing #11998. Eventually, the size may always be
passed to `exchange_free` but this will not be required to fix the bug.

10 years agoauto merge of #12023 : nick29581/rust/err_res, r=alexcrichton
bors [Wed, 5 Feb 2014 07:46:37 +0000 (23:46 -0800)]
auto merge of #12023 : nick29581/rust/err_res, r=alexcrichton

closes #3512

10 years agoauto merge of #12018 : alexcrichton/rust/triage, r=sfackler
bors [Wed, 5 Feb 2014 05:46:35 +0000 (21:46 -0800)]
auto merge of #12018 : alexcrichton/rust/triage, r=sfackler

Mostly just test suite modifications.

10 years agoauto merge of #12014 : eddyb/rust/less-copies, r=cmr
bors [Wed, 5 Feb 2014 02:41:38 +0000 (18:41 -0800)]
auto merge of #12014 : eddyb/rust/less-copies, r=cmr

10 years agoRun all target crate tests on the windows/try bots
Alex Crichton [Mon, 3 Feb 2014 23:53:43 +0000 (15:53 -0800)]
Run all target crate tests on the windows/try bots

Previously, the check-fast and check-lite test suites weren't picking up all
target crates, rather just std/extra. In order to ensure that all of our crates
work on windows, I've modified these rules to build the test suites for all
TARGET_CRATES members. Note that this still excludes rustc/syntax/rustdoc.

10 years agoMake cfail test error messages more precise
Alex Crichton [Mon, 3 Feb 2014 18:25:12 +0000 (10:25 -0800)]
Make cfail test error messages more precise

Closes #3192

10 years agoAdding tests for closed issues
Alex Crichton [Mon, 3 Feb 2014 18:12:26 +0000 (10:12 -0800)]
Adding tests for closed issues

Closes #5521
Closes #9396
Closes #10714

10 years agoImproved pattern-match code and explanation.
chromatic [Wed, 5 Feb 2014 00:06:41 +0000 (16:06 -0800)]
Improved pattern-match code and explanation.

This cleans up a warning about an unused variable and explains the code
further.

10 years agoauto merge of #11230 : csherratt/rust/cow, r=alexcrichton
bors [Tue, 4 Feb 2014 22:41:36 +0000 (14:41 -0800)]
auto merge of #11230 : csherratt/rust/cow, r=alexcrichton

This allows patch adds a new arc type that allows for creation of copy-on-write data structures. The idea is that it is safe to mutate any data structure as long as it has only one reference to it. If there are multiple, it requires cloning of the data structure before mutation is possible.

10 years agoCheck for trait impl conflicts across crates
Nick Cameron [Tue, 4 Feb 2014 01:31:00 +0000 (14:31 +1300)]
Check for trait impl conflicts across crates

10 years agoDon't copy arguments passed by value with indirection to allocas.
Eduard Burtescu [Tue, 4 Feb 2014 18:53:58 +0000 (20:53 +0200)]
Don't copy arguments passed by value with indirection to allocas.

10 years agoauto merge of #12026 : alexcrichton/rust/snapshots, r=cmr
bors [Tue, 4 Feb 2014 14:31:34 +0000 (06:31 -0800)]
auto merge of #12026 : alexcrichton/rust/snapshots, r=cmr

10 years agoauto merge of #11951 : dmanescu/rust/reserve-rename, r=huonw
bors [Tue, 4 Feb 2014 12:31:34 +0000 (04:31 -0800)]
auto merge of #11951 : dmanescu/rust/reserve-rename, r=huonw

Changes in std::{str,vec,hashmap} and extra::{priority_queue,ringbuf}.
Fixes #11949

10 years agoReplaced with a single "quote" feature gate.
James Deng [Tue, 4 Feb 2014 11:03:00 +0000 (22:03 +1100)]
Replaced with a single "quote" feature gate.

10 years agoauto merge of #11717 : DiamondLovesYou/rust/master, r=alexcrichton
bors [Tue, 4 Feb 2014 09:11:34 +0000 (01:11 -0800)]
auto merge of #11717 : DiamondLovesYou/rust/master, r=alexcrichton

Note that it still doesn't allow generic types to be marked with #[simd].

10 years agoAdded missing xfail-fast.
Richard Diamond [Tue, 4 Feb 2014 08:26:02 +0000 (02:26 -0600)]
Added missing xfail-fast.

10 years agoRegister new snapshots
Alex Crichton [Tue, 4 Feb 2014 08:06:08 +0000 (00:06 -0800)]
Register new snapshots

10 years agoSimd feature gating + Win32/64 fixes.
Richard Diamond [Tue, 4 Feb 2014 07:04:19 +0000 (01:04 -0600)]
Simd feature gating + Win32/64 fixes.

10 years agoFeature gate all quasi-quoting macros.
James Deng [Tue, 4 Feb 2014 05:35:57 +0000 (16:35 +1100)]
Feature gate all quasi-quoting macros.

10 years agoauto merge of #11912 : poiru/rust/8784-libuuid, r=alexcrichton
bors [Tue, 4 Feb 2014 05:21:32 +0000 (21:21 -0800)]
auto merge of #11912 : poiru/rust/8784-libuuid, r=alexcrichton

cc #8784

10 years agoextra: Move uuid to libuuid
Birunthan Mohanathas [Mon, 3 Feb 2014 18:02:47 +0000 (20:02 +0200)]
extra: Move uuid to libuuid
cc #8784

10 years agoauto merge of #12022 : alexcrichton/rust/unblock-snapshot, r=thestinger
bors [Tue, 4 Feb 2014 03:41:31 +0000 (19:41 -0800)]
auto merge of #12022 : alexcrichton/rust/unblock-snapshot, r=thestinger

cc #12021

10 years agoauto merge of #11999 : joaoxsouls/rust/master, r=cmr
bors [Tue, 4 Feb 2014 01:46:37 +0000 (17:46 -0800)]
auto merge of #11999 : joaoxsouls/rust/master, r=cmr

10 years agoRename reserve to reserve_exact and reserve_at_least to reserve
David Manescu [Fri, 31 Jan 2014 13:03:20 +0000 (00:03 +1100)]
Rename reserve to reserve_exact and reserve_at_least to reserve

Changes in std::{str,vec,hashmap} and extra::{priority_queue,ringbuf}.
Fixes #11949

10 years agoxfail a test to unblock the snapshot
Alex Crichton [Tue, 4 Feb 2014 01:12:52 +0000 (17:12 -0800)]
xfail a test to unblock the snapshot

cc #12021

10 years agoauto merge of #12016 : FlaPer87/rust/remove-non-copyable, r=alexcrichton
bors [Tue, 4 Feb 2014 00:31:33 +0000 (16:31 -0800)]
auto merge of #12016 : FlaPer87/rust/remove-non-copyable, r=alexcrichton

cc #10834

10 years agodoc: update boxes section on Manual, remove managed pointers references
joaoxsouls [Sun, 2 Feb 2014 17:33:00 +0000 (17:33 +0000)]
doc: update boxes section on Manual, remove managed pointers references

10 years agoReplace NonCopyable usage with NoPod
Flavio Percoco [Sun, 26 Jan 2014 10:42:46 +0000 (11:42 +0100)]
Replace NonCopyable usage with NoPod

cc #10834

10 years agoauto merge of #12012 : omasanori/rust/semver, r=alexcrichton
bors [Mon, 3 Feb 2014 23:11:44 +0000 (15:11 -0800)]
auto merge of #12012 : omasanori/rust/semver, r=alexcrichton

Done as a part of #8784.

10 years agoauto merge of #11866 : alexcrichton/rust/atomic-u64, r=brson
bors [Mon, 3 Feb 2014 21:11:35 +0000 (13:11 -0800)]
auto merge of #11866 : alexcrichton/rust/atomic-u64, r=brson

Let's try this again.

This is an implementation of mutexes which I believe is free from undefined behavior of OS mutexes (the pitfall of the previous implementation).

This implementation is not ideal. There's a yield-loop spot, and it's not particularly fair with respect to lockers who steal without going through the normal code paths. That being said, I believe that this is a correct implementation which is a stepping stone to move from.

I haven't done rigorous benchmarking of this mutex, but preliminary results show that it's about 25% slower in the uncontended case on linux (same runtime on OSX), and it's actually faster than a pthreads mutex on high contention (again, not rigorous benchmarking, I just saw these numbers come up).

10 years agoVarious bug fixes and rebase conflicts
Alex Crichton [Tue, 28 Jan 2014 06:41:25 +0000 (22:41 -0800)]
Various bug fixes and rebase conflicts

10 years agoextra: Introduce a mutex type for native/green threads
Alex Crichton [Tue, 28 Jan 2014 06:41:10 +0000 (22:41 -0800)]
extra: Introduce a mutex type for native/green threads

10 years agostd: Remove try_send_deferred plus all fallout
Alex Crichton [Fri, 17 Jan 2014 03:58:42 +0000 (19:58 -0800)]
std: Remove try_send_deferred plus all fallout

Now that extra::sync primitives are built on a proper mutex instead of a
pthreads one, there's no longer any use for this function.

10 years agoextra: Re-add the Once primitve to extra::sync
Alex Crichton [Fri, 17 Jan 2014 03:57:59 +0000 (19:57 -0800)]
extra: Re-add the Once primitve to extra::sync

This originally lived in std::unstable::mutex, but now it has a new home (and a
more proper one).

10 years agostd: Hardcode pthread constants and structures
Alex Crichton [Fri, 17 Jan 2014 03:54:24 +0000 (19:54 -0800)]
std: Hardcode pthread constants and structures

This allows for easier static initialization of a pthread mutex, although the
windows mutexes still sadly suffer.

Note that this commit removes the clone() method from a mutex because it no
longer makes sense for pthreads mutexes. This also removes the Once type for
now, but it'll get added back shortly.

10 years agoextra: Add an intrusive MPSC to be used soon
Alex Crichton [Fri, 17 Jan 2014 03:53:42 +0000 (19:53 -0800)]
extra: Add an intrusive MPSC to be used soon

10 years agoextra: Make room for more sync primitives
Alex Crichton [Fri, 17 Jan 2014 03:52:47 +0000 (19:52 -0800)]
extra: Make room for more sync primitives

10 years agoEnable the +v7 feature on Android by default
Alex Crichton [Thu, 16 Jan 2014 00:54:11 +0000 (16:54 -0800)]
Enable the +v7 feature on Android by default

With the recently added double word CAS functionality on 32-bit ARM (enabled via
a 64-bit atomic instruction in LLVM IR), without some extra features enabled
LLVM lowers code to function calls which emulate atomic instructions. With the
v7 feature enabled, proper 64-bit CAS instructions are used on 32-bit arm.

I've been told that v7 for arm is what we should have been doing anyway. This is
overridable by providing some other non-empty feature string.

10 years agoAdd an AtomicU64 type to std::sync::atomics
Alex Crichton [Wed, 15 Jan 2014 23:32:44 +0000 (15:32 -0800)]
Add an AtomicU64 type to std::sync::atomics

This also generalizes all atomic intrinsics over T so we'll be able to add u8
atomics if we really feel the need to (do we really want to?)

10 years agoauto merge of #11946 : alexcrichton/rust/no-io-error, r=brson
bors [Mon, 3 Feb 2014 18:41:34 +0000 (10:41 -0800)]
auto merge of #11946 : alexcrichton/rust/no-io-error, r=brson

Turns out this was a little more far-reaching than I thought it was.

The first commit is the crux of this stack of commits. The `io::io_error` condition is completely removed and the `read` and `write` methods are altered to return `IoResult<T>`. This turned out to be an incredibly far-reaching change!

Overall, I'm very happy with how this turned out (in addition with the `unused_must_use` lint). I had to almost rewrite the pretty printer in `libsyntax` as well as the the formatting in `librustdoc` (as one would expect). These two modules do *tons* of I/O, and I believe that it's definitely improved.

This pull request also introduces the `if_ok!()` macro for returning-early from something that returns a result. I made quite liberal use of this in mostly the pretty printer and html renderer, and I found its usage generally quite pleasant and convenient to have. I didn't really feel like adding any other macro while I was using it, and I figured that pretty printing could be nicer, but it's nowhere near horrid today.

This may be a controversial issue closing, but I'm going to say it.

Closes #6163

10 years agoFixing remaining warnings and errors throughout
Alex Crichton [Sat, 1 Feb 2014 19:24:42 +0000 (11:24 -0800)]
Fixing remaining warnings and errors throughout

10 years agostd: Fixing all documentation
Alex Crichton [Fri, 31 Jan 2014 00:55:20 +0000 (16:55 -0800)]
std: Fixing all documentation

* Stop referencing io_error
* Start changing "Failure" sections to "Error" sections
* Update all doc examples to work.

10 years agosyntax: Remove usage of io_error in tests
Alex Crichton [Thu, 30 Jan 2014 22:28:44 +0000 (14:28 -0800)]
syntax: Remove usage of io_error in tests

10 years agorustuv: Require all results are used and fix fallout
Alex Crichton [Thu, 30 Jan 2014 22:28:36 +0000 (14:28 -0800)]
rustuv: Require all results are used and fix fallout

10 years agonative: Require all results are used and fix fallout
Alex Crichton [Thu, 30 Jan 2014 22:28:28 +0000 (14:28 -0800)]
native: Require all results are used and fix fallout

10 years agoextra: Fix tests with io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:28:20 +0000 (14:28 -0800)]
extra: Fix tests with io_error usage

10 years agostd: Fix tests with io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:10:53 +0000 (14:10 -0800)]
std: Fix tests with io_error usage

10 years agorpass: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 19:56:51 +0000 (11:56 -0800)]
rpass: Remove io_error usage

10 years agorustdoc: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 19:30:21 +0000 (11:30 -0800)]
rustdoc: Remove io_error usage

10 years agorustuv: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:37:45 +0000 (14:37 -0800)]
rustuv: Remove io_error usage

10 years agonative: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:37:38 +0000 (14:37 -0800)]
native: Remove io_error usage

10 years agogreen: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:37:30 +0000 (14:37 -0800)]
green: Remove io_error usage

10 years agoglob: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:37:20 +0000 (14:37 -0800)]
glob: Remove io_error usage

10 years agocompiletest: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 22:37:10 +0000 (14:37 -0800)]
compiletest: Remove io_error usage

10 years agorustc: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 02:42:19 +0000 (18:42 -0800)]
rustc: Remove io_error usage

10 years agosyntax: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 01:39:21 +0000 (17:39 -0800)]
syntax: Remove io_error usage

10 years agoextra: Remove io_error usage
Alex Crichton [Thu, 30 Jan 2014 01:39:12 +0000 (17:39 -0800)]
extra: Remove io_error usage

10 years agostd: Remove io::io_error
Alex Crichton [Thu, 30 Jan 2014 00:33:57 +0000 (16:33 -0800)]
std: Remove io::io_error

* All I/O now returns IoResult<T> = Result<T, IoError>
* All formatting traits now return fmt::Result = IoResult<()>
* The if_ok!() macro was added to libstd

10 years agoauto merge of #12013 : Hywan/rust/doc, r=sanxiyn
bors [Mon, 3 Feb 2014 10:46:32 +0000 (02:46 -0800)]
auto merge of #12013 : Hywan/rust/doc, r=sanxiyn

10 years agoRemove unnecessary trailing commas.
Ivan Enderlin [Mon, 3 Feb 2014 09:12:31 +0000 (10:12 +0100)]
Remove unnecessary trailing commas.

10 years agoMove semver out of libextra.
OGINO Masanori [Mon, 3 Feb 2014 08:13:08 +0000 (17:13 +0900)]
Move semver out of libextra.

Done as a part of #8784.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoauto merge of #12003 : bnoordhuis/rust/sizeof-epoll-event-fixup, r=brson
bors [Mon, 3 Feb 2014 03:11:27 +0000 (19:11 -0800)]
auto merge of #12003 : bnoordhuis/rust/sizeof-epoll-event-fixup, r=brson

Make the definition of epoll_event use natural alignment on all
architectures except x86_64.

Before this commit, the struct was always 12 bytes big, which works okay
on x86 and x86_64 but not on ARM and MIPS, where it should be 16 bytes
big with the `data` field aligned on an 8 byte boundary.

10 years agoauto merge of #12005 : omasanori/rust/update-trans, r=brson
bors [Mon, 3 Feb 2014 01:51:27 +0000 (17:51 -0800)]
auto merge of #12005 : omasanori/rust/update-trans, r=brson

Also, I've corrected src/doc/README.md in line with this change.

10 years agoauto merge of #11945 : xales/rust/libextra, r=huonw
bors [Sun, 2 Feb 2014 23:56:27 +0000 (15:56 -0800)]
auto merge of #11945 : xales/rust/libextra, r=huonw

cc #8784

10 years agoMove term, terminfo out of extra.
xales [Fri, 31 Jan 2014 00:15:10 +0000 (19:15 -0500)]
Move term, terminfo out of extra.

cc #8784

10 years agoUpdate po4a.conf and regenerate .po files.
OGINO Masanori [Sun, 2 Feb 2014 23:23:34 +0000 (08:23 +0900)]
Update po4a.conf and regenerate .po files.

Also, I've corrected src/doc/README.md in line with this change.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoauto merge of #11891 : alexcrichton/rust/docs, r=brson
bors [Sun, 2 Feb 2014 19:01:29 +0000 (11:01 -0800)]
auto merge of #11891 : alexcrichton/rust/docs, r=brson

I moved all documentation sources (guides, manuals, etc) to `src/doc` to free up `doc` as a build directory for all generated files.

At the same time, I also removed our usage of `VPATH` from the makefiles because it was wreaking havoc with doc deps and it's not very necessary now that we're primarily a rust project rather than having a good portion of C++/C inside of it.

10 years agoRewrite the doc makefile for doc => src/doc
Alex Crichton [Tue, 28 Jan 2014 22:15:29 +0000 (14:15 -0800)]
Rewrite the doc makefile for doc => src/doc

This continues to generate all documentation into doc, but it now looks for
source files in src/doc

Closes #11860
Closes #11970

10 years agoRemove VPATH usage in Makefiles
Alex Crichton [Tue, 28 Jan 2014 22:14:51 +0000 (14:14 -0800)]
Remove VPATH usage in Makefiles

This is just messing up all the doc dependencies because of such similar
directory names and file names.

Closes #11422

10 years agoMove doc/ to src/doc/
Alex Crichton [Tue, 28 Jan 2014 20:01:57 +0000 (12:01 -0800)]
Move doc/ to src/doc/

We generate documentation into the doc/ directory, so we shouldn't be
intermingling source files with generated files

10 years agolibnative: fix epoll_event struct layout
Ben Noordhuis [Sun, 2 Feb 2014 17:04:05 +0000 (18:04 +0100)]
libnative: fix epoll_event struct layout

Make the definition of epoll_event use natural alignment on all
architectures except x86_64.

Before this commit, the struct was always 12 bytes big, which works okay
on x86 and x86_64 but not on ARM and MIPS, where it should be 16 bytes
big with the `data` field aligned on an 8 byte boundary.

10 years agoauto merge of #11996 : lecram/rust/master, r=pcwalton
bors [Sun, 2 Feb 2014 16:41:27 +0000 (08:41 -0800)]
auto merge of #11996 : lecram/rust/master, r=pcwalton

This Pull Request aims to add backticks to all instances of code inside comments in snippets present in tutorial.md. It also includes backticks for filenames in the same conditions. See #11796 for motivation.

10 years agodoc: use backticks for code-in-comments.
Marcel Rodrigues [Sun, 2 Feb 2014 15:28:47 +0000 (13:28 -0200)]
doc: use backticks for code-in-comments.

10 years agoauto merge of #11982 : eddyb/rust/generic-default-type-params, r=pcwalton
bors [Sun, 2 Feb 2014 12:16:17 +0000 (04:16 -0800)]
auto merge of #11982 : eddyb/rust/generic-default-type-params, r=pcwalton

Fixes #11964 and closes #8998.

10 years agoauto merge of #11988 : cmr/rust/11668-squash, r=alexcrichton
bors [Sun, 2 Feb 2014 10:56:19 +0000 (02:56 -0800)]
auto merge of #11988 : cmr/rust/11668-squash, r=alexcrichton

10 years agoSubstitute type params in default type params using them.
Eduard Burtescu [Sun, 2 Feb 2014 10:53:23 +0000 (12:53 +0200)]
Substitute type params in default type params using them.

10 years agoChange fmt! to format!
Byron Williams [Sun, 19 Jan 2014 16:57:49 +0000 (16:57 +0000)]
Change fmt! to format!

10 years agoauto merge of #11987 : cmr/rust/rm-rustpkg, r=cmr
bors [Sun, 2 Feb 2014 09:11:27 +0000 (01:11 -0800)]
auto merge of #11987 : cmr/rust/rm-rustpkg, r=cmr

I'm sorry :'(

Closes #11859

10 years agoRemove rustpkg.
Corey Richardson [Sun, 2 Feb 2014 07:56:55 +0000 (02:56 -0500)]
Remove rustpkg.

I'm sorry :'(

Closes #11859

10 years agoauto merge of #11948 : huonw/rust/show, r=alexcrichton
bors [Sun, 2 Feb 2014 06:31:26 +0000 (22:31 -0800)]
auto merge of #11948 : huonw/rust/show, r=alexcrichton

- renames `Default` to `Show`
- introduces some hidden `std::fmt::secret_...` functions, designed to work-around the lack of UFCS (with UFCS they can be replaced by referencing the trait methods directly) because I'm going to convert the traits to have methods rather than static functions, since `#[deriving]` works much better with true methods.

I'm blocked on a snapshot after this. (I could probably do a large number of `#[cfg]`s, but I can work on other things in the meantime.)

10 years agoRemove the SNAP line to work around #11985.
Huon Wilson [Sun, 2 Feb 2014 05:22:54 +0000 (16:22 +1100)]
Remove the SNAP line to work around #11985.

10 years agostd::fmt: prepare to convert the formatting traits to methods, and work
Huon Wilson [Fri, 31 Jan 2014 10:32:39 +0000 (21:32 +1100)]
std::fmt: prepare to convert the formatting traits to methods, and work
around the lack of UFCS.

The further work is pending a snapshot, to avoid putting #[cfg(stage0)]
attributes on all the traits and duplicating them.

10 years agoauto merge of #11975 : jfager/rust/r8498, r=alexcrichton
bors [Sun, 2 Feb 2014 03:16:26 +0000 (19:16 -0800)]
auto merge of #11975 : jfager/rust/r8498, r=alexcrichton

Closes #8498

10 years agostd: rename fmt::Default to `Show`.
Huon Wilson [Wed, 29 Jan 2014 13:46:37 +0000 (00:46 +1100)]
std: rename fmt::Default to `Show`.

This is a better name with which to have a #[deriving] mode.

Decision in:
https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-01-28

10 years agoauto merge of #11959 : omasanori/rust/update-zsh, r=brson
bors [Sun, 2 Feb 2014 01:26:24 +0000 (17:26 -0800)]
auto merge of #11959 : omasanori/rust/update-zsh, r=brson

Updating the list of options and sorting it.

10 years agoauto merge of #11840 : cmr/rust/cstr, r=kballard
bors [Sat, 1 Feb 2014 23:46:25 +0000 (15:46 -0800)]
auto merge of #11840 : cmr/rust/cstr, r=kballard

10 years agoimpl Eq for CString
Corey Richardson [Fri, 31 Jan 2014 00:10:07 +0000 (19:10 -0500)]
impl Eq for CString

10 years agoimpl Clone for CString
Corey Richardson [Mon, 27 Jan 2014 11:12:59 +0000 (06:12 -0500)]
impl Clone for CString

Clone tests

10 years agoauto merge of #11974 : huonw/rust/no-at-vec, r=pcwalton
bors [Sat, 1 Feb 2014 19:16:24 +0000 (11:16 -0800)]
auto merge of #11974 : huonw/rust/no-at-vec, r=pcwalton

This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find.

I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship.

Closes #11967

10 years agoauto merge of #11973 : dotdash/rust/u64_to_bytes, r=huonw
bors [Sat, 1 Feb 2014 18:01:25 +0000 (10:01 -0800)]
auto merge of #11973 : dotdash/rust/u64_to_bytes, r=huonw

LLVM fails to properly optimize the shifts used to convert the source
value to the right endianess. The resulting assembly copies the value
to the stack one byte at a time even when there's no conversion required
(e.g. u64_to_le_bytes on a little endian machine).

Instead of doing the conversion ourselves using shifts, we can use the
existing intrinsics to perform the endianess conversion and then
transmute the value to get a fixed vector of its bytes.

Before:
````
test be_i8  ... bench:     21442 ns/iter (+/- 70)
test be_i16 ... bench:     21447 ns/iter (+/- 45)
test be_i32 ... bench:     23832 ns/iter (+/- 63)
test be_i64 ... bench:     26887 ns/iter (+/- 267)

test le_i8  ... bench:     21442 ns/iter (+/- 56)
test le_i16 ... bench:     21448 ns/iter (+/- 36)
test le_i32 ... bench:     23825 ns/iter (+/- 153)
test le_i64 ... bench:     26271 ns/iter (+/- 138)
````
After:
````
test be_i8  ... bench:     21438 ns/iter (+/- 10)
test be_i16 ... bench:     21441 ns/iter (+/- 15)
test be_i32 ... bench:     19057 ns/iter (+/- 6)
test be_i64 ... bench:     21439 ns/iter (+/- 34)

test le_i8  ... bench:     21438 ns/iter (+/- 19)
test le_i16 ... bench:     21439 ns/iter (+/- 8)
test le_i32 ... bench:     21439 ns/iter (+/- 19)
test le_i64 ... bench:     21438 ns/iter (+/- 22)
````