Commit Graph

64324 Commits

Author SHA1 Message Date
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
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
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
Venkata Giri Reddy
d2ef70f50c regression test for #38821
Closes #38821

r? @Mark-Simulacrum
2017-05-22 17:09:18 -06: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
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
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
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
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
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
bors
7ac844ffb8 Auto merge of #42130 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 6 pull requests

- Successful merges: #41892, #42062, #42091, #42093, #42098, #42127
- Failed merges:
2017-05-21 01:53:20 +00:00
Mark Simulacrum
382c0eb810 Rollup merge of #42127 - clarcharr:lifetimes, r=Mark-Simulacrum
Remove unused lifetimes.

This was a typo that made it onto master. Noted by @dtolnay in #42127.

Also note #41960 which suggests warning these.
2017-05-20 17:48:16 -06:00
Mark Simulacrum
950e4266e6 Rollup merge of #42098 - japaric:gh42097, r=Mark-Simulacrum
core: fix unused_macro warning

when compiling the crate for a target with max-atomic-width = 0

fixes #42097
2017-05-20 17:48:15 -06:00
Mark Simulacrum
2dc1559360 Rollup merge of #42093 - llogiq:clippy-librustc_errors, r=arielb1
fix some clippy warnings in librustc_errors

Again, those are small changes to improve readability.
2017-05-20 17:48:14 -06:00