]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMerge remote-tracking branch 'upstream/master' into box-conversions
Nikolai Vazquez [Wed, 27 Sep 2017 01:18:36 +0000 (21:18 -0400)]
Merge remote-tracking branch 'upstream/master' into box-conversions

6 years agoRemove uses of mem::transmute in Box methods
Nikolai Vazquez [Wed, 27 Sep 2017 01:16:59 +0000 (21:16 -0400)]
Remove uses of mem::transmute in Box methods

Makes use of conversions via Unique.

6 years agoAuto merge of #44741 - qmx:trans_fulfill_obligation_should_not_crash, r=nikomatsakis
bors [Tue, 26 Sep 2017 18:29:57 +0000 (18:29 +0000)]
Auto merge of #44741 - qmx:trans_fulfill_obligation_should_not_crash, r=nikomatsakis

use param_env on the trait_cache key

We bailed from making trans_fulfill_obligation return `Option` or `Result`, just made it less prone to crashing outside trans

r? @nikomatsakis

6 years agoAuto merge of #44736 - pnkfelix:mir-borrowck4, r=arielb1
bors [Tue, 26 Sep 2017 09:19:03 +0000 (09:19 +0000)]
Auto merge of #44736 - pnkfelix:mir-borrowck4, r=arielb1

Some fixes to mir-borrowck

Make the code more closely match the NLL RFC (updated description).

(The biggest visible fix the addition of the Shallow/Deep distinction, which means mir-borrowck stops falsely thinking that StorageDeads need deep access to their input L-value.)

6 years agoAuto merge of #44735 - tirr-c:issue-42143, r=arielb1
bors [Tue, 26 Sep 2017 05:02:03 +0000 (05:02 +0000)]
Auto merge of #44735 - tirr-c:issue-42143, r=arielb1

Friendlier error message for closure argument type mismatch

Rebased #42270.
Fixes #42143.

---

`test.rs`:

```rust
fn main() {
    foo(|_: i32, _: usize| ());
}

fn foo<F>(_: F) where F: Fn(&str, usize) {}
```

Before:

```
error[E0281]: type mismatch: `[closure@test.rs:2:9: 2:30]` implements the trait `std::ops::Fn<(i32, usize)>`, but the trait `for<'r> std::ops::Fn<(&'r str, usize)>` is required
 --> test.rs:2:5
  |
2 |     foo(|_: i32, _: usize| ());
  |     ^^^ --------------------- implements `std::ops::Fn<(i32, usize)>`
  |     |
  |     expected &str, found i32
  |     requires `for<'r> std::ops::Fn<(&'r str, usize)>`
  |
  = note: required by `foo`
```

After (early):

```
error[E0631]: type mismatch in closure arguments
 --> test.rs:2:5
  |
2 |     foo(|_: i32, _: usize| ());
  |     ^^^ --------------------- takes arguments of type `i32` and `usize`
  |     |
  |     expected arguments of type `&str` and `usize`
  |
  = note: required by `foo`
```

After (current):

```
error[E0631]: type mismatch in closure arguments
 --> test.rs:2:5
  |
2 |     foo(|_: i32, _: usize| ());
  |     ^^^ --------------------- found signature of `fn(i32, usize) -> _`
  |     |
  |     expected signature of `for<'r> fn(&'r str, usize) -> _`
  |
  = note: required by `foo`
```

~~Compiler output has been changed, and a few tests are failing. Help me writing/fixing tests!~~

r? @nikomatsakis

6 years agoAuto merge of #44297 - laumann:suggest-misspelt-methods, r=arielb1
bors [Mon, 25 Sep 2017 23:09:06 +0000 (23:09 +0000)]
Auto merge of #44297 - laumann:suggest-misspelt-methods, r=arielb1

Add suggestions for misspelled method names

Use the syntax::util::lev_distance module to provide suggestions when a
named method cannot be found.

Part of #30197

6 years agoAuto merge of #44279 - smaeul:crt_static-deps, r=alexcrichton
bors [Mon, 25 Sep 2017 20:37:02 +0000 (20:37 +0000)]
Auto merge of #44279 - smaeul:crt_static-deps, r=alexcrichton

Require rlibs for dependent crates when linking static executables

This handles the case for `CrateTypeExecutable` and `+crt_static`. I reworked the match block to avoid duplicating the `attempt_static` and error checking code again (this case would have been a copy of the `CrateTypeCdylib`/`CrateTypeStaticlib` case).

On `linux-musl` targets where `std` was built with `crt_static = false` in `config.toml`, this change brings the test suite from entirely failing to mostly passing.

This change should not affect behavior for other crate types, or for targets which do not respect `+crt_static`.

6 years agoAuto merge of #44085 - bjorn3:no_llvm_write_metadata, r=arielb1
bors [Mon, 25 Sep 2017 18:05:22 +0000 (18:05 +0000)]
Auto merge of #44085 - bjorn3:no_llvm_write_metadata, r=arielb1

Allow writing metadata without llvm

# Todo:

* [x] Rebase
* [x] Fix eventual errors
* [x] <strike>Find some crate to write elf files</strike> (will do it later)

Cc #43842

6 years agothose changes break miri, PR will be issued later
Douglas Campos [Mon, 25 Sep 2017 13:49:32 +0000 (09:49 -0400)]
those changes break miri, PR will be issued later

6 years agofix tidy errors
Douglas Campos [Thu, 21 Sep 2017 15:53:37 +0000 (11:53 -0400)]
fix tidy errors

6 years agoadd comment per @nikomatsakis request
Douglas Campos [Thu, 21 Sep 2017 15:19:52 +0000 (11:19 -0400)]
add comment per @nikomatsakis request

6 years agoexpose ParamEnv as a param
Douglas Campos [Thu, 21 Sep 2017 02:51:35 +0000 (22:51 -0400)]
expose ParamEnv as a param

6 years agoadd ParamEnv to the trait_cache key
Douglas Campos [Wed, 20 Sep 2017 02:39:00 +0000 (22:39 -0400)]
add ParamEnv to the trait_cache key

6 years agoAuto merge of #44809 - arielb1:small-scope, r=eddyb
bors [Mon, 25 Sep 2017 12:52:02 +0000 (12:52 +0000)]
Auto merge of #44809 - arielb1:small-scope, r=eddyb

encode region::Scope using fewer bytes

Now that region::Scope is no longer interned, its size is more important. This PR encodes region::Scope in 8 bytes instead of 12, which should speed up region inference somewhat (perf testing needed) and should improve the margins on #36799 by 64MB (that's not a lot, I did this PR mostly to speed up region inference).

This is a perf-sensitive PR. Please don't roll me up.

r? @eddyb

This is based on  #44743 so I could get more accurate measurements on #36799.

6 years agoRemove now dead code.
Felix S. Klock II [Fri, 22 Sep 2017 13:37:43 +0000 (15:37 +0200)]
Remove now dead code.

6 years agoMake mir-borrowck more closely match (draft) NLL RFC.
Felix S. Klock II [Mon, 21 Aug 2017 10:48:33 +0000 (12:48 +0200)]
Make mir-borrowck more closely match (draft) NLL RFC.

In particular:

 * introduce the shallow/deep distinction for read/write accesses

 * use the notions of prefixes, shallow prefixes, and supporting prefixes
   rather than trying to recreate the restricted sets from ast-borrowck.

 * Add shallow reads of Discriminant and ArrayLength, and treat them
   as artificial fields when doing prefix traversals.

6 years agoMore fine-grained delineation for mir-borrowck errors.
Felix S. Klock II [Tue, 22 Aug 2017 09:23:17 +0000 (11:23 +0200)]
More fine-grained delineation for mir-borrowck errors.

6 years agofix Debug impls
Ariel Ben-Yehuda [Mon, 25 Sep 2017 10:47:19 +0000 (13:47 +0300)]
fix Debug impls

6 years agoAuto merge of #44646 - petrochenkov:scompress, r=michaelwoerister
bors [Mon, 25 Sep 2017 09:01:53 +0000 (09:01 +0000)]
Auto merge of #44646 - petrochenkov:scompress, r=michaelwoerister

Compress most of spans to 32 bits

As described in https://internals.rust-lang.org/t/rfc-compiler-refactoring-spans/1357/28

Closes https://github.com/rust-lang/rust/issues/15594
r? @michaelwoerister

6 years agoFix error
bjorn3 [Mon, 25 Sep 2017 06:17:37 +0000 (08:17 +0200)]
Fix error

6 years agoAuto merge of #44612 - pylaligand:magenta-to-zircon, r=alexcrichton
bors [Mon, 25 Sep 2017 05:05:14 +0000 (05:05 +0000)]
Auto merge of #44612 - pylaligand:magenta-to-zircon, r=alexcrichton

The Magenta kernel is now called Zircon.

6 years agoFix fuchsia toolchain prebuild setup
James Tucker [Mon, 25 Sep 2017 04:32:27 +0000 (21:32 -0700)]
Fix fuchsia toolchain prebuild setup

 * Adjust bootstrap to provide useful output on failure
 * Add missing package dependencies in the build environment
 * Fix permission bits on prebuilt toolchain files

6 years agoAuto merge of #44700 - arielb1:mir-effectck, r=nikomatsakis
bors [Mon, 25 Sep 2017 00:52:15 +0000 (00:52 +0000)]
Auto merge of #44700 - arielb1:mir-effectck, r=nikomatsakis

Move effect-checking to MIR

This allows emitting lints from MIR and moves the effect-checking pass to work on it.

I'll make `repr(packed)` misuse unsafe in a separate PR.

r? @eddyb

6 years agoLP_CLONE_FDIO_ROOT is now LP_CLONE_FDIO_NAMESPACE
James Tucker [Sun, 24 Sep 2017 21:31:50 +0000 (14:31 -0700)]
LP_CLONE_FDIO_ROOT is now LP_CLONE_FDIO_NAMESPACE

6 years agoensure that prebuilt toolchain binaries are +x
James Tucker [Fri, 22 Sep 2017 18:20:48 +0000 (11:20 -0700)]
ensure that prebuilt toolchain binaries are +x

6 years agoRe-add CMake package
Petr Hosek [Thu, 21 Sep 2017 23:26:10 +0000 (16:26 -0700)]
Re-add CMake package

This appears to be needed by the Rust build.

6 years agoUse Zircon's Clang rather than building our own
Petr Hosek [Thu, 21 Sep 2017 22:36:05 +0000 (15:36 -0700)]
Use Zircon's Clang rather than building our own

This toolchain is already used to build Zircon itself and is the
official Clang toolchain used by all Fuchsia developers.

6 years agobump liblibc to 0.2.31
James Tucker [Wed, 20 Sep 2017 18:56:38 +0000 (11:56 -0700)]
bump liblibc to 0.2.31

6 years agoDownload clang-tools-extra as well
Petr Hosek [Tue, 19 Sep 2017 19:05:01 +0000 (12:05 -0700)]
Download clang-tools-extra as well

6 years agoInstall unzip into Fuchsia Docker container
Petr Hosek [Tue, 19 Sep 2017 16:55:16 +0000 (09:55 -0700)]
Install unzip into Fuchsia Docker container

6 years agoTODO --> FIXME
P.Y. Laligand [Mon, 18 Sep 2017 22:54:48 +0000 (15:54 -0700)]
TODO --> FIXME

6 years agoUpdate submodules.
P.Y. Laligand [Mon, 18 Sep 2017 22:45:28 +0000 (15:45 -0700)]
Update submodules.

6 years agoUpdate Fuchsia toolchain build
Petr Hosek [Mon, 18 Sep 2017 03:02:14 +0000 (20:02 -0700)]
Update Fuchsia toolchain build

compiler-rt is now being built as part of the toolchain itself.

6 years agoUpdated Zircon version.
P.Y. Laligand [Fri, 15 Sep 2017 23:46:51 +0000 (16:46 -0700)]
Updated Zircon version.

6 years agoFixed casing issues.
P.Y. Laligand [Fri, 15 Sep 2017 21:11:04 +0000 (14:11 -0700)]
Fixed casing issues.

6 years agoTesting on Travis.
P.Y. Laligand [Fri, 15 Sep 2017 21:04:08 +0000 (14:04 -0700)]
Testing on Travis.

6 years agoThe Magenta kernel is now called Zircon.
P.Y. Laligand [Fri, 15 Sep 2017 19:38:08 +0000 (12:38 -0700)]
The Magenta kernel is now called Zircon.

6 years agoAuto merge of #44758 - arielb1:a-small-path, r=eddyb
bors [Sun, 24 Sep 2017 19:48:11 +0000 (19:48 +0000)]
Auto merge of #44758 - arielb1:a-small-path, r=eddyb

put empty generic lists behind a pointer

This reduces the size of hir::Expr from 128 to 88 bytes (!) and shaves
200MB out of #36799.

This is a performance-sensitive PR so please don't roll it up.

r? @eddyb

6 years agoChange Levensthein-based method to a single suggestion
Thomas Jespersen [Thu, 21 Sep 2017 11:04:11 +0000 (13:04 +0200)]
Change Levensthein-based method to a single suggestion

The convention for suggesting close matches is to provide at most one match (the
closest one). Change the suggestions for misspelt method names to obey that.

6 years agoAuto merge of #44743 - arielb1:size-rollback, r=eddyb
bors [Sun, 24 Sep 2017 15:41:13 +0000 (15:41 +0000)]
Auto merge of #44743 - arielb1:size-rollback, r=eddyb

typeck::check::coercion - roll back failed unsizing type vars

This wraps unsizing coercions within an additional level of
`commit_if_ok`, which rolls back type variables if the unsizing coercion
fails. This prevents a large amount of type-variables from accumulating
while type-checking a large function, e.g. shaving 2GB off one of the
4GB peaks in #36799.

This is a performance-sensitive PR so please don't roll it up.

r? @eddyb
cc @nikomatsakis

6 years agoencode region::Scope using fewer bytes
Ariel Ben-Yehuda [Sun, 24 Sep 2017 14:20:37 +0000 (17:20 +0300)]
encode region::Scope using fewer bytes

Now that region::Scope is no longer interned, its size is more
important. This PR encodes region::Scope in 8 bytes instead of 12, which
should speed up region inference somewhat (perf testing needed) and
should improve the margins on #36799 by 64MB (that's not a lot, I did
this PR mostly to speed up region inference).

6 years agomove Scope behind an enum
Ariel Ben-Yehuda [Sun, 24 Sep 2017 13:13:54 +0000 (16:13 +0300)]
move Scope behind an enum

6 years agoAuto merge of #44807 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sun, 24 Sep 2017 12:20:21 +0000 (12:20 +0000)]
Auto merge of #44807 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 4 pull requests

- Successful merges: #44103, #44625, #44789, #44795
- Failed merges:

6 years agoRollup merge of #44795 - KiChjang:mir-err-notes, r=arielb1
Guillaume Gomez [Sun, 24 Sep 2017 12:01:52 +0000 (14:01 +0200)]
Rollup merge of #44795 - KiChjang:mir-err-notes, r=arielb1

MIR borrowck: Add span labels for E0381 and E0505

Corresponds to `report_use_of_moved` and `report_move_out_when_borrowed`.

Part of #44596.

6 years agoRollup merge of #44789 - GuillaumeGomez:fix-rustdoc-display, r=QuietMisdreavus
Guillaume Gomez [Sun, 24 Sep 2017 12:01:51 +0000 (14:01 +0200)]
Rollup merge of #44789 - GuillaumeGomez:fix-rustdoc-display, r=QuietMisdreavus

Fix warning position in rustdoc code blocks

Before:

<img width="1440" alt="screen shot 2017-09-23 at 14 07 08" src="https://user-images.githubusercontent.com/3050060/30773382-b9649288-a06f-11e7-94ec-faa3c3ed999b.png">

After:

<img width="1440" alt="screen shot 2017-09-23 at 14 58 31" src="https://user-images.githubusercontent.com/3050060/30773384-bdfc9f3e-a06f-11e7-9030-9fb8a5308668.png">

r? @QuietMisdreavus

6 years agoRollup merge of #44625 - frewsxcv:frewsxcv-raii-stdin, r=QuietMisdreavus
Guillaume Gomez [Sun, 24 Sep 2017 12:01:50 +0000 (14:01 +0200)]
Rollup merge of #44625 - frewsxcv:frewsxcv-raii-stdin, r=QuietMisdreavus

Indicate how ChildStd{in,out,err} FDs are closed.

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

6 years agoRollup merge of #44103 - zackmdavis:cmp_op_must_use, r=arielb1
Guillaume Gomez [Sun, 24 Sep 2017 12:01:49 +0000 (14:01 +0200)]
Rollup merge of #44103 - zackmdavis:cmp_op_must_use, r=arielb1

add comparison operators to must-use lint (under `fn_must_use` feature)

Although RFC 1940 is about annotating functions with `#[must_use]`, a
key part of the motivation was linting unused equality operators.

(See
https://github.com/rust-lang/rfcs/pull/1812#issuecomment-265695898—it
seems to have not been clear to discussants at the time that marking the
comparison methods as `must_use` would not give us the lints on
comparison operators, at least in (what the present author understood
as) the most straightforward implementation, as landed in #43728
(3645b062).)

To rectify the situation, we here lint unused comparison operators as
part of the unused-must-use lint (feature gated by the `fn_must_use`
feature flag, which now arguably becomes a slight (tolerable in the
opinion of the present author) misnomer).

This is in the matter of #43302.

cc @crumblingstatue

6 years agosort the list of inference errors by span
Ariel Ben-Yehuda [Sun, 24 Sep 2017 10:45:19 +0000 (13:45 +0300)]
sort the list of inference errors by span

this should produce more error stability

6 years agofix test
Ariel Ben-Yehuda [Sun, 24 Sep 2017 10:15:18 +0000 (13:15 +0300)]
fix test

6 years agoremove test code accidentally checked in
Ariel Ben-Yehuda [Wed, 20 Sep 2017 21:29:32 +0000 (00:29 +0300)]
remove test code accidentally checked in

6 years agoaddress review comments
Ariel Ben-Yehuda [Wed, 20 Sep 2017 13:34:31 +0000 (16:34 +0300)]
address review comments

6 years agomove unsafety checking to MIR
Ariel Ben-Yehuda [Tue, 19 Sep 2017 13:20:02 +0000 (16:20 +0300)]
move unsafety checking to MIR

No functional changes intended.

6 years agoadd lint levels to VisibilityScope
Ariel Ben-Yehuda [Wed, 13 Sep 2017 19:33:07 +0000 (22:33 +0300)]
add lint levels to VisibilityScope

6 years agotypeck::check::coercion - roll back failed unsizing type vars
Ariel Ben-Yehuda [Thu, 21 Sep 2017 14:54:39 +0000 (17:54 +0300)]
typeck::check::coercion - roll back failed unsizing type vars

This wraps unsizing coercions within an additional level of
`commit_if_ok`, which rolls back type variables if the unsizing coercion
fails. This prevents a large amount of type-variables from accumulating
while type-checking a large function, e.g. shaving 2GB off one of the
4GB peaks in #36799.

6 years agoput empty generic lists behind a pointer
Ariel Ben-Yehuda [Thu, 21 Sep 2017 20:24:26 +0000 (23:24 +0300)]
put empty generic lists behind a pointer

This reduces the size of hir::Expr from 128 to 88 bytes (!) and shaves
200MB out of #36799.

6 years agoAuto merge of #44786 - thombles:tk/i41314, r=petrochenkov
bors [Sun, 24 Sep 2017 09:02:19 +0000 (09:02 +0000)]
Auto merge of #44786 - thombles:tk/i41314, r=petrochenkov

Improve diagnostics when attempting to match tuple enum variant with struct pattern

Adds an extra note as below to explain that a tuple pattern was probably intended.

```
error[E0026]: variant `X::Y` does not have a field named `data`
  --> src/main.rs:18:16
   |
18 |         X::Y { data } => println!("The data is {}", data)
   |                ^^^^ variant `X::Y` does not have field `data`

error[E0027]: pattern does not mention field `0`
  --> src/main.rs:18:9
   |
18 |         X::Y { data } => println!("The data is {}", data)
   |         ^^^^^^^^^^^^^ missing field `0`
   |
   = note: trying to match a tuple variant with a struct variant pattern
```

Fixes #41314.

6 years agoAdd span labels for E0505 for MIR borrowck
Keith Yeung [Sat, 23 Sep 2017 18:52:53 +0000 (11:52 -0700)]
Add span labels for E0505 for MIR borrowck

6 years agoAuto merge of #44772 - michaelwoerister:new-graph, r=nikomatsakis
bors [Sun, 24 Sep 2017 03:55:23 +0000 (03:55 +0000)]
Auto merge of #44772 - michaelwoerister:new-graph, r=nikomatsakis

incr.comp.: Add new DepGraph implementation.

This commits does a few things:
1. It adds the new dep-graph implementation -- *in addition* to the old one. This way we can start testing the new implementation without switching all tests at once.
2. It persists the new dep-graph (which includes query result fingerprints) to the incr. comp. caching directory and also loads this data.
3. It removes support for loading fingerprints of metadata imported from other crates (except for when running autotests). This is not needed anymore with red/green. It could provide a performance advantage but that's yet to be determined. For now, as red/green is not fully implemented yet, the cross-crate incremental tests are disabled.

Note, this PR is based on top of soon-to-be-merged #44696 and only the last 4 commits are new:
```
- incr.comp.: Initial implemenation of append-only dep-graph. (c90147c)
- incr.comp.: Do some various cleanup. (8ce20c5)
- incr.comp.: Serialize and deserialize new DepGraph. (0e13c1a)
- incr.comp.: Remove support for loading metadata fingerprints. (270a134)
EDIT 2:
- incr.comp.: Make #[rustc_dirty/clean] test for fingerprint equality ... (d8f7ff9)
```
(EDIT: GH displays the commits in the wrong order for some reason)

Also note that this PR is expected to certainly result in performance regressions in the incr. comp. test cases, since we are adding quite a few things (a whole additional dep-graph, for example) without removing anything. End-to-end performance measurements will only make sense again after red/green is enabled and all the legacy tracking has been turned off.

EDIT 2: Pushed another commit that makes the `#[rustc_dirty]`/`#[rustc_clean]` based autotests compared query result fingerprints instead of testing `DepNode` existence.

6 years agoAuto merge of #44436 - MicroJoe:master, r=alexcrichton
bors [Sat, 23 Sep 2017 22:21:32 +0000 (22:21 +0000)]
Auto merge of #44436 - MicroJoe:master, r=alexcrichton

Add Duration::from_micros

This fixes #44400 that explains why it could be useful for embedded designs timing.

6 years agoAuto merge of #44765 - tamird:libc-shim, r=alexcrichton
bors [Sat, 23 Sep 2017 19:16:11 +0000 (19:16 +0000)]
Auto merge of #44765 - tamird:libc-shim, r=alexcrichton

Trim and document libc shim

(hopefully) easy part of #44515.

r? @alexcrichton

6 years agoincr.comp.: Remove out-dated unit test and unnecessary assertion.
Michael Woerister [Fri, 22 Sep 2017 14:59:31 +0000 (16:59 +0200)]
incr.comp.: Remove out-dated unit test and unnecessary assertion.

6 years agoincr.comp.: Make #[rustc_dirty/clean] test for fingerprint equality instead of DepNod...
Michael Woerister [Fri, 22 Sep 2017 13:07:51 +0000 (15:07 +0200)]
incr.comp.: Make #[rustc_dirty/clean] test for fingerprint equality instead of DepNode existence.

6 years agoincr.comp.: Remove support for loading metadata fingerprints.
Michael Woerister [Fri, 22 Sep 2017 11:03:15 +0000 (13:03 +0200)]
incr.comp.: Remove support for loading metadata fingerprints.

6 years agoincr.comp.: Serialize and deserialize new DepGraph
Michael Woerister [Fri, 22 Sep 2017 11:00:42 +0000 (13:00 +0200)]
incr.comp.: Serialize and deserialize new DepGraph

6 years agoincr.comp.: Do some various cleanup.
Michael Woerister [Fri, 22 Sep 2017 10:57:33 +0000 (12:57 +0200)]
incr.comp.: Do some various cleanup.

6 years agoincr.comp.: Initial implemenation of append-only dep-graph.
Michael Woerister [Mon, 21 Aug 2017 14:44:05 +0000 (16:44 +0200)]
incr.comp.: Initial implemenation of append-only dep-graph.

6 years agoupdate `fn_must_use` UI test to exercise nonprimitive comparisons
Zack M. Davis [Sat, 23 Sep 2017 17:11:39 +0000 (10:11 -0700)]
update `fn_must_use` UI test to exercise nonprimitive comparisons

6 years agoFix some tests with no llvm build
bjorn3 [Sat, 23 Sep 2017 16:15:58 +0000 (18:15 +0200)]
Fix some tests with no llvm build

6 years agoFix error
bjorn3 [Sat, 23 Sep 2017 14:50:05 +0000 (16:50 +0200)]
Fix error

6 years agoRemove now unused dependency on flate2 from rustc_driver
bjorn3 [Sat, 23 Sep 2017 13:27:54 +0000 (15:27 +0200)]
Remove now unused dependency on flate2 from rustc_driver

6 years agoRemove leftover
bjorn3 [Sat, 23 Sep 2017 13:26:34 +0000 (15:26 +0200)]
Remove leftover

6 years agoFix tidy errors
bjorn3 [Sat, 23 Sep 2017 13:23:40 +0000 (15:23 +0200)]
Fix tidy errors

6 years agoAuto merge of #43870 - GuillaumeGomez:deref-suggestion, r=nikomatsakis
bors [Sat, 23 Sep 2017 13:13:15 +0000 (13:13 +0000)]
Auto merge of #43870 - GuillaumeGomez:deref-suggestion, r=nikomatsakis

Add deref suggestion

Fixes #34562.

6 years agoRemove build_diagnostic_array hack
bjorn3 [Sat, 23 Sep 2017 13:10:00 +0000 (15:10 +0200)]
Remove build_diagnostic_array hack

6 years agoFix some nits
bjorn3 [Sat, 23 Sep 2017 13:00:49 +0000 (15:00 +0200)]
Fix some nits

6 years agoFix for upstream changes
bjorn3 [Sat, 23 Sep 2017 12:46:15 +0000 (14:46 +0200)]
Fix for upstream changes

6 years agoFix warning position in rustdoc code blocks
Guillaume Gomez [Sat, 23 Sep 2017 12:06:35 +0000 (14:06 +0200)]
Fix warning position in rustdoc code blocks

6 years agoadd some comments
Niko Matsakis [Fri, 22 Sep 2017 14:37:46 +0000 (10:37 -0400)]
add some comments

6 years agoMerge rustc_trans_trait into rustc_trans_utils
bjorn3 [Mon, 18 Sep 2017 16:12:07 +0000 (18:12 +0200)]
Merge rustc_trans_trait into rustc_trans_utils

6 years agoMove NoLlvmMetadataLoader to rustc_trans_traits
bjorn3 [Mon, 18 Sep 2017 15:37:57 +0000 (17:37 +0200)]
Move NoLlvmMetadataLoader to rustc_trans_traits

6 years agoAdd TransCrate trait
bjorn3 [Sat, 16 Sep 2017 15:27:29 +0000 (17:27 +0200)]
Add TransCrate trait

6 years ago[WIP] Less hacky way of supporting dylibs
bjorn3 [Sun, 10 Sep 2017 15:56:48 +0000 (17:56 +0200)]
[WIP] Less hacky way of supporting dylibs

6 years agoFix rustc_trans_utils::find_exported_symbols
bjorn3 [Sun, 10 Sep 2017 12:17:54 +0000 (14:17 +0200)]
Fix rustc_trans_utils::find_exported_symbols

Fix denied warnings

6 years agoAuto merge of #44747 - Zoxc:gen-switch-unreachable, r=eddyb
bors [Sat, 23 Sep 2017 10:56:14 +0000 (10:56 +0000)]
Auto merge of #44747 - Zoxc:gen-switch-unreachable, r=eddyb

Make the fallback of generator resumption be unreachable instead of using return

6 years agoDont do no-trans for llvm enabled builds
bjorn3 [Sat, 2 Sep 2017 10:27:28 +0000 (12:27 +0200)]
Dont do no-trans for llvm enabled builds

6 years agoAllow building stage 2 compiler libraries
bjorn3 [Sat, 26 Aug 2017 15:31:32 +0000 (17:31 +0200)]
Allow building stage 2 compiler libraries

6 years agoAllow writing metadata without llvm
bjorn3 [Sun, 13 Aug 2017 16:53:50 +0000 (18:53 +0200)]
Allow writing metadata without llvm

6 years agoUI unit test for note when matching tuple enum with struct pattern
Thomas Karpiniec [Sat, 23 Sep 2017 10:49:28 +0000 (20:49 +1000)]
UI unit test for note when matching tuple enum with struct pattern

6 years agoAdd span label to E0381 for MIR borrowck
Keith Yeung [Sat, 23 Sep 2017 09:25:17 +0000 (02:25 -0700)]
Add span label to E0381 for MIR borrowck

6 years agoAuto merge of #44633 - petrochenkov:priv2, r=nikomatsakis
bors [Sat, 23 Sep 2017 07:30:03 +0000 (07:30 +0000)]
Auto merge of #44633 - petrochenkov:priv2, r=nikomatsakis

Record semantic types for all syntactic types in bodies

... and use recorded types in type privacy checking (types are recorded after inference, so there are no `_`s left).
Also use `hir_ty_to_ty` for types in signatures in type privacy checking.

This could also be potentially useful for save-analysis and diagnostics.

Fixes https://github.com/rust-lang/rust/pull/42125#issuecomment-305987755
r? @eddyb

6 years agoDiagnostic note when matching tuple enum with struct pattern
Thomas Karpiniec [Sat, 23 Sep 2017 06:04:03 +0000 (16:04 +1000)]
Diagnostic note when matching tuple enum with struct pattern

6 years agoAuto merge of #44784 - frewsxcv:rollup, r=frewsxcv
bors [Sat, 23 Sep 2017 05:10:53 +0000 (05:10 +0000)]
Auto merge of #44784 - frewsxcv:rollup, r=frewsxcv

Rollup of 14 pull requests

- Successful merges: #44554, #44648, #44658, #44712, #44717, #44726, #44745, #44746, #44749, #44759, #44770, #44773, #44776, #44778
- Failed merges:

6 years agoRollup merge of #44778 - lucasem:master, r=estebank
Corey Farwell [Sat, 23 Sep 2017 04:29:23 +0000 (00:29 -0400)]
Rollup merge of #44778 - lucasem:master, r=estebank

std::sync::RwLock docs improvement

Addresses the `RwLock` part of #29377.
r? @steveklabnik

Added examples, links to types, and a small comparison between RwLock and Mutex.

6 years agoRollup merge of #44776 - spastorino:add_forge, r=nikomatsakis
Corey Farwell [Sat, 23 Sep 2017 04:29:22 +0000 (00:29 -0400)]
Rollup merge of #44776 - spastorino:add_forge, r=nikomatsakis

Link to Rust forge from CONTRIBUTING.md

6 years agoRollup merge of #44773 - GuillaumeGomez:arc-docs, r=@QuietMisdreavus
Corey Farwell [Sat, 23 Sep 2017 04:29:21 +0000 (00:29 -0400)]
Rollup merge of #44773 - GuillaumeGomez:arc-docs, r=@QuietMisdreavus

Add missing links for Arc

r? @rust-lang/docs

6 years agoRollup merge of #44770 - dtolnay:borrowed, r=sfackler
Corey Farwell [Sat, 23 Sep 2017 04:29:20 +0000 (00:29 -0400)]
Rollup merge of #44770 - dtolnay:borrowed, r=sfackler

Less confusing placeholder when RefCell is exclusively borrowed

Based on ExpHP's comment in [*RefCell.borrow_mut get strange result*](https://users.rust-lang.org/t/refcell-borrow-mut-get-strange-result/12994):

> it would perhaps be nicer if it didn't put something that could be misinterpreted as a valid string value

The previous Debug implementation would show:

    RefCell { value: "<borrowed>" }

The new one is:

    RefCell { value: <borrowed> }

6 years agoRollup merge of #44759 - durka:patch-43, r=steveklabnik
Corey Farwell [Sat, 23 Sep 2017 04:29:19 +0000 (00:29 -0400)]
Rollup merge of #44759 - durka:patch-43, r=steveklabnik

improve english in create_dir_all docs

Just minor nitpicking.

6 years agoRollup merge of #44749 - zilbuz:issue-44596/E0503, r=pnkfelix
Corey Farwell [Sat, 23 Sep 2017 04:29:18 +0000 (00:29 -0400)]
Rollup merge of #44749 - zilbuz:issue-44596/E0503, r=pnkfelix

MIR-borrowck: Adding notes to E0503

This PR adds notes to the MIR borrowck error E0503.

Part of #44596

6 years agoRollup merge of #44746 - topecongiro:span-for-unary, r=petrochenkov
Corey Farwell [Sat, 23 Sep 2017 04:29:17 +0000 (00:29 -0400)]
Rollup merge of #44746 - topecongiro:span-for-unary, r=petrochenkov

Include unary operator to span for ExprKind::Unary

6 years agoRollup merge of #44745 - alexcrichton:no-delim-none, r=estebank
Corey Farwell [Sat, 23 Sep 2017 04:29:16 +0000 (00:29 -0400)]
Rollup merge of #44745 - alexcrichton:no-delim-none, r=estebank

rustc: Don't use DelimToken::None if possible

This commit fixes a regression from #44601 where lowering attribute to HIR now
involves expanding interpolated tokens to their actual tokens. In that commit
all interpolated tokens were surrounded with a `DelimToken::None` group of
tokens, but this ended up causing regressions like #44730 where the various
attribute parsers in `syntax/attr.rs` weren't ready to cope with
`DelimToken::None`. Instead of fixing the parser in `attr.rs` this commit
instead opts to just avoid the `DelimToken::None` in the first place, ensuring
that the token stream should look the same as it did before where possible.

Closes #44730