Commit Graph

54315 Commits

Author SHA1 Message Date
Oliver Middleton
ec7da3dbd7 rustdoc: Fix inlined renamed reexports in import lists 2016-06-26 03:08:10 +01:00
bors
b8214dc6c6 Auto merge of #34464 - Manishearth:rollup, r=Manishearth
Rollup of 8 pull requests

- Successful merges: #34379, #34406, #34411, #34414, #34435, #34438, #34445, #34449
- Failed merges:
2016-06-25 06:45:07 -07:00
Manish Goregaokar
77b6a647bc Rollup merge of #34449 - regexident:ast_docs, r=steveklabnik
Improve `syntax::ast::*` type docs (examples, etc)

An attempt at making the public types in `syntax::ast` a bit more approachable.

[#rust-doc-days](https://facility9.com/2016/06/announcing-rust-doc-days/)
2016-06-25 18:16:40 +05:30
Manish Goregaokar
c6856d964f Rollup merge of #34445 - pyjarrett:lang_item_table_macro_rename, r=jseyfried
Renames "lets_do_this" macro more appropriately.

The macro gets used to create a mapping of identifiers to names and their
associated functions. Since it creates a table of language items, let's rename
it in a similar manner to how vec! creates a vec.
2016-06-25 18:16:40 +05:30
Manish Goregaokar
80b352c892 Rollup merge of #34438 - frewsxcv:joinhandle, r=GuillaumeGomez
Indicate how the `JoinHandle` struct is created.

None
2016-06-25 18:16:40 +05:30
Manish Goregaokar
bb12a53059 Rollup merge of #34435 - sanxiyn:typo, r=apasel422
Fix typo in future incompatible lint

Found in release triage.
2016-06-25 18:16:40 +05:30
Manish Goregaokar
1ac83cf031 Rollup merge of #34414 - alfiedotwtf:patch-1, r=steveklabnik
Switched tense to clarify what is happening in the example
2016-06-25 18:16:39 +05:30
Manish Goregaokar
1f7a71b2b7 Rollup merge of #34411 - Vogtinator:patch-1, r=sanxiyn
Fix typo in bootstrap README

"boostrap" instead of "bootstrap"
2016-06-25 18:16:39 +05:30
Manish Goregaokar
865a32860f Rollup merge of #34379 - liigo:patch-11, r=GuillaumeGomez
Improve diagnostics E0425: `use` (public) name

E0425: unresolved name
2016-06-25 18:16:39 +05:30
bors
35004b42bc Auto merge of #34452 - frewsxcv:unwrap-or, r=alexcrichton
Use `Option::expect` instead of `unwrap_or_else` with `panic!`.

None
2016-06-24 23:14:12 -07:00
bors
c128e9bb2e Auto merge of #34441 - tbu-:pr_dont_ignore_errors, r=alexcrichton
Don't ignore errors of syscalls in std::sys::unix::fd

If any of these syscalls fail, it indicates a programmer error that
should not be silently ignored.
2016-06-24 18:28:23 -07:00
bors
d011290e39 Auto merge of #34401 - GuillaumeGomez:err-codes, r=brson
Add error code flags

r? @brson

cc @steveklabnik
cc @jonathandturner
2016-06-24 15:42:13 -07:00
bors
dc9112f65b Auto merge of #34439 - ollie27:rustdoc_panic_fix, r=alexcrichton
rustdoc: Fix panic caused by doc(hidden) trait methods

Fixes: #34423

r? @alexcrichton
2016-06-24 12:57:29 -07:00
Corey Farwell
5e9b75e2dd Add examples in docs for JoinHandle. 2016-06-24 12:25:26 -04:00
Vincent Esche
32ef89061e Improve syntax::ast::* type docs (examples, etc) 2016-06-24 18:24:45 +02:00
bors
4b89debc7b Auto merge of #34425 - tbu-:pr_len_instead_of_size_hint, r=alexcrichton
Use `len` instead of `size_hint` where appropiate

This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.
2016-06-24 09:03:54 -07:00
Corey Farwell
0a6ce30161 Use Option::expect instead of unwrap_or_else with panic!. 2016-06-24 08:19:22 -04:00
Corey Farwell
6e848be5f8 Indicate how the JoinHandle struct is created. 2016-06-24 08:13:30 -04:00
bors
7189ae3611 Auto merge of #34399 - alexcrichton:issue-audit, r=brson
std: Fix up stabilization discrepancies

* Remove the deprecated `CharRange` type which was forgotten to be removed
  awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
  stabilized as part of #32804
2016-06-24 03:39:47 -07:00
Tobias Bucher
9347ffcf5c Bubble up the errors in set_nonblocking and set_cloexec 2016-06-24 11:31:58 +02:00
bors
8c63d12dc3 Auto merge of #34055 - brson:cmake, r=alexcrichton
Convert makefiles to build LLVM/compiler-rt with CMake

This is certainly buggy, but I have successfully built on x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu. I haven't built successfully on mac yet, and I've seen mysterious test failures on Linux, but I'm interested in throwing this at the bots to see what they think.
2016-06-23 23:33:32 -07:00
Paul Jarrett
0187aec8e0 Renames "lets_do_this" macro more appropriately.
The macro gets used to create a mapping of identifiers to names and their
associated functions. Since it creates a table of language items, let's rename
it in a similar manner to how vec! creates a vec.
2016-06-23 23:02:30 -04:00
bors
4d9faf3632 Auto merge of #34077 - durka:patch-23, r=alexcrichton
upgrade thread_local! invocation syntax

Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items. In particular, `#![forbid(missing_docs, unused)]` is now tenable on a crate/module containing thread locals.

For an example see [here](https://is.gd/aVFZZF). This change is fully backwards compatible as far as I can tell.

cc @frankmcsherry
2016-06-23 19:22:51 -07:00
Oliver Middleton
1efcde5de0 rustdoc: Fix panic caused by doc(hidden) trait methods 2016-06-23 23:25:03 +01:00
Alex Crichton
c3e8c178ab std: Fix up stabilization discrepancies
* Remove the deprecated `CharRange` type which was forgotten to be removed
  awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
  stabilized as part of #32804
2016-06-23 14:08:11 -07:00
Seo Sanghyeon
5215acc27b Fix typo in future incompatible lint 2016-06-24 03:33:40 +09:00
bors
ad7fe6521b Auto merge of #34372 - ollie27:rustdoc_sidebar, r=steveklabnik
rustdoc: Add more types to the sidebar

They're displayed in the same order as they are on modules pages.

You can test [here](https://ollie27.github.io/rust_doc_test/std/).
For example:
[before](https://doc.rust-lang.org/nightly/std/char/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/char/constant.MAX.html)
[before](https://doc.rust-lang.org/nightly/std/os/raw/type.c_char.html) [after](https://ollie27.github.io/rust_doc_test/std/os/raw/type.c_char.html)
2016-06-23 10:56:38 -07:00
Tobias Bucher
a32244b3d9 Don't ignore errors of syscalls in std::sys::unix::fd
If any of these syscalls fail, it indicates a programmer error that
should not be silently ignored.
2016-06-23 13:57:55 +02:00
bors
bca68689bc Auto merge of #34364 - cynicaldevil:develop, r=GuillaumeGomez
Modified E0220 to show error messages for more general cases

This PR extends `E0220`'s description to explain more cases.
Refer to [#34342](https://github.com/rust-lang/rust/pull/34342) for more.
r? @GuillaumeGomez
2016-06-23 04:43:40 -07:00
Tobias Bucher
8ff5c4394c Use len instead of size_hint where appropiate
This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.
2016-06-23 12:26:15 +02:00
bors
3908913db5 Auto merge of #34253 - jseyfried:improve_multi_modifiers, r=nrc
Allow `MultiItemModifier`s to expand into zero or many items

Fixes #34223.
r? @nrc
2016-06-23 01:04:47 -07:00
Liigo Zhuang
2d7bac7d86 Improve diagnostics E0425: use (public) items
E0425: unresolved name
2016-06-23 12:51:10 +08:00
bors
4960f2f907 Auto merge of #34374 - jseyfried:fix_hygiene_bug, r=nrc
Fix macro hygiene regression

The regression was caused by #32923, which is currently in beta.

The following is an example of regressed code:
```rust
fn main() {
    let x = 0;
    macro_rules! foo { () => {
        println!("{}", x); // prints `0` on stable and after this PR, prints `1` on beta and nightly
    } }

    let x = 1;
    foo!();
}
```

For code to regress, the following is necessary (but not sufficient):
 - There must be a local variable before a macro in a block, and the macro must use the variable.
 - There must be a second local variable with the same name after the macro.
 - The macro must be invoked in a statement position after the second local variable.

For example, if the `let x = 0;` from the breaking example were commented out, it would (correctly) not compile on beta/nightly. If the semicolon were removed from `foo!();`, it would (correctly) print `0` on beta and nightly.

r? @nrc
2016-06-22 21:11:27 -07:00
Alex Burka
fc28ee256a upgrade thread_local! invocation syntax
Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items.
2016-06-22 20:29:37 -04:00
Jeffrey Seyfried
eef8485f5f More hygiene tests 2016-06-22 22:42:26 +00:00
bors
6dcc2c1dee Auto merge of #33748 - emilio:mpsc-recv-timeout, r=alexcrichton
std: sync: Implement recv_timeout()

This is an attempt to implement https://github.com/rust-lang/rfcs/issues/962.

I'm not sure about if a change like this would require an rfc or something like
that, and this surely needs a lot more testing, but I wanted to take some eyes
on it before following.

cc @metajack @asajeffrey https://github.com/servo/servo/pull/11279 https://github.com/servo/servo/pull/11283

r? @aturon
2016-06-22 13:35:12 -07:00
Alfie John
eb17527039 Switched tense to clarify what is happening in the example 2016-06-23 06:20:29 +10:00
Emilio Cobos Álvarez
b94b15852c
std: sync: Implement recv_timeout() 2016-06-22 20:48:55 +02:00
Fabian Vogt
03f9dd21d6 Fix typo in bootstrap README
"boostrap" instead of "bootstrap"
2016-06-22 15:09:11 +02:00
bors
e41cdabc3e Auto merge of #34408 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #34190, #34363, #34367, #34383, #34387, #34394, #34404
- Failed merges:
2016-06-22 04:21:59 -07:00
Manish Goregaokar
c749a3e4b5 Rollup merge of #34404 - ollie27:concat_idents, r=alexcrichton
Mark concat_idents! unstable

This is mostly just a documentation fix as I don't think stability
attributes have any effect on macros.

[before](https://doc.rust-lang.org/nightly/std/macro.concat_idents!.html) [after](https://ollie27.github.io/rust_doc_test/std/macro.concat_idents!.html)
2016-06-22 09:51:09 +01:00
Manish Goregaokar
c295a1c7c2 Rollup merge of #34394 - oli-obk:const_cast_false_positive, r=eddyb
don't warn on casting byte strs to slices

r? @durka
2016-06-22 09:51:08 +01:00
Manish Goregaokar
0c94e90233 Rollup merge of #34387 - ollie27:rustdoc_src_links, r=alexcrichton
rustdoc: Fix a couple of issues with src links to external crates

- src links/redirects to extern fn from another crate had an extra '/'.
- src links to `pub use` of a crate module had an extra '/'.
- src links to renamed reexports from another crate used the new name
  for the link but should use the original name.

Fixes: #34274
2016-06-22 09:51:08 +01:00
Manish Goregaokar
094032f5fc Rollup merge of #34383 - alexcrichton:less-compiler-checks, r=brson
configure: Remove clang version checks

We no C++ and an incredibly small amount of C code as part of the build, so
there's not really much need for us to strictly check the version of compilers
as we're not really stressing anything. LLVM is a pretty huge chunk of C++ but
it should be the responsibility of LLVM to ensure that it can build with a
particular clang/gcc version, not ours (as this logic changes over time).

These version checks seem to basically just by us a regular stream of PRs every
six weeks or so when a new version is releases, so they're not really buying us
much. As a result, remove them and we can add then back piecemeal perhaps as a
blacklist if we really need to.
2016-06-22 09:51:08 +01:00
Manish Goregaokar
f753689115 Rollup merge of #34367 - Stebalien:issue-23281, r=sfackler
Add regression test for #23281

Closes #23281
2016-06-22 09:51:07 +01:00
Manish Goregaokar
2aaf6a0e5c Rollup merge of #34363 - GuillaumeGomez:sleep, r=alexcrichton
Fix overflow error in thread::sleep

Fixes #34330

I added a test to have a more clear error inside the function. Since `time_t` is `i64` and we expect `u64`, maybe we should changed the awaited type?
2016-06-22 09:51:07 +01:00
Manish Goregaokar
e4ff7f0107 Rollup merge of #34190 - ollie27:wrapping_fmt, r=alexcrichton
Implement Binary, Octal, LowerHex and UpperHex for Wrapping<T>

Fixes: #33659
2016-06-22 09:51:06 +01:00
bors
3ee3267af3 Auto merge of #33976 - komamitsu:assert_eq_with_msg, r=alexcrichton
Add custom message parameter to `assert_eq!`

`assert!` macro accepts a custom message parameter and it's sometimes useful. But `assert_eq!` doesn't have it and users need to use `assert!` instead of `assert_eq!` when they want to output a custom message even if the assertion just compares two values. This pull request will resolve those cases.
2016-06-22 01:05:56 -07:00
bors
66b82beb60 Auto merge of #33830 - moosingin3space:feature/mutable-high-priority-binaryheap, r=alexcrichton
Mutable access to the top element of a BinaryHeap

An implementation of the library change discussed here: https://github.com/rust-lang/rfcs/issues/1626
2016-06-21 20:52:23 -07:00
Brian Anderson
59db95b499 Convert makefiles to build LLVM/compiler-rt with CMake 2016-06-21 19:54:28 -07:00