]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoImplement rust_eh_personality in Rust, remove rust_eh_personality_catch.
Vadim Chugunov [Fri, 22 Jul 2016 21:57:54 +0000 (14:57 -0700)]
Implement rust_eh_personality in Rust, remove rust_eh_personality_catch.

Well, not quite: ARM EHABI platforms still use the old scheme -- for now.

8 years agoAuto merge of #34819 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Fri, 15 Jul 2016 10:06:58 +0000 (03:06 -0700)]
Auto merge of #34819 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 7 pull requests

- Successful merges: #34456, #34733, #34777, #34794, #34799, #34804, #34818
- Failed merges: #33951

8 years agoRollup merge of #34818 - frewsxcv:vecdoc, r=GuillaumeGomez
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34818 - frewsxcv:vecdoc, r=GuillaumeGomez

Mention where `std::vec` structs originate from.

None

8 years agoRollup merge of #34804 - GuillaumeGomez:fix_ret, r=steveklabnik
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34804 - GuillaumeGomez:fix_ret, r=steveklabnik

Add examples for FpCategory

Fixes #29364.

r? @steveklabnik

8 years agoRollup merge of #34799 - wuranbo:patch-3, r=steveklabnik
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34799 - wuranbo:patch-3, r=steveklabnik

doc: ffi referenced rust-snappy can not compile

r? @steveklabnik

The referenced code https://github.com/thestinger/rust-snappy can not work. Maybe it's the old rust version? I do not know.
So I try to rewrite these test cases. If it is not what you originally meaning, just ignored it.

8 years agoRollup merge of #34794 - frewsxcv:exitstatus-success, r=GuillaumeGomez
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34794 - frewsxcv:exitstatus-success, r=GuillaumeGomez

Add doc example for `std::process::ExitStatus::success`.

None

8 years agoRollup merge of #34777 - glandium:issue34697, r=GuillaumeGomez
Guillaume Gomez [Fri, 15 Jul 2016 08:56:42 +0000 (10:56 +0200)]
Rollup merge of #34777 - glandium:issue34697, r=GuillaumeGomez

doc: Mention that writeln! and println! always use LF

Fixes #34697

I'm not really satisfied with the wording, but I didn't have a better idea. Suggestions welcome.

8 years agoRollup merge of #34733 - izgzhen:alloc-arc-doc-improve, r=steveklabnik
Guillaume Gomez [Fri, 15 Jul 2016 08:56:42 +0000 (10:56 +0200)]
Rollup merge of #34733 - izgzhen:alloc-arc-doc-improve, r=steveklabnik

Improve arc doc, fixing #32905

As issue #32905 detailed, I moved part of the module doc to the struct doc, and fixed some small places in the `alloc::arc`.

8 years agoRollup merge of #34456 - tbu-:pr_ptr_null, r=aturon
Guillaume Gomez [Fri, 15 Jul 2016 08:56:42 +0000 (10:56 +0200)]
Rollup merge of #34456 - tbu-:pr_ptr_null, r=aturon

Use `ptr::{null, null_mut}` instead of `0 as *{const, mut}`

8 years agoAuto merge of #34801 - TimNN:rustbuild-doc-fixes, r=alexcrichton
bors [Fri, 15 Jul 2016 03:29:54 +0000 (20:29 -0700)]
Auto merge of #34801 - TimNN:rustbuild-doc-fixes, r=alexcrichton

rustbuild: doc fixes

This fixes two issues rustbuild currently has when building documentation:

1. It fixes standalone builds of `doc-test` and `doc-rustc`.
2. It actually builds the compiler docs if requested in the config.

Closes #34275.

8 years agoMention where `std::vec` structs originate from.
Corey Farwell [Thu, 14 Jul 2016 13:34:43 +0000 (09:34 -0400)]
Mention where `std::vec` structs originate from.

8 years agoAuto merge of #34599 - cuviper:unicode-9.0, r=alexcrichton
bors [Fri, 15 Jul 2016 00:29:16 +0000 (17:29 -0700)]
Auto merge of #34599 - cuviper:unicode-9.0, r=alexcrichton

Update Unicode tables to 9.0

I just updated `unicode.py`'s generated copyright year, then ran it.

8 years agoAuto merge of #34797 - doomrobo:fix-import-trait-method, r=jseyfried
bors [Thu, 14 Jul 2016 21:33:17 +0000 (14:33 -0700)]
Auto merge of #34797 - doomrobo:fix-import-trait-method, r=jseyfried

Fixed issue where importing a trait method directly and then calling the method causes a compiler panic

The code below triggers the panic, and is included in a new regression test.

```rust
trait Foo {
    fn foo();
}

use Foo::foo;

fn main() {
    foo();
}
```
The bug is caused by `librustc_resolve` allowing the illegal binding to be imported even after displaying the error message above.

The fix amounts to importing a dummy binding (`rustc::hir::def::Def::Err`) instead of the actual trait method.

8 years agoAuto merge of #34824 - alexcrichton:fix-nightlies, r=brson
bors [Thu, 14 Jul 2016 18:40:14 +0000 (11:40 -0700)]
Auto merge of #34824 - alexcrichton:fix-nightlies, r=brson

test: Remove NOTE assertions from trace_macros-gate

If no NOTE assertions are present I believe they aren't asserted at all, and it
looks like the number of NOTEs differs on distcheck vs `make check`, so let's
just remove them all.

Closes #18154

8 years agotest: Remove NOTE assertions from trace_macros-gate
Alex Crichton [Thu, 14 Jul 2016 17:27:56 +0000 (10:27 -0700)]
test: Remove NOTE assertions from trace_macros-gate

If no NOTE assertions are present I believe they aren't asserted at all, and it
looks like the number of NOTEs differs on distcheck vs `make check`, so let's
just remove them all.

Closes #18154

8 years agoAuto merge of #34783 - Dridi:cdylib_usage, r=alexcrichton
bors [Thu, 14 Jul 2016 13:37:30 +0000 (06:37 -0700)]
Auto merge of #34783 - Dridi:cdylib_usage, r=alexcrichton

Mention the crate type cdylib in rustc's usage

Hello,

I just tried to build a `cdylib` with the latest stable release, I've been passively waiting for this for quite some time now. Tested successfully on my machine, although it doesn't appear in `rustc`'s usage it seems to work like a charm so far. :grinning:

Thanks!

8 years agoAuto merge of #33907 - strake:decode_utf8, r=alexcrichton
bors [Thu, 14 Jul 2016 09:45:29 +0000 (02:45 -0700)]
Auto merge of #33907 - strake:decode_utf8, r=alexcrichton

add core::char::DecodeUtf8

See [issue](https://github.com/rust-lang/rust/issues/33906)

8 years agoAuto merge of #34805 - michaelwoerister:stable-bounds-encoding, r=eddyb
bors [Thu, 14 Jul 2016 06:09:02 +0000 (23:09 -0700)]
Auto merge of #34805 - michaelwoerister:stable-bounds-encoding, r=eddyb

tyencode: Make sure that projection bounds are handled in stable order.

Fixes #34796.

r? @alexcrichton

8 years agoAuto merge of #34776 - cuviper:solaris-readdir, r=alexcrichton
bors [Thu, 14 Jul 2016 02:32:17 +0000 (19:32 -0700)]
Auto merge of #34776 - cuviper:solaris-readdir, r=alexcrichton

std: fix `readdir` errors for solaris

A `NULL` from `readdir` could be the end of stream or an error.  The only
way to know is to check `errno`, so it must be set to a known value first,
like a 0 that POSIX will never use.

This currently only matters for solaris targets, as the other unix platforms
are using `readdir_r` with a direct error return indication.  However, this is
getting deprecated (#34668) so they should all eventually switch to `readdir`.

This PR adds `set_errno`, uses it to clear the value before calling `readdir`,
then checks it again after to see the reason for a `NULL`.  A few other small
fixes are included just to get solaris compiling at all.

I couldn't get cross-compilation completely going, so I don't have a good way
to test this beyond a smoke-test cargo build of std.  I'd appreciate input from
someone more familiar with solaris -- cc @nbaksalyar?

8 years agoadd core::char::DecodeUtf8
M Farkas-Dyck [Fri, 27 May 2016 16:16:27 +0000 (08:16 -0800)]
add core::char::DecodeUtf8

8 years agoAuto merge of #34684 - oli-obk:eval_rustdoc_array_len, r=alexcrichton
bors [Wed, 13 Jul 2016 23:27:30 +0000 (16:27 -0700)]
Auto merge of #34684 - oli-obk:eval_rustdoc_array_len, r=alexcrichton

evaluate the array length of fixed size array types in rustdoc

mitgates #34579

to fix it we'd need an expression simplifier.

r? @steveklabnik

cc @Osspial

8 years agoAuto merge of #33642 - xen0n:ergonomic-format-macro, r=alexcrichton
bors [Wed, 13 Jul 2016 20:26:57 +0000 (13:26 -0700)]
Auto merge of #33642 - xen0n:ergonomic-format-macro, r=alexcrichton

Ergonomic format_args!

Fixes #9456 (at last).

Not a ground-up rewrite of the existing machinery, but more like an added intermediary layer between macro arguments and format placeholders. This is now implementing Rust RFC 1618!

8 years agosyntax_ext: format: better code documentation
Wang Xuerui [Thu, 2 Jun 2016 13:47:34 +0000 (21:47 +0800)]
syntax_ext: format: better code documentation

8 years agoformat: add tests for ergonomic format_args!
Wang Xuerui [Sat, 21 May 2016 15:08:30 +0000 (23:08 +0800)]
format: add tests for ergonomic format_args!

format: workaround pretty-printer to pass tests

8 years agosyntax_ext: format: de-duplicate argument objects
Wang Xuerui [Thu, 2 Jun 2016 10:16:24 +0000 (18:16 +0800)]
syntax_ext: format: de-duplicate argument objects

8 years agosyntax_ext: format: process counts uniquely and separately
Wang Xuerui [Sat, 21 May 2016 08:00:01 +0000 (16:00 +0800)]
syntax_ext: format: process counts uniquely and separately

8 years agosyntax_ext: format: allow multiple formats for one argument
Wang Xuerui [Sat, 14 May 2016 12:42:47 +0000 (20:42 +0800)]
syntax_ext: format: allow multiple formats for one argument

This commit removed the restriction of only allowing one type per argument.
This is achieved by adding mappings between macro arguments and format
placeholders, then taking the mapping into consideration when emitting
the Arguments expression.

syntax_ext: format: fix implicit positional arguments

syntax_ext: format: don't panic if no args given for implicit positional args

Check the list lengths before use.
Fixes regression of `compile-fail/macro-backtrace-println.rs`.

syntax_ext: format: also map CountIsParam indices to expanded args

syntax_ext: format: fix ICE in case of malformed format args

8 years agosyntax_ext: format: rename variants of ArgumentType for clarity
Wang Xuerui [Sat, 21 May 2016 04:58:17 +0000 (12:58 +0800)]
syntax_ext: format: rename variants of ArgumentType for clarity

8 years agosyntax_ext: format: resolve named arguments early
Wang Xuerui [Sun, 5 Jun 2016 12:39:05 +0000 (20:39 +0800)]
syntax_ext: format: resolve named arguments early

Converts named argument references into indices, right after
verification as suggested by @alexcrichton. This drastically simplifies
the whole process!

8 years agosyntax_ext: format: separate verification and translation of pieces
Wang Xuerui [Sun, 5 Jun 2016 10:01:37 +0000 (18:01 +0800)]
syntax_ext: format: separate verification and translation of pieces

8 years agoformat: remove all implicit ref handling outside of libfmt_macros
Wang Xuerui [Mon, 16 May 2016 17:02:42 +0000 (01:02 +0800)]
format: remove all implicit ref handling outside of libfmt_macros

format: beautifully get rid of ArgumentNext and CountIsNextParam

Now that CountIsNextParam and ArgumentNext are resolved during parse,
the need for handling them outside of libfmt_macros is obviated.

Note: *one* instance of implicit reference handling still remains, and
that's for implementing `all_args_simple`. It's trivial enough though,
so in this case it may be tolerable.

8 years agolibfmt_macros: resolve all implicit refs while parsing
Wang Xuerui [Mon, 16 May 2016 06:10:54 +0000 (14:10 +0800)]
libfmt_macros: resolve all implicit refs while parsing

8 years agoAuto merge of #34772 - jseyfried:cleanup_interner, r=eddyb
bors [Wed, 13 Jul 2016 17:26:18 +0000 (10:26 -0700)]
Auto merge of #34772 - jseyfried:cleanup_interner, r=eddyb

Start cleaning up the string interner

r? @eddyb

8 years agoAdd examples for FpCategory
ggomez [Wed, 13 Jul 2016 15:32:23 +0000 (17:32 +0200)]
Add examples for FpCategory

8 years agoAuto merge of #34752 - ollie27:rustdoc_search, r=GuillaumeGomez
bors [Wed, 13 Jul 2016 14:27:43 +0000 (07:27 -0700)]
Auto merge of #34752 - ollie27:rustdoc_search, r=GuillaumeGomez

rustdoc: Fix methods in seach results

Currently methods from extern crates are sometimes added to the search
index when they shouldn't be or added with the original path rather than
the reexported path. This fixes that by making sure `cache().paths` only
contains local paths like the description for it states. It also fixes a
few minor issues with link rendering and redirect generation which would
point to local crate docs even if the docs for that crate hadn't been
generated.

Also a bug with methods implemented on traits which caused wrong paths and
so dead links in the search results has been fixed.

For example:
[before](https://doc.rust-lang.org/nightly/std/?search=is_disjoint) [after](https://ollie27.github.io/rust_doc_test/std/?search=is_disjoint)
[before](https://doc.rust-lang.org/nightly/std/?search=map_or) [after](https://ollie27.github.io/rust_doc_test/std/?search=map_or)
[before](https://doc.rust-lang.org/nightly/std/?search=unsafecell%3A%3Anew) [after](https://ollie27.github.io/rust_doc_test/std/?search=unsafecell%3A%3Anew)
[before](https://doc.rust-lang.org/nightly/std/?search=rng%3A%3Agen_) [after](https://ollie27.github.io/rust_doc_test/std/?search=rng%3A%3Agen_)
[before](https://doc.rust-lang.org/nightly/std/?search=downcast_ref) [after](https://ollie27.github.io/rust_doc_test/std/?search=downcast_ref)

Fixes #20246

8 years agobuild compiler docs if requested in config
Tim Neumann [Wed, 13 Jul 2016 13:40:42 +0000 (15:40 +0200)]
build compiler docs if requested in config

8 years agodoc: ffi referenced rust-snappy can not compile
吴冉波 [Wed, 13 Jul 2016 13:53:27 +0000 (21:53 +0800)]
doc: ffi referenced rust-snappy can not compile

r? @steveklabnik

The referenced code https://github.com/thestinger/rust-snappy can not work. Maybe it's the old rust version? I do not know.
So I try to rewrite these test cases. If it is not what you originally meaning, just ignored it.

8 years agoonly remove directory if it exists
Tim Neumann [Wed, 13 Jul 2016 13:15:28 +0000 (15:15 +0200)]
only remove directory if it exists

8 years agocreate global doc dir for all doc targets
Tim Neumann [Wed, 13 Jul 2016 13:05:52 +0000 (15:05 +0200)]
create global doc dir for all doc targets

8 years agoAuto merge of #34608 - apasel422:ll, r=bluss
bors [Wed, 13 Jul 2016 11:31:30 +0000 (04:31 -0700)]
Auto merge of #34608 - apasel422:ll, r=bluss

Replace `LinkedList`'s use of `Box` with `Shared`

Closes #34417

8 years agoAuto merge of #34660 - jseyfried:fix_parse_stmt, r=nrc
bors [Wed, 13 Jul 2016 08:37:07 +0000 (01:37 -0700)]
Auto merge of #34660 - jseyfried:fix_parse_stmt, r=nrc

Fix bugs in macro-expanded statement parsing

Fixes #34543.

This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => {
    println!("") println!("")
    //^ Semicolons are now required on macro-expanded non-braced macro invocations
    //| in statement positions.
    let x = 0
    //^ Semicolons are now required on macro-expanded `let` statements
    //| that are followed by more statements, so this would break.
    let y = 0 //< (this would still be allowed to reduce breakage in the wild)
}
fn main() { m!() }
```

r? @eddyb

8 years agoevaluate the array length of fixed size array types in rustdoc
Oliver Schneider [Wed, 13 Jul 2016 08:35:58 +0000 (10:35 +0200)]
evaluate the array length of fixed size array types in rustdoc

8 years agoFixed issue where importing a trait method directly and then calling the method cause...
Michael Rosenberg [Wed, 13 Jul 2016 05:36:09 +0000 (01:36 -0400)]
Fixed issue where importing a trait method directly and then calling the method causes a compiler panic

8 years agoAuto merge of #34756 - habnabit:mutex-refunwindsafe, r=alexcrichton
bors [Wed, 13 Jul 2016 05:43:31 +0000 (22:43 -0700)]
Auto merge of #34756 - habnabit:mutex-refunwindsafe, r=alexcrichton

Mutex and RwLock need RefUnwindSafe too

Incomplete, because I don't know what the appropriate stability annotation is here, but this is an attempt to bring the documentation for `std::panic` in line with reality. Right now, it says:

>Types like `&Mutex<T>`, however, are unwind safe because they implement poisoning by default.

But only `Mutex<T>`, not `&Mutex<T>`, is unwind-safe.

8 years agoStart a best-effort warning cycle.
Jeffrey Seyfried [Tue, 12 Jul 2016 03:56:19 +0000 (03:56 +0000)]
Start a best-effort warning cycle.

8 years agocleanup: Refactor parser method `finish_parsing_statement` -> `parse_full_stmt`.
Jeffrey Seyfried [Thu, 7 Jul 2016 04:12:20 +0000 (04:12 +0000)]
cleanup: Refactor parser method `finish_parsing_statement` -> `parse_full_stmt`.

8 years agoAllow macro-expanded macros in trailing expression positions to expand into statements:
Jeffrey Seyfried [Tue, 5 Jul 2016 08:21:25 +0000 (08:21 +0000)]
Allow macro-expanded macros in trailing expression positions to expand into statements:

```rust
macro_rules! m { () => { let x = 1; x } }
macro_rules! n { () => {
    m!() //< This can now expand into statements
}}
fn main() { n!(); }
```

and revert needless fallout fixes.

8 years agoFix bug in the pretty printer.
Jeffrey Seyfried [Tue, 5 Jul 2016 11:21:25 +0000 (11:21 +0000)]
Fix bug in the pretty printer.

8 years agoAuto merge of #34739 - therealbstern:ipv4unspec, r=alexcrichton
bors [Wed, 13 Jul 2016 02:11:02 +0000 (19:11 -0700)]
Auto merge of #34739 - therealbstern:ipv4unspec, r=alexcrichton

Mark Ipv4Addr is_unspecified as stable and provide reference.

Per [#27709 (comment)](https://github.com/rust-lang/rust/issues/27709#issuecomment-231280999), no RFC is needed here.

IPv4 "unspecified" has been defined in [Stevens], and has been part of the IPv4 stack for quite some time.  This property should become stable, since this use of 0.0.0.0 is not going anywhere.

[Stevens][_UNIX Network Programming Volume 1, Second Edition_.  Stevens, W. Richard.  Prentice-Hall, 1998.  p. 891]

Please let me know if I got the rustdoc wrong or something.  I tried to be as terse as possible while still conveying the appropriate information.

This also has a slight impact on PR #34694, but that one came first, so this shouldn't block it, IMO.

8 years agoAdd doc example for `std::process::ExitStatus::success`.
Corey Farwell [Tue, 12 Jul 2016 23:52:44 +0000 (19:52 -0400)]
Add doc example for `std::process::ExitStatus::success`.

8 years agoAuto merge of #34705 - alexcrichton:clean-deprecated, r=brson
bors [Tue, 12 Jul 2016 22:15:56 +0000 (15:15 -0700)]
Auto merge of #34705 - alexcrichton:clean-deprecated, r=brson

std: Clean out deprecated APIs

This primarily removes a lot of `sync::Static*` APIs and rejiggers the
associated implementations. While doing this it was discovered that the
`is_poisoned` method can actually result in a data race for the Mutex/RwLock
primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.

8 years agostd: Clean out deprecated APIs
Alex Crichton [Thu, 7 Jul 2016 18:46:09 +0000 (11:46 -0700)]
std: Clean out deprecated APIs

This primarily removes a lot of `sync::Static*` APIs and rejiggers the
associated implementations. While doing this it was discovered that the
`is_poisoned` method can actually result in a data race for the Mutex/RwLock
primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.

8 years agoMention the crate type cdylib in rustc's usage
Dridi Boukelmoune [Tue, 12 Jul 2016 16:56:11 +0000 (18:56 +0200)]
Mention the crate type cdylib in rustc's usage

8 years agoAuto merge of #34757 - sourcefrog:debug-filetype, r=alexcrichton
bors [Tue, 12 Jul 2016 13:54:46 +0000 (06:54 -0700)]
Auto merge of #34757 - sourcefrog:debug-filetype, r=alexcrichton

Derive Debug on FileType.

Partially fixes #32054

8 years agorustdoc: Fix methods in seach results
Oliver Middleton [Sat, 9 Jul 2016 13:07:37 +0000 (14:07 +0100)]
rustdoc: Fix methods in seach results

Currently methods from extern crates are sometimes added to the search
index when they shouldn't be or added with the original path rather than
the reexported path. This fixes that by making sure `cache().paths` only
contains local paths like the description for it states. It also fixes a
few minor issues with link rendering and redirect generation which would
point to local crate docs even if the docs for that crate hadn't been
generated.

Also a bug with methods implemented on traits which caused wrong paths and
so dead links in the search results has been fixed.

8 years agoAuto merge of #34778 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 12 Jul 2016 10:58:33 +0000 (03:58 -0700)]
Auto merge of #34778 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 7 pull requests

- Successful merges: #34736, #34737, #34740, #34742, #34749, #34750, #34770
- Failed merges: #33951

8 years agoRollup merge of #34770 - davidko:patch-1, r=steveklabnik
Guillaume Gomez [Tue, 12 Jul 2016 10:08:24 +0000 (12:08 +0200)]
Rollup merge of #34770 - davidko:patch-1, r=steveklabnik

Fixed some typos

I believe these are typos?

8 years agoRollup merge of #34750 - GuillaumeGomez:error_doc, r=steveklabnik
Guillaume Gomez [Tue, 12 Jul 2016 10:08:24 +0000 (12:08 +0200)]
Rollup merge of #34750 - GuillaumeGomez:error_doc, r=steveklabnik

Add examples for std::Error module

Fixes #29352.

r? @steveklabnik

8 years agoRollup merge of #34749 - GuillaumeGomez:any_doc, r=steveklabnik
Guillaume Gomez [Tue, 12 Jul 2016 10:08:23 +0000 (12:08 +0200)]
Rollup merge of #34749 - GuillaumeGomez:any_doc, r=steveklabnik

Improve std::any module doc

Fixes #29340.

r? @steveklabnik

8 years agoRollup merge of #34742 - abhijeetbhagat:master, r=steveklabnik
Guillaume Gomez [Tue, 12 Jul 2016 10:08:23 +0000 (12:08 +0200)]
Rollup merge of #34742 - abhijeetbhagat:master, r=steveklabnik

Update on struct expressions

Update doc for struct expressions (#32769)

8 years agoRollup merge of #34740 - GuillaumeGomez:boxed_doc, r=steveklabnik
Guillaume Gomez [Tue, 12 Jul 2016 10:08:23 +0000 (12:08 +0200)]
Rollup merge of #34740 - GuillaumeGomez:boxed_doc, r=steveklabnik

Improve boxed docs

Fixes #29343.

r? @steveklabnik

8 years agoRollup merge of #34737 - frewsxcv:libstd-process-child, r=GuillaumeGomez
Guillaume Gomez [Tue, 12 Jul 2016 10:08:23 +0000 (12:08 +0200)]
Rollup merge of #34737 - frewsxcv:libstd-process-child, r=GuillaumeGomez

Various `std::process` doc improvements.

None

8 years agoRollup merge of #34736 - GuillaumeGomez:cells_doc, r=steveklabnik
Guillaume Gomez [Tue, 12 Jul 2016 10:08:22 +0000 (12:08 +0200)]
Rollup merge of #34736 - GuillaumeGomez:cells_doc, r=steveklabnik

Add missing examples for std::cell types

Fixes #29344.

r? @steveklabnik

8 years agoUse `ptr::{null, null_mut}` instead of `0 as *{const, mut}`
Tobias Bucher [Fri, 24 Jun 2016 18:54:52 +0000 (20:54 +0200)]
Use `ptr::{null, null_mut}` instead of `0 as *{const, mut}`

8 years agoAuto merge of #34755 - jonas-schievink:minor-differences, r=eddyb
bors [Tue, 12 Jul 2016 08:06:34 +0000 (01:06 -0700)]
Auto merge of #34755 - jonas-schievink:minor-differences, r=eddyb

Move variant_size_differences out of trans

Also enhances the error message a bit, fixes #30505 on the way, and adds
a test (which was missing).

Closes #34018

8 years agotyencode: Make sure that projection bounds are handled in stable order.
Michael Woerister [Wed, 13 Jul 2016 16:30:28 +0000 (12:30 -0400)]
tyencode: Make sure that projection bounds are handled in stable order.

8 years agodoc: Mention that writeln! and println! always use LF
Mike Hommey [Tue, 12 Jul 2016 05:37:04 +0000 (14:37 +0900)]
doc: Mention that writeln! and println! always use LF

Fixes #34697

8 years agoAuto merge of #34637 - GuillaumeGomez:syntax_codes, r=jonathandturner
bors [Tue, 12 Jul 2016 05:09:44 +0000 (22:09 -0700)]
Auto merge of #34637 - GuillaumeGomez:syntax_codes, r=jonathandturner

Syntax codes

r? @jonathandturner

cc @steveklabnik

This is a first big shot. I'll do the second one later in the week once this one is merged.

8 years agostd: clear errno before readdir, then check it (solaris)
Josh Stone [Tue, 12 Jul 2016 04:43:53 +0000 (21:43 -0700)]
std: clear errno before readdir, then check it (solaris)

A `NULL` from `readdir` could be the end of stream or an error.  The
only way to know is to check `errno`, so it must be set to a known value
first, like a 0 that POSIX will never use.

This patch adds `set_errno`, uses it to clear the value before calling
`readdir`, then checks it again after to see the reason for a `NULL`.

8 years agolibc: fast-forward for solaris `RTLD_DEFAULT`
Josh Stone [Tue, 12 Jul 2016 04:43:31 +0000 (21:43 -0700)]
libc: fast-forward for solaris `RTLD_DEFAULT`

8 years agostd: Fix IPV6 imports for solaris
Josh Stone [Tue, 12 Jul 2016 04:35:54 +0000 (21:35 -0700)]
std: Fix IPV6 imports for solaris

Like BSDs, Solaris maps `IPV6_ADD_MEMBERSHIP` and `IPV6_DROP_MEMBERSHIP`
from `IPV6_JOIN_GROUP` and `IPV6_LEAVE_GROUP` respectively.

8 years agostd: Fix `Thread::set_name()` for newlib and solaris
Josh Stone [Tue, 12 Jul 2016 04:35:47 +0000 (21:35 -0700)]
std: Fix `Thread::set_name()` for newlib and solaris

The `use ffi::CStr` in `unix/thread.rs` was previously guarded, but now
all platforms need it for `Thread::set_name()`.  Newlib and Solaris do
nothing here, as they have no way to set a thread name, but they still
define the same method signature.

8 years agoFix fallout.
Jeffrey Seyfried [Sat, 2 Jul 2016 15:49:50 +0000 (15:49 +0000)]
Fix fallout.

8 years agoParse macro-expanded statements like ordinary statements.
Jeffrey Seyfried [Sat, 2 Jul 2016 09:32:23 +0000 (09:32 +0000)]
Parse macro-expanded statements like ordinary statements.

8 years agoClean up statement parsing without changing the semantics of `parse_stmt`.
Jeffrey Seyfried [Sat, 2 Jul 2016 09:01:21 +0000 (09:01 +0000)]
Clean up statement parsing without changing the semantics of `parse_stmt`.

8 years agoMark Ipv4Addr is_unspecified as stable and provide reference.
Ben Stern [Sat, 9 Jul 2016 17:45:38 +0000 (13:45 -0400)]
Mark Ipv4Addr is_unspecified as stable and provide reference.

8 years agoAuto merge of #33971 - bltavares:28322/default-channel-to-stable-on-tarball, r=brson
bors [Tue, 12 Jul 2016 00:27:31 +0000 (17:27 -0700)]
Auto merge of #33971 - bltavares:28322/default-channel-to-stable-on-tarball, r=brson

Use --release-channel=stable by default on releases

> Release tarballs should be compilable with just basic ./configure ;
> make ; sudo make install without having to pass special flags to
> configure. This is the case of the --release-channel option, that must
> be changed in the releases.

This commit detects the presence of .git, as it happens on other parts
of `configure` to assume it is a tarball. Then it changes the default
value stored, before parsing the arguments, while still allowing it to
be overriden before any action verifying the flag is done.

Closes #28322

8 years agoImprove arc doc, fixing #32905
Zhen Zhang [Sat, 9 Jul 2016 03:47:36 +0000 (11:47 +0800)]
Improve arc doc, fixing #32905

8 years agoFactor the `RefCell` out of the `Interner`.
Jeffrey Seyfried [Mon, 11 Jul 2016 20:00:07 +0000 (20:00 +0000)]
Factor the `RefCell` out of the `Interner`.

8 years agoRefactor `get_ident_interner` -> `with_ident_interner`.
Jeffrey Seyfried [Mon, 11 Jul 2016 19:33:40 +0000 (19:33 +0000)]
Refactor `get_ident_interner` -> `with_ident_interner`.

8 years agoAvoid passing around the thread-local interner in `librustc_metadata`.
Jeffrey Seyfried [Mon, 11 Jul 2016 09:42:31 +0000 (09:42 +0000)]
Avoid passing around the thread-local interner in `librustc_metadata`.

8 years agoRemove `Interner<T>` and rename `StrInterner` to `Interner`.
Jeffrey Seyfried [Mon, 11 Jul 2016 08:00:48 +0000 (08:00 +0000)]
Remove `Interner<T>` and rename `StrInterner` to `Interner`.

8 years agoEncapsulate `RcStr` in `syntax::util::interner`.
Jeffrey Seyfried [Mon, 11 Jul 2016 07:55:54 +0000 (07:55 +0000)]
Encapsulate `RcStr` in `syntax::util::interner`.

8 years agoRemove unused field `interner` from the parser.
Jeffrey Seyfried [Mon, 11 Jul 2016 09:02:16 +0000 (09:02 +0000)]
Remove unused field `interner` from the parser.

8 years agoFixed some typos
David [Mon, 11 Jul 2016 21:43:56 +0000 (14:43 -0700)]
Fixed some typos

8 years agoMove E0533 to E0558 (because of external change)
Guillaume Gomez [Mon, 11 Jul 2016 21:27:27 +0000 (23:27 +0200)]
Move E0533 to E0558 (because of external change)

8 years agoFix typos
ggomez [Mon, 4 Jul 2016 12:20:45 +0000 (14:20 +0200)]
Fix typos

8 years agoUpdate make tidy
Guillaume Gomez [Sun, 3 Jul 2016 22:16:53 +0000 (00:16 +0200)]
Update make tidy

8 years agoAdd E0537 error explanation
Guillaume Gomez [Sun, 3 Jul 2016 14:58:43 +0000 (16:58 +0200)]
Add E0537 error explanation

8 years agoAdd E0536 error explanation
Guillaume Gomez [Sun, 3 Jul 2016 14:53:17 +0000 (16:53 +0200)]
Add E0536 error explanation

8 years agoAdd E0535 error explanation
Guillaume Gomez [Sun, 3 Jul 2016 14:47:30 +0000 (16:47 +0200)]
Add E0535 error explanation

8 years agoAdd E0534 error explanation
Guillaume Gomez [Sun, 3 Jul 2016 14:34:47 +0000 (16:34 +0200)]
Add E0534 error explanation

8 years agoAdd E0533 error explanation
Guillaume Gomez [Sun, 3 Jul 2016 14:24:19 +0000 (16:24 +0200)]
Add E0533 error explanation

8 years agoAuto merge of #34686 - alexcrichton:new-stage, r=luqmana
bors [Mon, 11 Jul 2016 18:29:52 +0000 (11:29 -0700)]
Auto merge of #34686 - alexcrichton:new-stage, r=luqmana

rustc: Update stage0 to beta-2016-07-06

Hot off the presses, let's update our stage0 compiler!

8 years ago`std::process` doc improvements.
Corey Farwell [Sat, 9 Jul 2016 15:47:12 +0000 (11:47 -0400)]
`std::process` doc improvements.

* Link to `process::Command` from `process::Child`.
* Move out inline Markdown link in doc comment.
* Link to `process::Child::wait` from `process::Child`.
* Link to `process::Child` from `process::ChildStdin`.
* Link to `process::Child` from `process::ChildStdout`.
* Link to `process::Child` from `process::ChildStderr`.

8 years agoImprove boxed docs
Guillaume Gomez [Sat, 9 Jul 2016 17:57:08 +0000 (19:57 +0200)]
Improve boxed docs

8 years agoAdd missing examples for std::cell types
Guillaume Gomez [Sat, 9 Jul 2016 13:01:15 +0000 (15:01 +0200)]
Add missing examples for std::cell types

8 years agoRegister reads on the corrent HIR item
Jonas Schievink [Mon, 11 Jul 2016 15:11:51 +0000 (17:11 +0200)]
Register reads on the corrent HIR item

8 years agoSet unwind_safe_lock_refs stability to 1.12.0.
Aaron Gallagher [Mon, 11 Jul 2016 14:34:20 +0000 (07:34 -0700)]
Set unwind_safe_lock_refs stability to 1.12.0.

This is the first (and presumably only) use of this feature.

8 years agoAuto merge of #34725 - GuillaumeGomez:doc_slice, r=steveklabnik
bors [Mon, 11 Jul 2016 14:13:50 +0000 (07:13 -0700)]
Auto merge of #34725 - GuillaumeGomez:doc_slice, r=steveklabnik

Improve slice docs

Fixes  #29337.

r? @steveklabnik