Commit Graph

52457 Commits

Author SHA1 Message Date
bors 478a33dabc Auto merge of #33002 - mitaa:rdoc-cross-impls, r=alexcrichton
rustdoc: refine cross-crate impl inlining

This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation.

fixes #14586
fixes #31948

.. and also applies the reachability checking to cross-crate links.

fixes #28480

r? @alexcrichton
2016-04-19 05:00:10 -07:00
bors e8c0aeb88b Auto merge of #32985 - caipre:rustdoc-disambiguate-impl-anchors, r=alexcrichton
rustdoc: Disambiguate anchors

Closes https://github.com/rust-lang/rust/issues/32890
2016-04-19 01:49:13 -07:00
bors 14f61c87ff Auto merge of #32866 - davidhewitt:master, r=apasel422
Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`
2016-04-18 21:05:58 -07:00
bors d36ad55aa5 Auto merge of #32755 - alexcrichton:rustbuild-start-test, r=brson
rustbuild: Add support for compiletest test suites

This commit adds support in rustbuild for running all of the compiletest test
suites as part of `make check`. The `compiletest` program was moved to
`src/tools` (like `rustbook` and others) and is now just compiled like any other
old tool. Each test suite has a pretty standard set of dependencies and just
tweaks various parameters to the final compiletest executable.

Note that full support is lacking in terms of:

* Once a test suite has passed, that's not remembered. When a test suite is
  requested to be run, it's always run.
* The arguments to compiletest probably don't work for every possible
  combination of platforms and testing environments just yet. There will likely
  need to be future updates to tweak various pieces here and there.
* Cross compiled test suites probably don't work just yet, support for that will
  come in a follow-up patch.
2016-04-18 17:53:58 -07:00
Alex Crichton b325baf0ae rustbuild: Add support for compiletest test suites
This commit adds support in rustbuild for running all of the compiletest test
suites as part of `make check`. The `compiletest` program was moved to
`src/tools` (like `rustbook` and others) and is now just compiled like any other
old tool. Each test suite has a pretty standard set of dependencies and just
tweaks various parameters to the final compiletest executable.

Note that full support is lacking in terms of:

* Once a test suite has passed, that's not remembered. When a test suite is
  requested to be run, it's always run.
* The arguments to compiletest probably don't work for every possible
  combination of platforms and testing environments just yet. There will likely
  need to be future updates to tweak various pieces here and there.
* Cross compiled test suites probably don't work just yet, support for that will
  come in a follow-up patch.
2016-04-18 16:30:01 -07:00
bors b324fa7204 Auto merge of #33081 - steveklabnik:rollup, r=steveklabnik
Rollup of 6 pull requests

- Successful merges: #32558, #32906, #33007, #33008, #33035, #33058
- Failed merges: #32912
2016-04-18 12:03:14 -07:00
Steve Klabnik ec44ddc33a Rollup merge of #33058 - Manishearth:fx-E0102, r=GuillaumeGomez
Update E0102's example (fixes #33057)

r? @GuillaumeGomez
2016-04-18 14:50:35 -04:00
Steve Klabnik 31374d8030 Rollup merge of #33035 - jbranchaud:use-consistent-variable-names-in-ownership, r=GuillaumeGomez
Use `v` instead of `v1` for consistency

The code examples and previous paragraphs all use `v` and `v2`
2016-04-18 14:50:35 -04:00
Steve Klabnik aceeca49c8 Rollup merge of #33008 - sanmai-NL:patch-1, r=steveklabnik
grammar: fix

Reading this, one item stood out a bit. Small improvements here.

1. ‘Compile-time’ is not a noun, ‘compilation time’ was meant;
1. Mathematical formulas are best not rendered as code;
1. Use the same tense as in other items.
2016-04-18 14:50:35 -04:00
Steve Klabnik d3d9bd0e47 Rollup merge of #33007 - notriddle:master, r=steveklabnik
Do not use "bind" to refer to both referencing and to assignment

See https://users.rust-lang.org/t/difference-between-four-references/5406/7
2016-04-18 14:50:35 -04:00
Steve Klabnik 108a9e43e3 Rollup merge of #32906 - jocki84:jocki84-book-size, r=steveklabnik
Reword explanation of 'size' types.

Do not reference machine 'pointers' in explanation of 'size' types.

I think the number of elements that can be directly addressed is a fundamental feature of a machine architecture in its own right. The fact that it coincides with the ‘size’ of a pointer should be viewed as an ‘implementation detail’ ;)
2016-04-18 14:50:34 -04:00
Steve Klabnik 5d0dca363f Rollup merge of #32558 - sanxiyn:rustdoc-self-link, r=steveklabnik
Avoid linking to itself in implementors section of trait page

Fix #32474.
2016-04-18 14:50:34 -04:00
David Hewitt 1861951fd9 Added From<VecDeque<T>> for Vec<T> and From<Vec<T>> for VecDeque<T> 2016-04-18 18:53:59 +01:00
bors d00782494b Auto merge of #33042 - alexcrichton:clean-doc, r=nikomatsakis
rustbuild: Clean more as part of `make clean`

Clean out old documentation as well as the new test/tools directories. Should
prevent a problem that happened this morning where a PR bounced and then it left
docs with "broken links" so all future PRs bounced.
2016-04-18 09:53:13 -07:00
Manish Goregaokar f089cf9b2f
Update E0102's example (fixes #33057) 2016-04-18 18:35:43 +05:30
bors 63760acf31 Auto merge of #33064 - jseyfried:improve_resolve_performance, r=eddyb
resolve: Improve performance

This fixes #33061 by speeding up searchs through all traits in scope, a bottleneck in `resolve`.

According to my measurements, this PR improves resolution performance by a factor of 3.4x on `librustc`, which almost completely reverses the 3.75x performance regression reported in #33061.

r? @eddyb
2016-04-17 19:11:20 -07:00
Jeffrey Seyfried 6ae80273a0 resolve: improve performance 2016-04-18 02:01:57 +00:00
Nick Platt 894caf8364 rustdoc: Disambiguate anchors for assoc item impls 2016-04-17 21:41:55 -04:00
mitaa 77b409a674 Reachability check cross-crate links 2016-04-18 01:56:01 +02:00
mitaa cfad7ad947 Perform doc-reachability check for inlined impls
This changes the current rule that impls within `doc(hidden)` modules
aren't inlined, to only inlining impls where the implemented
trait and type are reachable in documentation.
2016-04-18 01:55:54 +02:00
bors ed7c56796e Auto merge of #33034 - tbu-:pr_doc_mutex_lock, r=nagisa
Add a comment about locking a `Mutex` multiple times

Fixes #32260.
2016-04-17 14:00:56 -07:00
Tobias Bucher df748bf293 Add a comment about locking a `Mutex` multiple times
Fixes #32260.
2016-04-17 21:30:52 +02:00
bors 412e6f7e84 Auto merge of #33050 - apasel422:bh, r=alexcrichton
Implement `Clone` for `binary_heap::IntoIter`

r? @alexcrichton
2016-04-17 11:17:54 -07:00
bors aa5888717f Auto merge of #33016 - tbu-:pr_doc_peekable, r=alexcrichton
Add a note about side effects for "peekable" iterators
2016-04-17 09:09:24 -07:00
Andrew Paseltiner 05afa68f7d
Implement `Clone` for `binary_heap::IntoIter` 2016-04-17 09:28:30 -04:00
bors a626400263 Auto merge of #33049 - Manishearth:rollup, r=Manishearth
Rollup of 10 pull requests

- Successful merges: #31441, #32956, #33003, #33022, #33023, #33032, #33039, #33044, #33045, #33046
- Failed merges:
2016-04-17 05:32:47 -07:00
Manish Goregaokar e1db767dbc Rollup merge of #33046 - jseyfried:fix_unresolved_pattern_diagnostics, r=eddyb
Fix diagnostics for unresolved patterns

This fixes #33043, a bug in the diagnostics for unresolved patterns.
r? @eddyb
2016-04-17 17:50:35 +05:30
Manish Goregaokar df0eb16020 Rollup merge of #33045 - jseyfried:no_def_modifiers, r=eddyb
resolve: Refactor away `DefModifiers`

This refactors away `DefModifiers`, which is unneeded now that #32875 has landed.
r? @eddyb
2016-04-17 17:50:35 +05:30
Manish Goregaokar 02e40d910a Rollup merge of #33044 - petrochenkov:prefix, r=eddyb
syntax: Parse import prefixes as paths

Fixes https://github.com/rust-lang/rust/issues/10415

r? @eddyb
(This partially intersects with https://github.com/rust-lang/rust/pull/33041)
2016-04-17 17:50:35 +05:30
Manish Goregaokar 4046f396ed Rollup merge of #33039 - bluss:trait-obj-error, r=arielb1
Adjust example for error E0225

Adjust example for error E0225

It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.

Also use whitespace around `+`.

This seems appropriate apropos issue #32963
2016-04-17 17:50:35 +05:30
Manish Goregaokar 43c23e5eba Rollup merge of #33032 - kindlychung:patch-3, r=Manishearth
Update casting-between-types.md
2016-04-17 17:50:34 +05:30
Manish Goregaokar 5fc8065ef2 Rollup merge of #33023 - tbu-:pr_wrapping_traits, r=alexcrichton
Implement `Display` and `Hash` for `std::num::Wrapping`

Also, change the `Debug` implementation to only show the inner value.

Fixes #33006.
2016-04-17 17:50:34 +05:30
Manish Goregaokar 51c3c430cd Rollup merge of #33022 - Mr4x:master, r=bluss
Fix f32::sin_cos and f64::sin_cos examples
2016-04-17 17:50:34 +05:30
Manish Goregaokar 31bedab0c8 Rollup merge of #33003 - fbergr:link, r=steveklabnik
Fix link in contributing page

Link was broken (404).
2016-04-17 17:50:34 +05:30
Manish Goregaokar de477edb6d Rollup merge of #32956 - GuillaumeGomez:ptr_examples, r=steveklabnik
Add examples for std::ptr module functions

Part of #29371.

r? @steveklabnik
2016-04-17 17:50:34 +05:30
Manish Goregaokar e59af6c719 Rollup merge of #31441 - gereeter:btree-docs, r=bluss
Start documenting BTreeMap's node interface

cc @Gankro @apasel422
2016-04-17 17:50:33 +05:30
bors f207ddb9bf Auto merge of #33012 - pravic:describe-L-rustc-option, r=alexcrichton
List possible keys of the -L rustc option.

Since `rustc --help -v` does not describe it, only *rustc.1* man page, but there is no man for Windows.

r? @alexcrichton
cc @steveklabnik
2016-04-17 03:24:46 -07:00
bors d8d71747fe Auto merge of #32987 - xosmig:binary_heap_extension, r=apasel422
collections: add append for binary heap
2016-04-17 01:16:02 -07:00
bors b5de94fba9 Auto merge of #32977 - alexcrichton:ignore-panics, r=brson
std: Change String::truncate to panic less

The `Vec::truncate` method does not panic if the length argument is greater than
the vector's current length, but `String::truncate` will indeed panic. This
semantic difference can be a bit jarring (e.g. #32717), and after some
discussion the libs team concluded that although this can technically be a
breaking change it is almost undoubtedly not so in practice.

This commit changes the semantics of `String::truncate` to be a noop if
`new_len` is greater than the length of the current string.

Closes #32717
2016-04-16 23:06:29 -07:00
bors 6892277cc0 Auto merge of #32952 - eddyb:mir-debuginfo-2, r=michaelwoerister
Get all (but one) of debuginfo tests to pass with MIR codegen.

I didn't get much feedback in #31005 so I went ahead and implemented something simple.
Closes #31005, as MIR debuginfo should work now for most usecases.

The `no-debug-attribute` test no longer assumes variables are in scope of `return`.
We might also want to revisit that in #32949, but the test is more reliable now either way.

In order to get one last function in the `associated-type` test pass, this PR also fixes #32790.
2016-04-16 20:40:33 -07:00
Jeffrey Seyfried 2c978dc80b resolve: Refactor away `DefModifiers` 2016-04-17 02:54:22 +00:00
Jeffrey Seyfried 1a374b8d11 Fix diagnostics for unresolved patterns 2016-04-17 02:42:39 +00:00
bors 054a4b4019 Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichton
Remove unused trait imports
2016-04-16 18:31:11 -07:00
Vadim Petrochenkov e7bc939f1e syntax: Parse import prefixes as paths 2016-04-17 03:48:40 +03:00
bors ae33aa74f4 Auto merge of #32875 - jseyfried:1422_implementation, r=nikomatsakis
Implement `pub(restricted)` privacy (RFC 1422)

This implements `pub(restricted)` privacy from RFC 1422 (cc #32409) behind a feature gate.

`pub(restricted)` paths currently cannot use re-exported modules both for simplicity of implementation and for future compatibility with RFC 1560 (cf #31783).

r? @nikomatsakis
2016-04-16 16:21:09 -07:00
Jeffrey Seyfried e14504a113 Add tests for `pub(restricted)` 2016-04-16 22:52:14 +00:00
Alex Crichton 4d1e375654 rustbuild: Clean more as part of `make clean`
Clean out old documentation as well as the new test/tools directories. Should
prevent a problem that happened this morning where a PR bounced and then it left
docs with "broken links" so all future PRs bounced.
2016-04-16 14:56:37 -07:00
Jeffrey Seyfried daec3fe4e6 Always report PRIVATE_IN_PUBLIC violations as hard errors when
the feature `pub_restricted` is enabled.
2016-04-16 21:27:20 +00:00
Ulrik Sverdrup 869536ed2c Adjust example for error E0225
It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.

Also use whitespace around `+`.
2016-04-16 21:30:50 +02:00
Eduard Burtescu e2ac9895d6 mir: place match pattern bindings in their respective arms. 2016-04-16 21:51:30 +03:00