Commit Graph

49735 Commits

Author SHA1 Message Date
ubsan
2413b52b88 More nits :P 2016-07-02 00:07:36 -07:00
ubsan
6928bbba3a Fix some other small nits 2016-07-02 00:00:04 -07:00
ubsan
233b45f0d7 Fix up some things which scott mentioned 2016-07-01 23:57:10 -07:00
ubsan
3d03f7541e Add more docs - mostly warnings - to std::mem::transmute 2016-07-01 23:33:44 -07:00
bors
32a6373322 Auto merge of #34067 - tbu-:pr_lookup_host_ignore_other_addresses, r=alexcrichton
Ignore unknown address types when looking up hosts

Previously, any function using a `ToSocketAddrs` input would fail if
passed a hostname that resolves to an address type different from the
ones recognized by Rust.

This also changes the `LookupHost` iterator to only include the known
address types, as a result, it doesn't have to return `Result`s any
more, which are likely misinterpreted as failed name lookups.
2016-07-01 18:43:28 -07:00
bors
01411937ff Auto merge of #33940 - seanmonstar:siphash-1-3, r=alexcrichton
hashmap: use siphash-1-3 as default hasher

Also exposes `SipHash13` and `SipHash24` in `core:#️⃣:sip`, for those that want to differentiate.

For motivation, see this quote from the original issue:

> we proposed SipHash-2-4 as a (strong) PRF/MAC, and so far no attack whatsoever has been found,
although many competent people tried to break it. However, fewer rounds may be sufficient and I would
be very surprised if SipHash-1-3 introduced weaknesses for hash tables.

This keeps a type alias of `SipHasher` to `SipHash24`, and since the internal default hasher of HashMap is specified as "not specified", changing it should not be a breaking change.

Closes #29754
2016-07-01 15:53:07 -07:00
bors
16281888c0 Auto merge of #34563 - alexcrichton:robust-mk, r=brson
mk: Don't consider LLVM done until it's done

Currently if an LLVM build is interrupted *after* it creates the llvm-config
binary but before it's done it puts us in an inconsistent state where we think
LLVM is compiled but it's not actually. This tweaks our logic to only consider
LLVM done building once it's actually done building.

This should hopefully alleviate problems on the bots where if we interrupt at
the wrong time it doesn't corrupt the build directory.
2016-06-30 23:30:51 -07:00
bors
375fa6ef37 Auto merge of #34577 - alexcrichton:clean-more-yet-again, r=brson
rustbuild: Clean out tmp directory on `make clean`

Right now we generate error index information into this directory, but it's
never cleaned out. This means that if a build *bounces* because of something in
this directory it'll continue to cause all future builds to fail because the
relevant files are never removed.
2016-06-30 20:07:57 -07:00
Alex Crichton
1e48a72edc rustbuild: Clean out tmp directory on make clean
Right now we generate error index information into this directory, but it's
never cleaned out. This means that if a build *bounces* because of something in
this directory it'll continue to cause all future builds to fail because the
relevant files are never removed.
2016-06-30 15:20:53 -07:00
Alex Crichton
9e2bd921ea mk: Don't consider LLVM done until it's done
Currently if an LLVM build is interrupted *after* it creates the llvm-config
binary but before it's done it puts us in an inconsistent state where we think
LLVM is compiled but it's not actually. This tweaks our logic to only consider
LLVM done building once it's actually done building.

This should hopefully alleviate problems on the bots where if we interrupt at
the wrong time it doesn't corrupt the build directory.
2016-06-30 09:08:43 -07:00
bors
85c31af981 Auto merge of #34541 - jseyfried:rollup, r=jseyfried
Rollup of 5 pull requests

 - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
2016-06-30 01:49:45 -07:00
Jeffrey Seyfried
a8751e077f Rollup merge of #34547 - sanxiyn:pretty-lifetime, r=pnkfelix
Fix pretty-printing of lifetime bound

Fix #34527.
2016-06-30 07:39:32 +00:00
Sean McArthur
db1b1919ba std: use siphash-1-3 for HashMap 2016-06-29 16:08:32 -07:00
Manish Goregaokar
8e2598c3d2 Rollup merge of #34542 - jseyfried:fix_recursive_modules, r=nrc
Fix non-termination on recursive module re-exports in extern crates

Fixes #33776.
r? @nrc
2016-06-29 21:21:24 +05:30
Manish Goregaokar
cc15c211c5 Rollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichton
rustdoc: Fix empty Implementations section on some module pages

These are caused by `DefaultImpl`s.

For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).
2016-06-29 21:21:23 +05:30
Manish Goregaokar
b393c7e0d2 Rollup merge of #34513 - ollie27:rustdoc_stripped, r=alexcrichton
rustdoc: Fix a few stripping issues

We need to recurse into stripped modules to strip things like impl methods
but when doing so we must not add any items to the `retained` set.

For example this removes [`core::num::ParseFloatError::__description`](https://doc.rust-lang.org/nightly/core/num/struct.ParseFloatError.html#method.__description) and [`impl Clone for ThreadRng`](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html).
2016-06-29 21:21:23 +05:30
Manish Goregaokar
5bd3ef81c6 Rollup merge of #34499 - michaelwoerister:lldb-blacklist, r=alexcrichton
Disable debuginfo tests for a given blacklist of LLDB versions

Anyone having trouble with most LLDB tests failing on OSX, please report your LLDB version here so I can add it to the blacklist.

Blacklisted versions so far:
* lldb-350.*

cc @rust-lang/tools
cc @tedhorst @indutny @jonathandturner (people from the original bug report)

Fixes #32520.
2016-06-29 21:21:23 +05:30
Manish Goregaokar
2e893ea6de Rollup merge of #34497 - oli-obk:double_negation, r=eddyb
Revert "skip double negation in const eval"

This reverts commit 735c018974.

fixes #34395

The original commit was based on a mis-understanding of the overflowing literal lint.

This needs to be ported to beta.

r? @eddyb
2016-06-29 21:21:22 +05:30
Manish Goregaokar
8886818a9a Rollup merge of #34495 - jseyfried:only_ident_macro_invocations, r=eddyb
Forbid type parameters and global paths in macro invocations

Fixes #28558.
This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => { () } }
fn main() {
    m::<T>!(); // Type parameters are no longer allowed in macro invocations
    ::m!(); // Global paths are no longer allowed in macro invocations
}
```
Any breakage can be fixed by removing the type parameters or the leading `::` (respectively).

r? @eddyb
2016-06-29 21:21:22 +05:30
Manish Goregaokar
2a0c2c3b3a Rollup merge of #34467 - GuillaumeGomez:err-codes, r=brson
Add new error codes and improve some explanations

r? @brson

cc @steveklabnik
cc @jonathandturner
2016-06-29 21:21:22 +05:30
Manish Goregaokar
d11ac236b1 Rollup merge of #34460 - dsprenkels:issue-33455, r=alexcrichton
Add regression test for #33455

Closes #33455.
2016-06-29 21:21:21 +05:30
Manish Goregaokar
fd45e6e912 Rollup merge of #34459 - jseyfried:expansion_cleanup, r=nrc
Miscellaneous macro expansion cleanup and groundwork

r? @nrc
2016-06-29 21:21:21 +05:30
Manish Goregaokar
470c5191f5 Rollup merge of #34446 - jseyfried:refactor_decorators, r=nrc
Treat `MultiDecorator`s as a special case of `MultiModifier`s

This deals with #32950 by using @durka's [option 1](https://github.com/rust-lang/rust/pull/33769#issuecomment-221774136).
r? @nrc
2016-06-29 21:21:21 +05:30
Manish Goregaokar
f74d0fb568 Rollup merge of #34355 - jseyfried:paren_expression_ids_nonunique, r=nrc
Give `ast::ExprKind::Paren` no-op expressions the same ids as their children.

Having `ast::ExprKind::Paren` expressions share ids with their children
 - reduces the number of unused `NodeId`s in the hir map and
 - guarantees that `tcx.map.expect_expr(ast_expr.id)` is the hir corresponding to `ast_expr`.

This fixes the bug from #34327, which was introduced in #33296 when I assumed the above guarantee.

r? @nrc
2016-06-29 21:21:21 +05:30
Seo Sanghyeon
3c29fc5f6c Fix pretty-printing of lifetime bound 2016-06-29 23:40:29 +09:00
Jeffrey Seyfried
8557a2e18c Give ast::ExprKind::Paren no-op expressions the same node ids as their children. 2016-06-29 11:06:28 +00:00
Tobias Bucher
6aa0182520 Update documentation to reflect ignoring of unknown addresses 2016-06-29 11:44:33 +02:00
Tobias Bucher
a03a82e5e0 Convert a simple tail call to a loop 2016-06-29 11:39:56 +02:00
Tobias Bucher
d6237cefcb Ignore unknown address types when looking up hosts
Previously, any function using a `ToSocketAddrs` input would fail if
passed a hostname that resolves to an address type different from the
ones recognized by Rust.

This also changes the `LookupHost` iterator to only include the known
address types, as a result, it doesn't have to return `Result`s any
more, which are likely misinterpreted as failed name lookups.
2016-06-29 11:39:56 +02:00
Jeffrey Seyfried
a9d25f8b59 Refactor away parser.commit_stmt_expecting() 2016-06-29 06:40:05 +00:00
Jeffrey Seyfried
a595ffaac5 Treat MultiDecorators as a special case of MultiModifiers 2016-06-29 01:25:46 +00:00
Jeffrey Seyfried
66ef652559 Disallow derive on items with type macros 2016-06-29 01:25:36 +00:00
Jeffrey Seyfried
a77a179637 Rollup merge of #34305 - Aaronepower:master, r=alexcrichton
Added Default trait for Cow.

Adds a default implementation for Cow. Which is the Owned's default.
2016-06-29 00:39:54 +00:00
Jeffrey Seyfried
2fda7d4a51 Rollup merge of #34105 - ollie27:rustdoc_derived, r=alexcrichton
rustdoc: Remove Derived Implementations title

As far as I know whether a trait was derived or not does not change the
public API so there is no need to include this information in the docs.

This title currently just adds an extra divide in the list of trait
implementations which I don't think needs to be there.
2016-06-29 00:33:30 +00:00
Jeffrey Seyfried
9ffe1c9fba Add regression test 2016-06-29 00:27:18 +00:00
Jeffrey Seyfried
232783c914 Fix infinite loop on recursive module exports in an extern crate 2016-06-28 23:03:56 +00:00
Oliver Middleton
f05da01dbe rustdoc: Fix empty Implementations section on some module pages
These are caused by `DefaultImpl`s.
2016-06-28 22:53:50 +01:00
bors
366de839ae Auto merge of #34519 - alexcrichton:fix-nightlies, r=brson
Try to fix the nightlies

They look to be failing right after the CMake PR landed. I've diagnosed and confirmed the first issue fixed, the second is a bit of a shot in the dark to see if it fixes things.
2016-06-28 11:52:36 -07:00
Guillaume Gomez
dd56a6ad08 Rollup merge of #34524 - frewsxcv:std-io-sink, r=GuillaumeGomez
Add doc example for `std::io::sink`.

None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
dcc8fa5270 Rollup merge of #34518 - frewsxcv:io-repeat, r=GuillaumeGomez
Add doc example for `std::io::repeat`.

None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
f47fcc738b Rollup merge of #34517 - frewsxcv:empty, r=GuillaumeGomez
Minor rewrite of `std::io::empty` doc example.

None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
890e3a7a1a Rollup merge of #34479 - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomez
rustdoc: Fix inlined renamed reexports in import lists

Fixes #34473
2016-06-28 16:05:15 +02:00
Guillaume Gomez
f8453a1d17 Rollup merge of #34475 - frewsxcv:path-component, r=GuillaumeGomez
Expand `std::path::Component` documentation.

Indicate how it gets created and add an example.
2016-06-28 16:05:15 +02:00
Guillaume Gomez
b34f6e7245 Rollup merge of #34471 - GuillaumeGomez:fix_expl, r=steveklabnik
Fix E0269 error explanation

r? @steveklabnik
2016-06-28 16:05:15 +02:00
Guillaume Gomez
b765edf440 Rollup merge of #34462 - dns2utf8:leading_zeros, r=GuillaumeGomez
Add example with leading zeros

I was searching for this format very long. So I added an example to the prominent section.

I was thinking of putting the keyword leading in the corresponding section as well, what do you think?

r? @steveklabnik
2016-06-28 16:05:15 +02:00
Guillaume Gomez
86e4a034af Rollup merge of #34442 - tatsuya6502:doc-book-ownership, r=steveklabnik
[doc] Fix links in Ownership section of the book

- Add a missing link definition for `[i32]`.
- Like `[stack]` link is pointing to `...#the-stack`, append `#the-heap` to `[heap]` link.
2016-06-28 16:05:14 +02:00
Guillaume Gomez
adc70bdc90 Rollup merge of #34415 - ollie27:docs_float, r=steveklabnik
Use the correct types in float examples

r? @steveklabnik
2016-06-28 16:05:14 +02:00
Guillaume Gomez
5d6b41f3bc Rollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichton
Add example for `std:🧵:sleep`.

None
2016-06-28 16:05:14 +02:00
Guillaume Gomez
47ef866f43 Rollup merge of #34328 - wuranbo:patch-1, r=steveklabnik
Traits where syntax's extra usage example more clearly

r? @steveklabnik
2016-06-28 16:05:13 +02:00
Guillaume Gomez
be1c2b9c8c Rollup merge of #34287 - durka:patch-26, r=steveklabnik
update reference for #29734
2016-06-28 16:05:13 +02:00