Commit Graph

26139 Commits

Author SHA1 Message Date
bors
cb40eba4b1 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
2014-02-03 10:41:34 -08:00
Alex Crichton
c765a8e7ad Fixing remaining warnings and errors throughout 2014-02-03 10:39:23 -08:00
Alex Crichton
f9a32cdabc std: Fixing all documentation
* Stop referencing io_error
* Start changing "Failure" sections to "Error" sections
* Update all doc examples to work.
2014-02-03 09:32:35 -08:00
Alex Crichton
2a7c5e0b72 syntax: Remove usage of io_error in tests 2014-02-03 09:32:35 -08:00
Alex Crichton
94f2dfa8f6 rustuv: Require all results are used and fix fallout 2014-02-03 09:32:35 -08:00
Alex Crichton
ae581a0103 native: Require all results are used and fix fallout 2014-02-03 09:32:35 -08:00
Alex Crichton
41cde566bb extra: Fix tests with io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
209642c651 std: Fix tests with io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
29e7247fd8 rpass: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
6132f7f666 rustdoc: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
e0f0a2f67f rustuv: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
5878b1b76b native: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
2053b69595 green: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
c0e77dc2ee glob: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
27a9bf773c compiletest: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
5e8ba7252a rustc: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
b211b00d21 syntax: Remove io_error usage 2014-02-03 09:32:34 -08:00
Alex Crichton
ef00c6a278 extra: Remove io_error usage 2014-02-03 09:32:33 -08:00
Alex Crichton
ece8a8f520 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
2014-02-03 09:32:33 -08:00
bors
be4fc63809 auto merge of #12013 : Hywan/rust/doc, r=sanxiyn 2014-02-03 02:46:32 -08:00
Ivan Enderlin
3cb3f0983b Remove unnecessary trailing commas. 2014-02-03 10:12:31 +01:00
OGINO Masanori
fdb820a1be Move semver out of libextra.
Done as a part of #8784.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-02-03 17:18:27 +09:00
bors
62caad2c1a 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.
2014-02-02 19:11:27 -08:00
bors
7db6bca7aa auto merge of #12005 : omasanori/rust/update-trans, r=brson
Also, I've corrected src/doc/README.md in line with this change.
2014-02-02 17:51:27 -08:00
bors
449a99e58f auto merge of #11945 : xales/rust/libextra, r=huonw
cc #8784
2014-02-02 15:56:27 -08:00
xales
51260f69cd Move term, terminfo out of extra.
cc #8784
2014-02-02 18:35:35 -05:00
OGINO Masanori
f72a2c7c10 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>
2014-02-03 08:23:34 +09:00
Yuri Kunde Schlesner
65a6c7c12c Add extra::getopts::short_usage
This complements `usage` by auto-generating a short one-liner summary
of the options.
2014-02-02 18:58:47 -02:00
bors
8d7bd499d2 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.
2014-02-02 11:01:29 -08:00
Alex Crichton
22a421fa02 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
2014-02-02 10:59:27 -08:00
Alex Crichton
91882a4c56 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
2014-02-02 10:59:14 -08:00
Alex Crichton
864b434bfa Move doc/ to src/doc/
We generate documentation into the doc/ directory, so we shouldn't be
intermingling source files with generated files
2014-02-02 10:59:14 -08:00
Ben Noordhuis
6121acf97d 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.
2014-02-02 19:55:41 +01:00
bors
2ff16b1849 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.
2014-02-02 08:41:27 -08:00
Marcel Rodrigues
6ad383ef40 doc: use backticks for code-in-comments. 2014-02-02 13:28:47 -02:00
bors
3e0eb3c0bf auto merge of #11982 : eddyb/rust/generic-default-type-params, r=pcwalton
Fixes #11964 and closes #8998.
2014-02-02 04:16:17 -08:00
bors
fb663c3cc9 auto merge of #11988 : cmr/rust/11668-squash, r=alexcrichton 2014-02-02 02:56:19 -08:00
Eduard Burtescu
fdf985cd14 Substitute type params in default type params using them. 2014-02-02 12:54:22 +02:00
Byron Williams
0074ae5c8f Change fmt! to format! 2014-02-02 04:58:32 -05:00
bors
8665a51201 auto merge of #11987 : cmr/rust/rm-rustpkg, r=cmr
I'm sorry :'(

Closes #11859
2014-02-02 01:11:27 -08:00
Corey Richardson
25fe2cadb1 Remove rustpkg.
I'm sorry :'(

Closes #11859
2014-02-02 03:08:56 -05:00
bors
dce61c980e 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.)
2014-02-01 22:31:26 -08:00
Huon Wilson
c19a7b6857 Remove the SNAP line to work around #11985. 2014-02-02 16:22:54 +11:00
Huon Wilson
d8b6919d4f 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.
2014-02-02 14:19:05 +11:00
bors
16f1a72f0a auto merge of #11975 : jfager/rust/r8498, r=alexcrichton
Closes #8498
2014-02-01 19:16:26 -08:00
Huon Wilson
003ce50235 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
2014-02-02 12:55:15 +11:00
bors
3e39e3e80d auto merge of #11959 : omasanori/rust/update-zsh, r=brson
Updating the list of options and sorting it.
2014-02-01 17:26:24 -08:00
bors
a72ab2d31c auto merge of #11840 : cmr/rust/cstr, r=kballard 2014-02-01 15:46:25 -08:00
Corey Richardson
a7f0ecf562 impl Eq for CString 2014-02-01 18:24:44 -05:00
Corey Richardson
73024e4b85 impl Clone for CString
Clone tests
2014-02-01 18:24:44 -05:00