Commit Graph

64439 Commits

Author SHA1 Message Date
Corey Farwell
951eb5566e Rollup merge of #42151 - Wallacoloo:docfix_into_vec, r=frewsxcv
Mention Vec::into_boxed_slice in documentation of [T]::into_vec

This is a documentation fix.

`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense to mention the other in their respective documentation for visibility. `Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other way around until now.

Tagging @steveklabnik per his request.
2017-05-23 00:15:45 -04:00
Corey Farwell
b2c742363d Rollup merge of #42145 - ollie27:rustdoc_inline_renamed, r=steveklabnik
rustdoc: Fix names of items in cross crate reexported modules

For renamed reexports the new name should be used.

An example of this (as pointed out in https://github.com/rust-lang/rust/issues/27741#issuecomment-302850721) is two instances of `StepBy` in [`std::iter`](https://doc.rust-lang.org/nightly/std/iter/index.html#structs). [`core::iter`](https://doc.rust-lang.org/nightly/core/iter/index.html#structs) is correct.

Fixes #37608
2017-05-23 00:15:44 -04:00
Corey Farwell
9739e8dbc9 Rollup merge of #42144 - cengizIO:master, r=nikomatsakis
make ui test output patch compatible #41948

Hello!

Previously with #41474 I've changed the internals of UI test output comparison mechanism.

That change didn't change the diff format that we were producing but we needed to improve it anyway.

This makes unified diff lines a little bit more `patch` compatible.

Also I tried to introduce a unit test to check this but couldn't decide which of the following to implement:

1. Should I replace `println` macros with `Writer`s? And access the produced output within a test?
2. Should I add an external test (something like `src/test/run-pass/command-exec.rs`)
3. There are crates that capture `stdout`. Are they safe to use here? (I don't think so)

Thanks!

cc @nikomatsakis
2017-05-23 00:15:43 -04:00
Corey Farwell
7a7e236076 Rollup merge of #42122 - rust-lang:frewsxcv/unstable-book, r=steveklabnik
Add a few entries to the Unstable Book.
2017-05-23 00:15:42 -04:00
Corey Farwell
e38d5d5039 Rollup merge of #42016 - pietroalbini:stabilize/loop_break_value, r=nikomatsakis
Stabilize the loop_break_value feature

Tracking issue: #37339.

Documentation PRs already sent to the various repositories.
2017-05-23 00:15:41 -04:00
projektir
6e27bd8c01 Adding links to option::Option 2017-05-22 21:59:42 -04:00
Wesley Wiser
7eebabeb92 Create the bin dir 2017-05-22 21:32:27 -04:00
bors
2e9139197e Auto merge of #41559 - GuillaumeGomez:partial-eq-msg, r=estebank
Add better error message when == operator is badly used

Part of #40660.

With the following code:

```rust
fn foo<T: PartialEq>(a: &T, b: T) {
    a == b;
}

fn main() {
    foo(&1, 1);
}
```

It prints:

```
error[E0277]: the trait bound `&T: std::cmp::PartialEq<T>` is not satisfied
 --> test.rs:2:5
  |
2 |     a == b;
  |     ^^^^^^ can't compare `&T` with `T`
  |
  = help: the trait `std::cmp::PartialEq<T>` is not implemented for `&T`
  = help: consider adding a `where &T: std::cmp::PartialEq<T>` bound

error: aborting due to previous error
```
2017-05-23 00:36:56 +00:00
Colin Wallace
6e8e5c9fd7 Slice::into_vec: Don't link to Vec::into_boxed_slice
The documentation for this method appears on multiple different pages,
which causes the relative links to not always work.
2017-05-22 16:39:31 -07:00
Havvy
5f4b0ffe59 Fix trailing whitespace. 2017-05-22 16:33:55 -07:00
Venkata Giri Reddy
d2ef70f50c regression test for #38821
Closes #38821

r? @Mark-Simulacrum
2017-05-22 17:09:18 -06:00
Havvy
d7927ffb8f Add description of how values are dropped to Drop trait. 2017-05-22 15:59:00 -07:00
Havvy
ca909c836f Add example of variable declaration drop order to Drop trait. 2017-05-22 15:15:04 -07:00
Havvy
14b767d07e Add example of recursive drop to Drop trait. 2017-05-22 15:06:25 -07:00
Guillaume Gomez
819acb5141 Add missing links for CStr and CString 2017-05-22 23:23:27 +02:00
Niko Matsakis
83641a9b6d fix atomic_lock_free test case 2017-05-22 17:11:39 -04:00
Niko Matsakis
04367100cd fix DepNode
Ideally, we'd have the `Ty` inserted directly in the dep-node, but since
we can't do that yet, we extract the characteristic def-id of the type
in question.
2017-05-22 17:11:39 -04:00
Marc-Antoine Perennou
150d644c21 rustbuild: split Install out of Dist subcommand
only create source tarball for the Dist subcommand
mark install rule as default for Kind::Install
split install-docs
split install-std
factor out empty_dir handling
split install-cargo
split install-analysis
split install-src
rework install-rustc
properly handle cross-compilation setups for install
use pkgname in install
split plain source tarball generation from rust-src dist
document src-tarball in config.toml.exmaple

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-22 22:10:12 +02:00
Niko Matsakis
9317d372c4 two more style nits 2017-05-22 15:55:56 -04:00
Niko Matsakis
45dd0632bc rename parameter_environment to param_env 2017-05-22 15:55:56 -04:00
Niko Matsakis
697146bf40 use ParamEnv from ty rather than importing 2017-05-22 15:54:16 -04:00
Niko Matsakis
226358e2fb rename ParameterEnvironment to ParamEnv 2017-05-22 15:54:16 -04:00
Niko Matsakis
ca65a8a808 kill NEEDS_DROP_CACHED 2017-05-22 15:37:10 -04:00
Niko Matsakis
25ea618e41 kill FREEZENESS_CACHED 2017-05-22 15:37:10 -04:00
Niko Matsakis
aa5232bca7 kill SIZEDNESS_CACHED 2017-05-22 15:37:10 -04:00
Niko Matsakis
4464dcc7ce remove the cell from type flags completely 2017-05-22 15:37:10 -04:00
Niko Matsakis
b46c1a95d0 move needs_drop into a query 2017-05-22 15:37:10 -04:00
Niko Matsakis
5a5c265e24 refactor common logic into ParameterEnvironment::and() 2017-05-22 15:37:10 -04:00
Niko Matsakis
194d4bc15d make parameter-environment a query 2017-05-22 15:37:10 -04:00
Niko Matsakis
1b7acb6f34 centralize the caching for is-copy, is-sized, and is-freeze
Use the trait-environment+type as the key. Note that these
are only invoked on types that live for the entire compilation
(no inference artifacts). We no longer need the various special-case
bits and caches that were in place before.
2017-05-22 14:55:03 -04:00
Niko Matsakis
8a4e5933df add arielb1 example 2017-05-22 14:40:47 -04:00
Nicolas Silva
dec23d41a6 Update Rc and Arc documentation.
It was decided in the RFC discussion https://github.com/rust-lang/rfcs/pull/1954 to make the function call syntax Rc::clone(&foo) the idiomatic way to clone a reference counted pointer (over the method call syntax foo.clone(). This change updates the documentation of Rc, Arc and their respoective Weak pointers to reflect it and bring more exposure to the existence of the function call syntax.
2017-05-22 16:15:37 +02:00
Colin Wallace
78bdda1573 Mention Vec::into_boxed_slice in docs for [T]::into_vec.
`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense
to mention the other in their respective documentation for visibility.
`Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other
way around until now.
2017-05-22 05:23:47 -07:00
Dmitry Vyukov
0b85b64d6b libstd/sync/mpsc: relicense under rust license
These files are licensed under a different license
than the rest of the codebase. This causes potential
issues and inconveniences.
Relicense these files under the standard license.
I hold original copyright on that code.

Fixes #36556
2017-05-22 09:27:39 +02:00
bors
81734e0e06 Auto merge of #42147 - withoutboats:run-pass-test-for-static-in-assoc-const-ty-refs, r=eddyb
Remove 'static bound in assoc const test.

Types do not have to be `'static` to be referenced in
associated consts.

Fixes #33573.
2017-05-22 06:22:52 +00:00
Without Boats
bf529fb6e6 Remove 'static bound in assoc const test.
Types do not have to be `'static` to be referenced in
associated consts.
2017-05-21 23:10:01 -07:00
Oliver Middleton
0cb6a1fad3 rustdoc: Fix names of items in cross crate reexported modules
For renamed reexports the new name should be used.
2017-05-22 02:05:16 +01:00
bors
41976e25f1 Auto merge of #42140 - anderspapitto:doc-typo-fixes, r=Mark-Simulacrum
bootstrap: fix minor comment typos in lib.rs

I noticed these while reading through the build system
documentation. They're hardly worth fixing, but I'm also using this to
get my feet wet with the rustc contribution system.
2017-05-22 00:51:17 +00:00
Cengiz Can
9111d07a6e make ui test output patch compatible #41948 2017-05-22 01:34:36 +03:00
bors
f6cc40f168 Auto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichton
Stabilize library features for 1.18.0

Closes #38863
Closes #38980
Closes #38903
Closes #36648

r? @alexcrichton

@rust-lang/libs
2017-05-21 22:06:08 +00:00
Ian Douglas Scott
f4147e587d
Implement requires_synchronized_create() for Redox
This was breaking the libstd build for Redox.
2017-05-21 13:23:42 -07:00
Ian Douglas Scott
66237afce4
Fix building without backtrace feature, which was broken in ca8b754
Fixes #42139
2017-05-21 12:38:07 -07:00
Anders Papitto
558dd9ce90 bootstrap: fix minor comment typos in lib.rs
I noticed these while reading through the build system
documentation. They're hardly worth fixing, but I'm also using this to
get my feet wet with the rustc contribution system.
2017-05-22 01:58:50 +07:00
Scott McMurray
7eaca60f3b Return a correct size_hint for degenerate inclusive ranges
Fixes https://github.com/rust-lang/rust/issues/42135

Found while fixing run-pass/range_inclusive test failure.
2017-05-21 05:03:49 -07:00
Scott McMurray
f166bd9857 Make RangeInclusive just a two-field struct
Not being an enum improves ergonomics, especially since NonEmpty could be Empty.  It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait.

Implements RFC 1980
2017-05-21 01:48:03 -07:00
bors
14f30da613 Auto merge of #42131 - neosilky:doc-fix, r=frewsxcv
Update to trait bounds CSS in rustdoc

Fixed re-submission of #40719.
2017-05-21 08:28:05 +00:00
bors
e15c159f71 Auto merge of #42132 - cuviper:manifest-paths, r=alexcrichton
Update rust-installer to normalize manifest paths

This fixes the backslash-paths found in the manifests of installers that are built on Windows.  This is the most problematic part of #42121, leaving just the non-executable install.sh.

r? @alexcrichton
2017-05-21 06:00:22 +00:00
Steven Fackler
7c2cd93b2b Stabilize library features for 1.18.0
Closes #38863
Closes #38980
Closes #38903
Closes #36648
2017-05-20 21:58:47 -07:00
Josh Stone
84a155f502 Update rust-installer to normalize manifest paths 2017-05-20 21:55:18 -07:00
Daniel Lockyer
b4c061660f Update to trait bounds CSS in rustdoc
Fixed resubmission of #40719.
2017-05-21 04:35:26 +01:00