Commit Graph

51216 Commits

Author SHA1 Message Date
bors
cbbd3d9b92 Auto merge of #31631 - jonas-schievink:agoraphobia, r=nrc
[breaking-batch] Move more uses of `panictry!` out of libsyntax
2016-03-09 05:25:48 -08:00
bors
4b868411af Auto merge of #30804 - shssoichiro:deny-warnings-msg, r=nrc
Show clearer error message when #![deny(warnings)] escalates a warning

Addresses #30730
2016-03-09 03:34:55 -08:00
bors
bb868f17fa Auto merge of #32071 - jseyfried:parse_pub, r=nikomatsakis
Make errors for unnecessary visibility qualifiers consistent

This PR refactors away `syntax::parse::parser::ParsePub` so that unnecessary visibility qualifiers on variant fields are reported not by the parser but by `privacy::SanePrivacyVisitor` (thanks to @petrochenkov's drive-by improvements in #31919).

r? @nikomatsakis
2016-03-09 01:45:33 -08:00
Steve Klabnik
78484696fc Remove inaccurate claim about inline assembly
It's not like GCC's.

Fixes #20213
2016-03-09 03:52:35 -05:00
Steve Klabnik
aaca3175ba Add other primitive types to the reference
Fixes #31628
2016-03-09 03:42:36 -05:00
Steve Klabnik
0f426aa916 Small grammar fix in Guessing Game
When it was Option.expect(), there was an .ok().expect(), but now that it uses Result.expect(), there's only one method, not two.

Fixes #31912
2016-03-09 03:37:19 -05:00
Steve Klabnik
df550de689 Clarify that try_unwrap needs exactly one
Fixes #31950
2016-03-09 03:33:51 -05:00
bors
e1704f76ef Auto merge of #32023 - matklad:diamonds-and-rust, r=nikomatsakis
tests: add test for empty <>

Rust allows to specify an empty list of type and lifetime parameters, but there are no tests for it:

```
user@UNIT-326 [12:53:45] [~/projects/rust] [diamonds-and-rust]
-> % grep "<>" -R src/test
src/test/compile-fail/generic-type-params-name-repr.rs:    // And don't print <> at all when there's just defaults.
src/test/debuginfo/issue22656.rs:// when trying to handle a Vec<> or anything else that contains zero-sized
```

So let's add them! Besides it's such a wonderful opportunity to put a reference to Judas Priest band into the branch name ;)
2016-03-08 23:34:34 -08:00
Dirk Gadsden
46dc35e477 Link to actual CSPRNG in hash::SipHasher documentation 2016-03-08 21:52:44 -08:00
Jeffrey Seyfried
1a6092e05c Forbid use Trait::* 2016-03-09 05:18:07 +00:00
bors
d289e1a145 Auto merge of #31981 - achanda:unspecified-ip, r=alexcrichton
Exclude 0.0.0.0 from the list of globally routable addresses
2016-03-08 21:13:29 -08:00
Alex Crichton
6afa32a250 std: Don't always create stdin for children
For example if `Command::output` or `Command::status` is used then stdin is just
immediately closed. Add an option for this so as an optimization we can avoid
creating pipes entirely.

This should help reduce the number of active file descriptors when spawning
processes on Unix and the number of active handles on Windows.
2016-03-08 17:45:44 -08:00
Alex Crichton
d46c99abe8 std: Funnel read_to_end through to one location
This pushes the implementation detail of proxying `read_to_end` through to
`read_to_end_uninitialized` all the way down to the `FileDesc` and `Handle`
implementations on Unix/Windows. This way intermediate layers will also be able
to take advantage of this optimized implementation.

This commit also adds the optimized implementation for `ChildStdout` and
`ChildStderr`.
2016-03-08 17:45:44 -08:00
mitaa
ae7fca1e1f Check for doc(inline) instead of .*(inline) 2016-03-09 02:05:39 +01:00
Ruud van Asseldonk
c306853eda Regenerate x86 platform intrinsics
The exact command used was:

    $ cd src/etc/platform-intrinsics/x86
    $ python2 ../generator.py --format compiler-defs -i info.json   \
      sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \
      avx.json avx2.json fma.json                                   \
      > ../../../librustc_platform_intrinsics/x86.rs
2016-03-09 01:18:46 +01:00
Ruud van Asseldonk
51b5300b3f Define AVX conversion intrinsics
This defines the following intrinsics:

 * `_mm256_cvtepi32_pd`
 * `_mm256_cvtepi32_ps`
 * `_mm256_cvtpd_epi32`
 * `_mm256_cvtpd_ps`
 * `_mm256_cvtps_epi32`
 * `_mm256_cvtps_pd`
 * `_mm256_cvttpd_epi32`
 * `_mm256_cvttps_epi32`

Intel reference: https://software.intel.com/en-us/node/514130.
2016-03-09 01:18:46 +01:00
Ruud van Asseldonk
37efeae886 Define AVX broadcast intrinsics
This defines `_mm256_broadcast_ps` and `_mm256_broadcast_pd`. The `_ss`
and `_sd` variants are not supported by LLVM. In Clang these intrinsics
are implemented as inline functions in C++.

Intel reference: https://software.intel.com/en-us/node/514144.

Note: the argument type should really be "0hPc" (a pointer to a vector
of half the width), but internally the LLVM intrinsic takes a pointer to
a signed integer, and for any other type LLVM will complain. This means
that a transmute is required to call these intrinsics.

The AVX2 broadcast intrinsics `_mm256_broadcastss_ps` and
`_mm256_broadcastsd_pd` are not available as LLVM intrinsics. In Clang
they are implemented using the shufflevector builtin.
2016-03-09 01:18:46 +01:00
Jeffrey Seyfried
e742da0c71 Add regression test 2016-03-09 00:14:20 +00:00
bors
567937d626 Auto merge of #32126 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests

- Successful merges: #31772, #32083, #32084, #32092, #32099, #32103, #32115
- Failed merges:
2016-03-08 16:13:19 -08:00
Jeffrey Seyfried
87708b7b1f Refactor away check_ribs 2016-03-08 23:28:34 +00:00
Jeffrey Seyfried
210109cf7b Include the crate root in the ribs 2016-03-08 23:28:34 +00:00
Jeffrey Seyfried
7f3491c39d Fix name resolution in lexical scopes 2016-03-08 23:28:33 +00:00
Nathan Kleyn
118b975c80 Add missing documentation examples for BinaryHeap.
As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BinaryHeap` collection
type.

This is part of issue #29348.
2016-03-08 23:27:24 +00:00
Nathan Kleyn
99eee832e0 Add missing documentation examples for BTreeSet.
As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BTreeSet` collection
type.

This is part of issue #29348.
2016-03-08 22:53:54 +00:00
Nathan Kleyn
a8df890437 Add missing documentation examples for BTreeMap.
As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BTreeMap` collection
type.

This is part of issue #29348.
2016-03-08 22:44:40 +00:00
Jeffrey Seyfried
e2171bff75 Add regression test 2016-03-08 21:58:48 +00:00
Jeffrey Seyfried
ad28c28f46 Stop treating a type alias like a module or enum (preventing use TypeAlias::*) 2016-03-08 21:50:20 +00:00
Alex Crichton
3e6fed3a7a rustbuild: Add the error-index-generator
This adds a step and a rule for building the error index as part of rustbuild.
2016-03-08 13:44:14 -08:00
Alex Crichton
e9cb96a56a rustdoc: Don't inline all impls all at once
Right now whenever rustdoc inlines a struct or enum from another crate it ends
up inlining *all* `impl` items found in the other crate at the same time. The
rationale for this was to discover all trait impls which are otherwise not
probed for. This unfortunately picks up a lot of impls of public traits for
private types, causing lots of broken links.

This commit instead hoards all of those inlined impls into a temporary storage
location which is then selectively drawn from whenever we inline a new type.
This should ensure that we still inline all relevant impls while avoiding all
private ones.
2016-03-08 13:44:14 -08:00
Alex Crichton
8aa268e731 std: Fix rustdoc links with std::fmt::Alignment
This is actually a reexported implementation detail in the `rt::v1` module but
rustdoc doesn't like reexporting items from `doc(hidden)` modules. Do what we'd
end up doing anyway from an API perspective and make a public-facing `enum` that
can be retranslated under the hood if necessary.
2016-03-08 13:44:14 -08:00
Alex Crichton
73db76015e doc: Fix a bunch of broken links
A few categories:

* Links into compiler docs were just all removed as we're not generating
  compiler docs.
* Move up one more level to forcibly go to std docs to fix inlined documentation
  across the facade crates.
2016-03-08 13:44:14 -08:00
Alex Crichton
16fefc5ead rustbuild: Fix stage1 rustdoc
Just always build stage1 rustdoc, it's really not that much more to build as
it's essentially just one library.
2016-03-08 13:44:14 -08:00
Alex Crichton
defd1b3392 rustbuild: Add a link checker for documentation
Add a script to get run which verifies that `href` links in documents are
correct. We're always getting a steady stream of "fix a broken link" PRs and
issue reports, and we should probably just nip them all in the bud.
2016-03-08 13:44:14 -08:00
arcnmx
dbe23899cc cover more linux targets in libstd cargobuild 2016-03-08 16:15:58 -05:00
Alex Crichton
f7b7535fd7 rustbuild: Fixup calling rustdoc in various stages
The stage0 rustdoc comes from the snapshot, and we need a shim like with `rustc`
to pass `--cfg` for now.
2016-03-08 11:52:11 -08:00
Alex Crichton
0788cd23ea rustbuild: Use an enum to indicate destination
Instead of using a `is_std: bool`, instead use a more well-typed and
self-documenting enum to indicate the mode in which Cargo is being invoked.
2016-03-08 11:52:10 -08:00
Alex Crichton
ee6df13f0c rustbuild: Move rustbook to a src/tools directory
We've actually got quite a few tools that are compiled as part of our build,
let's start housing them all in a `tools` directory.
2016-03-08 11:52:09 -08:00
Alex Crichton
4d3d29dff3 rustbuild: Refactor adding steps manually
Use a macro so it automatically picks up new steps.
2016-03-08 11:51:49 -08:00
Alex Crichton
6a541937dc rustbuild: Add crate documentation generation
Run `cargo doc` to generate all documentation for the standard library, and also
add a target which generates documentation for the compiler as well (but don't
enable it by default).
2016-03-08 11:51:47 -08:00
Steve Klabnik
33fe4d10fc Rollup merge of #32115 - tclfs:patch-1, r=apasel422
Update a spelling inconsistency

L26: "zero cost" -> "zero-cost"
2016-03-08 21:44:12 +03:00
Steve Klabnik
bf9610ddbb Rollup merge of #32103 - timmontague:patch-1, r=alexcrichton
Fixed link in ownership documentation

Changed "[vector]" to a link to the vector documentation.
2016-03-08 21:44:11 +03:00
Steve Klabnik
13ba07b854 Rollup merge of #32099 - bluss:doc-string-slicing, r=alexcrichton
Clarify documentation for string slicing (Index impls)

Clarify documentation for string slicing (Index impls)

- Mention the sugared syntax for the implementations, since it's not
  apparent from the docs that `Index<Range<usize>>` corresponds to
  `&self[a..b]`.
- Be specific in that start <= end and end <= len

This is just one fix in response to #32057
2016-03-08 21:44:11 +03:00
Steve Klabnik
e35e5c434b Rollup merge of #32092 - bluss:operator-overload, r=steveklabnik
Update syntax index with OpAssign traits

book: Update syntax index with OpAssign traits

The traits are stable from Rust 1.8.
2016-03-08 21:44:11 +03:00
Steve Klabnik
477c4c37f0 Rollup merge of #32084 - gokhanettin:typo-in-comment, r=alexcrichton
Fix typos - mismatching parentheses in comments

Fixes mismatching parentheses in the comments of precision example.

r? @steveklabnik
2016-03-08 21:44:11 +03:00
Steve Klabnik
86fb351059 Rollup merge of #32083 - nodakai:reference-scoped-enum-alias, r=nikomatsakis
reference.md: clarify the limitation of type alias on an enum

Tentatively define the current behavior as the specification.

Cf. rust-lang/rust#26264, rust-lang/rust#28556, rust-lang/rust#30936
2016-03-08 21:44:11 +03:00
Steve Klabnik
be506b256f Rollup merge of #31772 - nodakai:patch-1, r=steveklabnik
Clarify the semantics of enum discriminants

cf. https://doc.rust-lang.org/error-index.html#E0082

> The default type for enum discriminants is isize, but it can be adjusted by adding the repr attribute to the enum declaration.

It would be great if anyone could check my English.
2016-03-08 21:44:10 +03:00
Pyfisch
d7e406eab8 Remove final note from testing chapter.
The information that documentation tests cannot be run in binary crates is already given at the beginning of the section.
2016-03-08 19:33:27 +01:00
bors
eabfc160f8 Auto merge of #32009 - alexcrichton:trim-fulldeps, r=brson
mk: Distribute fewer TARGET_CRATES

Right now everything in TARGET_CRATES is built by default for all non-fulldeps
tests and is distributed by default for all target standard library packages.
Currenly this includes a number of unstable crates which are rarely used such as
`graphviz` and `rbml`>

This commit trims down the set of `TARGET_CRATES`, moves a number of tests to
`*-fulldeps` as a result, and trims down the dependencies of libtest so we can
distribute fewer crates in the `rust-std` packages.
2016-03-08 07:34:28 -08:00
ggomez
fd4e7a0e1a Add help for E0514 2016-03-08 14:57:23 +01:00
bors
8f0479b2a5 Auto merge of #31995 - alexcrichton:fix-make-clena-empty, r=brson
rustbuild: Fix building from an empty directory

A stray shutil.rmtree happened when it shouldn't have happened, causing the
entire build to fail.
2016-03-08 05:34:37 -08:00