Commit Graph

64361 Commits

Author SHA1 Message Date
Tatsuyuki Ishi
d552e34e20 Use the improved submodule handling 2017-05-25 13:57:05 +09:00
bors
cf747fcbf7 Auto merge of #42212 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 15 pull requests

- Successful merges: #41980, #42071, #42120, #42134, #42141, #42142, #42149, #42150, #42159, #42177, #42186, #42191, #42195, #42198, #42211
- Failed merges:
2017-05-25 01:51:35 +00:00
Mark Simulacrum
d429b495a4 Rollup merge of #42211 - aidanhs:aphs-llvm-clone-hacks, r=Mark-Simulacrum
Hack around abysmally slow llvm clones

r? @Mark-Simulacrum

(don't r+ yet, let's see what travis says)
2017-05-24 19:50:11 -06:00
Mark Simulacrum
2bca4fa47d Rollup merge of #42198 - GuillaumeGomez:os-str-doc, r=QuietMisdreavus
Add missing urls for OsStr docs

r? @rust-lang/docs
2017-05-24 19:50:10 -06:00
Mark Simulacrum
a78a0dbe5f Rollup merge of #42195 - SamWhited:fix_broken_link, r=steveklabnik
fix broken link to nomicon in Unsize docs

Add a missing link that is currently broken in the docs (see the last sentence of https://doc.rust-lang.org/std/marker/trait.Unsize.html)
2017-05-24 19:50:09 -06:00
Mark Simulacrum
793fd4111c Rollup merge of #42191 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update Cargo submodule

Contains a fix for rust-lang/cargo#4081
2017-05-24 19:50:09 -06:00
Mark Simulacrum
96328fcb8f Rollup merge of #42186 - devurandom:fix/bootstrap-verbose, r=alexcrichton
bootstrap: Make bootstrap verbose if requested

Fixes: #42099
2017-05-24 19:50:08 -06:00
Mark Simulacrum
84302717ae Rollup merge of #42177 - est31:master, r=Mark-Simulacrum
Remove some needless // gate-test- comments

Also, add detection to treat such comments as tidy errors.
We also remove the found_lib_feature code because it
was just repeating the found_feature code. Originally it
was intended to allow for gate-test lines for
lib features, but apparently nobody missed it.
2017-05-24 19:50:07 -06:00
Mark Simulacrum
ca0860df66 Rollup merge of #42159 - Havvy:doc-drop, r=steveklabnik
Document drop more.

Adds two examples to Drop and describes the recursive drop on types that contain fields.
2017-05-24 19:50:06 -06:00
Mark Simulacrum
d64dddbeaf Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum
Change error count messages

See #33525 for details. r? @Mark-Simulacrum
2017-05-24 19:50:05 -06:00
Mark Simulacrum
73d4b19565 Rollup merge of #42149 - dvyukov:license, r=brson
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-24 19:50:04 -06:00
Mark Simulacrum
81b8e093fe Rollup merge of #42142 - ids1024:redox, r=aturon
Implement requires_synchronized_create() for Redox

This was breaking the libstd build for Redox.
2017-05-24 19:50:03 -06:00
Mark Simulacrum
8bac98a252 Rollup merge of #42141 - ids1024:nobacktrace, r=aturon
Fix building std without backtrace feature, which was broken in ca8b754

Fixes #42139
2017-05-24 19:50:02 -06:00
Mark Simulacrum
00c87a6486 Rollup merge of #42134 - scottmcm:rangeinclusive-struct, r=aturon
Make RangeInclusive just a two-field struct

Not being an enum improves ergonomics and consistency, especially since NonEmpty variant wasn't prevented from being 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 merged https://github.com/rust-lang/rfcs/pull/1980; tracking issue https://github.com/rust-lang/rust/issues/28237.

This is definitely a breaking change to anything consuming `RangeInclusive` directly (not as an Iterator) or constructing it without using the sugar.  Is there some change that would make sense before this so compilation failures could be compatibly fixed ahead of time?

r? @aturon (as FCP proposer on the RFC)
2017-05-24 19:50:01 -06:00
Mark Simulacrum
989c8e86e1 Rollup merge of #42120 - euclio:unicode, r=arielb1
remove "much" from unicode diagnostic

The English seems slightly awkward to me, and it's unnecessary.
2017-05-24 19:50:00 -06:00
Mark Simulacrum
43d81a8c95 Rollup merge of #42071 - nrc:parse-mods, r=nikomatsakis
Add an option to the parser to avoid parsing out of line modules

This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
2017-05-24 19:50:00 -06:00
Mark Simulacrum
f4780a3f7c Rollup merge of #41980 - gamazeps:thread-send, r=steveklabnik
[Doc] Add `'static` and `Send` constraints explanations to `thread::spawn`

Part of #29378.

Explains why the constraints on the closure and its return value are `'static` and `Send`.

Allows to tick of `thread::spawn` from the list of things to document in the `thread` module.

r? @steveklabnik
2017-05-24 19:49:59 -06:00
Aidan Hobson Sayers
47f8b4a3d8 Hack around abysmally slow llvm clones 2017-05-25 02:19:00 +01:00
Alex Crichton
e0f11b4dde Update Cargo submodule
Contains a fix for rust-lang/cargo#4081
2017-05-24 12:59:58 -07:00
Guillaume Gomez
55c3f0b12e Add missing urls for OsStr docs 2017-05-24 19:33:40 +02:00
Sam Whited
f6d935b455 fix broken link to nomicon in Unsize docs 2017-05-24 11:55:05 -05:00
Michael Kohl
5558c64f33 Change error count messages
See #33525 for details.
2017-05-24 16:14:38 +07:00
Dennis Schridde
cd86a9ba4a bootstrap: Use common run() function to call cargo
This brings verbosity even to invocation of cargo itself
2017-05-24 10:52:57 +02:00
Dennis Schridde
604f716dbe bootstrap: Make bootstrap verbose if requested
Fixes: #42099
2017-05-24 10:52:57 +02:00
Dennis Schridde
2aa6700b25 bootstrap: Actually respect verbosity setting in config.toml 2017-05-24 10:52:52 +02:00
est31
e860655a99 Remove some needless // gate-test- comments
Also, add detection to treat such comments as tidy errors.
We also remove the found_lib_feature code because it
was just repeating the found_feature code. Originally it
was intended to allow for gate-test lines for
lib features, but apparently nobody missed it.
2017-05-23 20:17:38 +02:00
bors
5b13bff520 Auto merge of #42023 - nikomatsakis:issue-36799-ostn15_phf, r=arielb1
introduce local-scope to prevent `StorageLive`/`StorageDead` in statics

In investigating #36799, I found that we were creating storage-live/storage-dead instructions in statics/constants, where they are not needed. This arose due to the fix for local scopes. This PR tries to fix that (and adds a test -- I'm curious if there is a way to make that test more targeted, though).

r? @arielb1
2017-05-23 09:55:40 +00:00
bors
9fa25a7df3 Auto merge of #42015 - nikomatsakis:chalk-trait-env-2, r=eddyb
remove interior mutability of type-flags

We were previously using the flags on `Ty<'tcx>` instances to do some ad-hoc caching schemes around things like `is_sized()`, `is_freeze()`, and `moves_by_default()`. This PR replaces those schemes with a proper query; the query key is based on the pair of a `(ParameterEnvironment<'tcx>, Ty<'tcx>)` pair. This is also intended to be a preliminary template for what trait-selection and projection will eventually look like.

I did some performance measurements. In the past, I observed a noticeable speedup (6%) for building rustc, but since I've rebased, the numbers appear to be more of a wash:

| Crate | Before | After | Percentage |
| --- | --- | --- | -- |
| syntax | 167s | 166s | 0.6% faster |
| rustc | 376s | 382s | 1.5% slower |

Some advantages of this new scheme:

- `is_sized` etc are proper queries
- we get caching across generic fns, so long as trait environment is identical
- dependency tracking is correct
2017-05-23 07:14:42 +00:00
Havvy
b41b2947d5 Suggested changes by birkenfeld 2017-05-22 23:49:35 -07:00
bors
852b7cb91e Auto merge of #42165 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests

- Successful merges: #42016, #42122, #42144, #42145, #42151, #42152, #42160, #42163
- Failed merges:
2017-05-23 04:48:15 +00:00
Corey Farwell
aa7762f91f Rollup merge of #42163 - projektir:option_links, r=frewsxcv
Adding links to option::Option

Just adding some links.
2017-05-23 00:15:48 -04:00
Corey Farwell
f37b34d0fa Rollup merge of #42160 - venkatagiri:issue_38821, r=Mark-Simulacrum
regression test for #38821

Closes #38821

r? @Mark-Simulacrum
2017-05-23 00:15:47 -04:00
Corey Farwell
2cc683950b Rollup merge of #42152 - GuillaumeGomez:cstr-docs, r=frewsxcv
Add missing links for CStr and CString

r? @rust-lang/docs
2017-05-23 00:15:46 -04:00
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
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
Niko Matsakis
9317d372c4 two more style nits 2017-05-22 15:55:56 -04:00