]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agofix bad logic
Esteban Küber [Thu, 7 Mar 2019 16:09:41 +0000 (08:09 -0800)]
fix bad logic

5 years agoKeep current behavior while accepting error count
Esteban Küber [Thu, 7 Mar 2019 09:54:53 +0000 (01:54 -0800)]
Keep current behavior while accepting error count

5 years agofix bad use of with_emitter
Esteban Küber [Thu, 7 Mar 2019 08:27:41 +0000 (00:27 -0800)]
fix bad use of with_emitter

5 years agoFix incorrect default
Esteban Kuber [Thu, 7 Mar 2019 03:57:04 +0000 (19:57 -0800)]
Fix incorrect default

5 years agoMake `-Z treat-err-as-bug` take a number of errors to be emitted
Esteban Küber [Thu, 7 Mar 2019 03:49:39 +0000 (19:49 -0800)]
Make `-Z treat-err-as-bug` take a number of errors to be emitted

`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first
error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to
panic after 3 errors have been reported.

5 years agoAuto merge of #58423 - nox:relax-bounds-buf-reader, r=dtolnay
bors [Tue, 5 Mar 2019 05:40:16 +0000 (05:40 +0000)]
Auto merge of #58423 - nox:relax-bounds-buf-reader, r=dtolnay

Relax Read bounds on a bunch of BufReader<R> methods

5 years agoAuto merge of #58380 - estebank:missing-match-pats, r=zackmdavis
bors [Mon, 4 Mar 2019 04:46:38 +0000 (04:46 +0000)]
Auto merge of #58380 - estebank:missing-match-pats, r=zackmdavis

Point at enum definition when match patterns are not exhaustive

```
error[E0004]: non-exhaustive patterns: type `X` is non-empty
 --> file.rs:9:11
  |
1 | / enum X {
2 | |     A,
  | |     - variant not covered
3 | |     B,
  | |     - variant not covered
4 | |     C,
  | |     - variant not covered
5 | | }
  | |_- `X` defined here
...
9 |       match x {
  |             ^
  |
  = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms

error[E0004]: non-exhaustive patterns: `B` and `C` not covered
  --> file.rs:11:11
   |
1  | / enum X {
2  | |     A,
3  | |     B,
4  | |     C,
   | |     - not covered
5  | | }
   | |_- `X` defined here
...
11 |       match x {
   |             ^ patterns `C` not covered
```

When a match expression doesn't have patterns covering every variant,
point at the enum's definition span. On a best effort basis, point at the
variant(s) that are missing. This does not handle the case when the missing
pattern is due to a field's enum variants:

```
enum E1 {
    A,
    B,
    C,
}
enum E2 {
    A(E1),
    B,
}
fn foo() {
    match E2::A(E1::A) {
        E2::A(E1::B) => {}
        E2::B => {}
    }
    //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled
}
```

Unify look between match with no arms and match with some missing patterns.

Fix #37518.

5 years agoAuto merge of #58807 - Xanewok:update-clippy, r=Xanewok
bors [Mon, 4 Mar 2019 01:46:37 +0000 (01:46 +0000)]
Auto merge of #58807 - Xanewok:update-clippy, r=Xanewok

Update Clippy

Should fix the fallout caused by https://github.com/rust-lang/rust/pull/58321 (still testing it locally).

r? @oli-obk

5 years agoUpdate Clippy
Igor Matuszewski [Sun, 3 Mar 2019 13:48:03 +0000 (14:48 +0100)]
Update Clippy

5 years agoAuto merge of #58505 - schomatis:fix/nll/remove-live-var, r=matthewjasper
bors [Sun, 3 Mar 2019 22:49:16 +0000 (22:49 +0000)]
Auto merge of #58505 - schomatis:fix/nll/remove-live-var, r=matthewjasper

[NLL] Remove `LiveVar`

The `LiveVar` type (and related) made it harder to reason about the code. It seemed as an abstraction that didn't bring any useful concept to the reader (when transitioning from the RFC theory to the actual implementation code).

It achieved a compactness in the vectors storing the def/use/drop information that was related only to the `LocalUseMap`. This PR went in the other direction and favored time over memory (but this decision can be easily reverted to the other side without reintroducing `LiveVar`).

What this PR aims at is to clarify that there's no significant transformation between the MIR `Local` and the `LiveVar` (now refactored as `live_locals: Vec<Local>`): we're just filtering (not mapping) the entire group of `Local`s into a meaningful subset that we should perform the liveness analysis on.

As a side note, there is no guarantee that the liveness analysis is performed only on (what the code calls) "live" variables, if the NLL facts are requested it will be performed on *any* variable so there can't be any assumptions on that regard. (Still, this PR didn't change the general naming convention to reduce the number of changes here and streamline the review process).

**Acceptance criteria:** This PR attempts to do only a minor refactoring and not to change the logic so it can't have any performance impact, particularly, it can't lose any of the significant performance improvement achieved in the great work done in https://github.com/rust-lang/rust/pull/52115.

r? @nikomatsakis

5 years agoAuto merge of #58425 - wesleywiser:more_profiler_changes, r=michaelwoerister
bors [Sun, 3 Mar 2019 19:48:12 +0000 (19:48 +0000)]
Auto merge of #58425 - wesleywiser:more_profiler_changes, r=michaelwoerister

[self-profiler] Make the profiler faster/more efficient

Related to #58372

r? @michaelwoerister

5 years agoAuto merge of #58673 - matthewjasper:typeck-ptr-coercions, r=pnkfelix
bors [Sun, 3 Mar 2019 16:46:12 +0000 (16:46 +0000)]
Auto merge of #58673 - matthewjasper:typeck-ptr-coercions, r=pnkfelix

[NLL] Type check operations with pointer types

It seems these were forgotten about. Moving to `Rvalue::AddressOf` simplifies the coercions from references, but I want this to be fixed as soon as possible.

r? @pnkfelix

5 years agoUse FxHashMap
Wesley Wiser [Mon, 25 Feb 2019 23:46:53 +0000 (18:46 -0500)]
Use FxHashMap

5 years agoReduce the size of events by using a u64 instead of Instant
Wesley Wiser [Wed, 13 Feb 2019 10:33:51 +0000 (05:33 -0500)]
Reduce the size of events by using a u64 instead of Instant

Part of #58372

5 years agoRemove profiler output and replace with a raw event dump
Wesley Wiser [Mon, 11 Feb 2019 23:11:43 +0000 (18:11 -0500)]
Remove profiler output and replace with a raw event dump

Related to #58372

5 years agoWrap the self-profiler in an `Arc<Mutex<>>`
Wesley Wiser [Sun, 10 Feb 2019 22:23:00 +0000 (17:23 -0500)]
Wrap the self-profiler in an `Arc<Mutex<>>`

This will allow us to send it across threads and measure things like
LLVM time.

5 years agoAuto merge of #58879 - spastorino:update_miri, r=oli-obk
bors [Sun, 3 Mar 2019 11:42:39 +0000 (11:42 +0000)]
Auto merge of #58879 - spastorino:update_miri, r=oli-obk

Update miri

Related to #58841

r? @RalfJung

5 years agoAuto merge of #58866 - kennytm:rollup, r=kennytm
bors [Sun, 3 Mar 2019 08:47:51 +0000 (08:47 +0000)]
Auto merge of #58866 - kennytm:rollup, r=kennytm

Rollup of 14 pull requests

Successful merges:

 - #58730 (Have all methods of Filter and FilterMap use internal iteration)
 - #58780 (ManuallyDrop != MaybeUninit)
 - #58782 (Replace `s` with `self` in docs for str methods taking self.)
 - #58785 (allow specifying attributes for tool lints)
 - #58802 (Ensure `record_layout_for_printing()` is inlined.)
 - #58821 (Fixed a syntax error in the pin docs)
 - #58830 (tidy: deny(rust_2018_idioms))
 - #58832 (Revert switching to GCP on AppVeyor)
 - #58833 (tools/rustbook: deny(rust_2018_idioms))
 - #58835 (tools/remote-test-{client,server}: deny(rust_2018_idioms))
 - #58838 (Fix typo in Vec#resize_with documentation)
 - #58842 (Forbid duplicating Cargo as a dependency)
 - #58852 (Update toolchain to build NetBSD release)
 - #58865 (Fix C-variadic function printing)

5 years agoRollup merge of #58865 - dlrobertson:fix-varargs, r=alexreg
kennytm [Sun, 3 Mar 2019 05:56:57 +0000 (13:56 +0800)]
Rollup merge of #58865 - dlrobertson:fix-varargs, r=alexreg

Fix C-variadic function printing

There is no longer a need to append the string `", ..."` to a functions
args as `...` is parsed as an argument and will appear in the functions
arguments.

Fixes: #58853
5 years agoAuto merge of #58793 - Mark-Simulacrum:master-next, r=alexcrichton
bors [Sun, 3 Mar 2019 05:51:44 +0000 (05:51 +0000)]
Auto merge of #58793 - Mark-Simulacrum:master-next, r=alexcrichton

Bootstrap compiler update for 1.35 release

r? @alexcrichton

5 years agoCall clang and llvm-objdump with correct library path
Mark Rousskov [Sun, 3 Mar 2019 05:27:26 +0000 (22:27 -0700)]
Call clang and llvm-objdump with correct library path

5 years agoAuto merge of #58464 - jethrogb:jb/std-test-panic-output, r=alexcrichton
bors [Sun, 3 Mar 2019 03:00:16 +0000 (03:00 +0000)]
Auto merge of #58464 - jethrogb:jb/std-test-panic-output, r=alexcrichton

Use the correct stderr when testing libstd

When compiling the unit tests for libstd, there are two copies of `std` in existence, see [lib.rs](https://github.com/rust-lang/rust/blob/919cf42/src/libstd/lib.rs#L335-L341). This means there are two copies of everything, including thread local variable definitions. Before this PR, it's possible that libtest would configure a stderr sink in one of those copies, whereas the panic logic would inspect the sink in the other copy, resulting in libtest missing the relevant panic message. This PR makes sure that when testing, the panic logic always accesses the stderr sink from “realstd”, using the same logic that libtest uses.

5 years agoNit
Alexander Regueiro [Sat, 2 Mar 2019 15:16:36 +0000 (15:16 +0000)]
Nit

5 years agoReword error message
Esteban Küber [Sun, 3 Mar 2019 00:44:00 +0000 (16:44 -0800)]
Reword error message

5 years agoUse anonymous explicit lifetimes
Esteban Küber [Mon, 11 Feb 2019 19:22:46 +0000 (11:22 -0800)]
Use anonymous explicit lifetimes

5 years agoPoint at enum definition when match patterns are not exhaustive
Esteban Küber [Sun, 10 Feb 2019 13:12:00 +0000 (05:12 -0800)]
Point at enum definition when match patterns are not exhaustive

```
error[E0004]: non-exhaustive patterns: type `X` is non-empty
 --> file.rs:9:11
  |
1 | / enum X {
2 | |     A,
  | |     - variant not covered
3 | |     B,
  | |     - variant not covered
4 | |     C,
  | |     - variant not covered
5 | | }
  | |_- `X` defined here
...
9 |       match x {
  |             ^
  |
  = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms

error[E0004]: non-exhaustive patterns: `B` and `C` not covered
  --> file.rs:11:11
   |
1  | / enum X {
2  | |     A,
3  | |     B,
4  | |     C,
   | |     - not covered
5  | | }
   | |_- `X` defined here
...
11 |       match x {
   |             ^ patterns `C` not covered
```

When a match expression doesn't have patterns covering every variant,
point at the enum's definition span. On a best effort basis, point at the
variant(s) that are missing. This does not handle the case when the missing
pattern is due to a field's enum variants:

```
enum E1 {
    A,
    B,
    C,
}
enum E2 {
    A(E1),
    B,
}
fn foo() {
    match E2::A(E1::A) {
        E2::A(E1::B) => {}
        E2::B => {}
    }
    //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled
}
```

Unify look between match with no arms and match with some missing patterns.

Fix #37518.

5 years agoUpdate miri
Santiago Pastorino [Sat, 2 Mar 2019 19:58:38 +0000 (16:58 -0300)]
Update miri

5 years agoAuto merge of #58836 - ljedrz:begone_NodeId, r=Zoxc
bors [Sat, 2 Mar 2019 19:07:22 +0000 (19:07 +0000)]
Auto merge of #58836 - ljedrz:begone_NodeId, r=Zoxc

Remove NodeId from even more HIR nodes

The next iteration of HirIdification (#57578).

Removes `NodeId` from:

- [x] `StructField`
- [x] `ForeignItem`
- [x] `Item`
- [x] `Pat`
- [x] `FieldPat`
- [x] `VariantData`
- [x] `ImplItemId` (replaces it with `HirId`)
- [x] `TraitItemId` (replaces it with `HirId`)

5 years agoBootstrap compiler update for 1.35 release
Mark Rousskov [Wed, 27 Feb 2019 23:58:12 +0000 (16:58 -0700)]
Bootstrap compiler update for 1.35 release

5 years agoFix C-variadic function printing
Dan Robertson [Sat, 2 Mar 2019 03:14:29 +0000 (03:14 +0000)]
Fix C-variadic function printing

There is no longer a need to append the string `", ..."` to a functions
args as `...` is parsed as an argument and will appear in the functions
arguments.

5 years agoRollup merge of #58842 - mati865:53005, r=alexcrichton
kennytm [Sat, 2 Mar 2019 09:39:26 +0000 (17:39 +0800)]
Rollup merge of #58842 - mati865:53005, r=alexcrichton

Forbid duplicating Cargo as a dependency

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

5 years agoRollup merge of #58852 - alexcrichton:update-netbsd, r=Mark-Simulacrum
kennytm [Sat, 2 Mar 2019 06:55:26 +0000 (14:55 +0800)]
Rollup merge of #58852 - alexcrichton:update-netbsd, r=Mark-Simulacrum

Update toolchain to build NetBSD release

This allows us to remove the "allow old toolchains" flag we pass to
LLVM, ensuring that we'll be up to date when LLVM needs us to be!

This is a follow-up from https://github.com/rust-lang/rust/pull/58408 where NetBSD was explicitly whitelisted to allow older toolchains.

5 years agoRollup merge of #58838 - jens1o:patch-1, r=Centril
kennytm [Sat, 2 Mar 2019 06:55:24 +0000 (14:55 +0800)]
Rollup merge of #58838 - jens1o:patch-1, r=Centril

Fix typo in Vec#resize_with documentation

5 years agoRollup merge of #58835 - Centril:rust_2018_idioms-remote-test, r=oli-obk
kennytm [Sat, 2 Mar 2019 06:55:23 +0000 (14:55 +0800)]
Rollup merge of #58835 - Centril:rust_2018_idioms-remote-test, r=oli-obk

tools/remote-test-{client,server}: deny(rust_2018_idioms)

r? @oli-obk

(+ tiny amount of cleanup)

5 years agoRollup merge of #58833 - Centril:rust_2018_idioms-rustbook, r=oli-obk
kennytm [Sat, 2 Mar 2019 06:55:22 +0000 (14:55 +0800)]
Rollup merge of #58833 - Centril:rust_2018_idioms-rustbook, r=oli-obk

tools/rustbook: deny(rust_2018_idioms)

r? @oli-obk

5 years agoRollup merge of #58832 - pietroalbini:appveyor-hyperv, r=kennytm
kennytm [Sat, 2 Mar 2019 06:55:20 +0000 (14:55 +0800)]
Rollup merge of #58832 - pietroalbini:appveyor-hyperv, r=kennytm

Revert switching to GCP on AppVeyor

r? @alexcrichton

5 years agoRollup merge of #58830 - Centril:rust_2018_idioms-tidy, r=oli-obk
kennytm [Sat, 2 Mar 2019 06:55:19 +0000 (14:55 +0800)]
Rollup merge of #58830 - Centril:rust_2018_idioms-tidy, r=oli-obk

tidy: deny(rust_2018_idioms)

r? @oli-obk

5 years agoRollup merge of #58821 - alex:patch-1, r=Centril
kennytm [Sat, 2 Mar 2019 06:55:16 +0000 (14:55 +0800)]
Rollup merge of #58821 - alex:patch-1, r=Centril

Fixed a syntax error in the pin docs

5 years agoRollup merge of #58802 - nnethercote:inline-record_layout, r=oli-obk
kennytm [Sat, 2 Mar 2019 06:55:15 +0000 (14:55 +0800)]
Rollup merge of #58802 - nnethercote:inline-record_layout, r=oli-obk

Ensure `record_layout_for_printing()` is inlined.

This reduces instruction counts for the `ctfe-stress-2` benchmark by
about 1%.

r? @oli-obk

5 years agoRollup merge of #58785 - euclio:tool-lint-attrs, r=estebank
kennytm [Sat, 2 Mar 2019 06:55:14 +0000 (14:55 +0800)]
Rollup merge of #58785 - euclio:tool-lint-attrs, r=estebank

allow specifying attributes for tool lints

Needed for clippy to fix `unused_doc_comments` warnings that will be exposed by #57882 (and thus unblock it).

5 years agoRollup merge of #58782 - tspiteri:str-escape-self, r=kennytm
kennytm [Sat, 2 Mar 2019 06:55:12 +0000 (14:55 +0800)]
Rollup merge of #58782 - tspiteri:str-escape-self, r=kennytm

Replace `s` with `self` in docs for str methods taking self.

Cherry picked from PR #58596 which is blocked on some intra-doc link bugs.

5 years agoRollup merge of #58780 - RalfJung:manually-drop, r=nagisa
kennytm [Sat, 2 Mar 2019 06:55:11 +0000 (14:55 +0800)]
Rollup merge of #58780 - RalfJung:manually-drop, r=nagisa

ManuallyDrop != MaybeUninit

Cc @Centril

5 years agoRollup merge of #58730 - timvermeulen:internal_iteration, r=scottmcm
kennytm [Sat, 2 Mar 2019 06:55:06 +0000 (14:55 +0800)]
Rollup merge of #58730 - timvermeulen:internal_iteration, r=scottmcm

Have all methods of Filter and FilterMap use internal iteration

This PR changes `Filter::{next, next_back, count}` and `FilterMap::{next, next_back}` to all use internal iteration. The `next` and `next_back` methods are changed to directly forward to `try_for_each` and `try_rfold` respectively, using `Result` as the `Try` type. I think that's okay? Alternatively, I could change their implementations to use `LoopState` instead if there's any benefit in doing so.

r? @scottmcm

5 years agoAuto merge of #58216 - pitdicker:sqos_flags, r=alexcrichton
bors [Sat, 2 Mar 2019 13:16:12 +0000 (13:16 +0000)]
Auto merge of #58216 - pitdicker:sqos_flags, r=alexcrichton

 Set secure flags when opening a named pipe on Windows

Fixes https://github.com/rust-lang/rust/issues/42036, see also the previous attempt in https://github.com/rust-lang/rust/pull/44556.

Whether this is correct depends on if it is somehow possible to create a symlink to a named pipe, outside the named pipe filesystem (NPFS). But as far as I can tell that should be impossible.

Also fixes that `security_qos_flags(SECURITY_ANONYMOUS)` does not set the `SECURITY_SQOS_PRESENT` flag, and the incorrect documentation about the default value of `security_qos_flags`.

5 years agoAuto merge of #58077 - Nemo157:generator-state-debug-info, r=Zoxc
bors [Sat, 2 Mar 2019 08:40:14 +0000 (08:40 +0000)]
Auto merge of #58077 - Nemo157:generator-state-debug-info, r=Zoxc

Add debug-info to access variables from generator state

5 years agodriver: fix test
ljedrz [Fri, 1 Mar 2019 14:13:30 +0000 (15:13 +0100)]
driver: fix test

5 years agohir: HirIdify Impl&TraitItemId
ljedrz [Fri, 1 Mar 2019 09:28:13 +0000 (10:28 +0100)]
hir: HirIdify Impl&TraitItemId

5 years agohir: remove NodeId from VariantData
ljedrz [Fri, 1 Mar 2019 08:52:20 +0000 (09:52 +0100)]
hir: remove NodeId from VariantData

5 years agohir: remove NodeId from Pat and FieldPat
ljedrz [Fri, 1 Mar 2019 08:31:58 +0000 (09:31 +0100)]
hir: remove NodeId from Pat and FieldPat

5 years agohir: remove NodeId from Item
ljedrz [Wed, 27 Feb 2019 16:35:24 +0000 (17:35 +0100)]
hir: remove NodeId from Item

5 years agohir: remove NodeId from ForeignItem
ljedrz [Wed, 27 Feb 2019 15:12:35 +0000 (16:12 +0100)]
hir: remove NodeId from ForeignItem

5 years agohir: remove NodeId from StructField
ljedrz [Wed, 27 Feb 2019 14:56:59 +0000 (15:56 +0100)]
hir: remove NodeId from StructField

5 years agomiddle & privacy: partially HirIdify
ljedrz [Wed, 27 Feb 2019 14:56:24 +0000 (15:56 +0100)]
middle & privacy: partially HirIdify

5 years agoAuto merge of #57202 - matthewjasper:nll-typeck-promoteds, r=pnkfelix
bors [Sat, 2 Mar 2019 04:39:02 +0000 (04:39 +0000)]
Auto merge of #57202 - matthewjasper:nll-typeck-promoteds, r=pnkfelix

Include bounds from promoted constants in NLL

Previously a promoted function wouldn't have its bound propagated out to
the main function body.

When we visit a promoted, we now type check the MIR of the promoted
and transfer any lifetime constraints to back to the main function's MIR.

Fixes #57170

r? @nikomatsakis

5 years agoAuto merge of #56946 - Zoxc:jobserver, r=nikomatsakis
bors [Sat, 2 Mar 2019 01:44:55 +0000 (01:44 +0000)]
Auto merge of #56946 - Zoxc:jobserver, r=nikomatsakis

Add support for using a jobserver with Rayon

The Rayon changes are here: https://github.com/Zoxc/rayon/pull/2

cc @alexcrichton
r? @nikomatsakis

5 years agoAuto merge of #58800 - ehuss:update-books, r=Centril
bors [Fri, 1 Mar 2019 22:12:27 +0000 (22:12 +0000)]
Auto merge of #58800 - ehuss:update-books, r=Centril

Update edition-guide

15 commits in 419edb885ec1a98c0747b3907003d79e3e6b93a9..5f3cc2a5618700efcde3bc00799744f21fa9ad2e
2018-12-04 16:43:38 -0500 to 2019-02-27 20:11:50 -0800
- Migrate to mdbook 0.2. (rust-lang-nursery/edition-guide#152)
- Remove automatic deployment. (rust-lang-nursery/edition-guide#151)
- Fix issue with rust's linkchecker and mdbook. (rust-lang-nursery/edition-guide#147)
- Fix test now that overflowing_literals is rejected in all editions. (rust-lang-nursery/edition-guide#148)
- overflowing_literals is deny on all editions (rust-lang-nursery/edition-guide#146)
- Update for uniform_path stabilization. (rust-lang-nursery/edition-guide#141)
- Add example to rustup to show overriding to specific version (rust-lang-nursery/edition-guide#144)
- Update for anonymous-lifetime stabilization. (rust-lang-nursery/edition-guide#142)
- Add minimum Rust version for Kleene operator (rust-lang-nursery/edition-guide#137)
- Add 2018-specific changes. (rust-lang-nursery/edition-guide#130)
- aborting-on-panic.md: Typo in example config (rust-lang-nursery/edition-guide#125)
- Clarify uniform paths are not yet in Rust 2018 (rust-lang-nursery/edition-guide#124)
- update several version numbers
- Fixes outdated link (rust-lang-nursery/edition-guide#131)
- Fixed typo in transitioning page. (rust-lang-nursery/edition-guide#127)

5 years agoHandle type annotations in promoted MIR correctly
Matthew Jasper [Wed, 27 Feb 2019 22:21:49 +0000 (22:21 +0000)]
Handle type annotations in promoted MIR correctly

Type annotations are shared between the MIR of a function and the
promoted constants for that function, so keep them in the type checker
when we check the promoted MIR.

5 years agoRemove unnecessary parameter
Matthew Jasper [Thu, 17 Jan 2019 20:04:09 +0000 (20:04 +0000)]
Remove unnecessary parameter

5 years agoInclude bounds from promoted constants in NLL
Matthew Jasper [Thu, 17 Jan 2019 20:03:58 +0000 (20:03 +0000)]
Include bounds from promoted constants in NLL

Previously, a promoted that contains a function item wouldn't have the
function items bounds propagated to
the main function body.

5 years agoUpdate toolchain to build NetBSD release
Alex Crichton [Fri, 1 Mar 2019 18:34:08 +0000 (10:34 -0800)]
Update toolchain to build NetBSD release

This allows us to remove the "allow old toolchains" flag we pass to
LLVM, ensuring that we'll be up to date when LLVM needs us to be!

5 years agoAuto merge of #58754 - ljedrz:I_hate_NodeIds, r=Zoxc
bors [Fri, 1 Mar 2019 15:36:13 +0000 (15:36 +0000)]
Auto merge of #58754 - ljedrz:I_hate_NodeIds, r=Zoxc

Remove NodeId from more HIR nodes

The next iteration of HirIdification (#57578).

Removes `NodeId` from:

- [x] `Stmt`
- [x] `Local`
- [x] `Field`
- [x] `AnonConst`
- [x] `TraitItem`
- [x] `ImplItem`
- [x] `TypeBinding`
- [x] `Arg`
- [x] `TraitRef`
- [x] `VisibilityKind`

It will most probably break clippy again; I'd appreciate a **delegate** again if/when it is good to go so I can attach a clippy fix later.

r? @Zoxc

5 years agoForbid duplicating Cargo as a dependency
Mateusz Mikuła [Fri, 1 Mar 2019 14:06:14 +0000 (15:06 +0100)]
Forbid duplicating Cargo as a dependency

5 years agoFix typo in Vec#resize_with documentation
Jens Hausdorf [Fri, 1 Mar 2019 12:19:00 +0000 (13:19 +0100)]
Fix typo in Vec#resize_with documentation

5 years agotools/remote-test-{client,server}: deny(rust_2018_idioms)
Mazdak Farrokhzad [Fri, 1 Mar 2019 10:23:25 +0000 (11:23 +0100)]
tools/remote-test-{client,server}: deny(rust_2018_idioms)

5 years agohir: remove NodeId from VisibilityKind
ljedrz [Tue, 26 Feb 2019 14:55:01 +0000 (15:55 +0100)]
hir: remove NodeId from VisibilityKind

5 years agohir: remove NodeId from TraitRef
ljedrz [Tue, 26 Feb 2019 14:47:14 +0000 (15:47 +0100)]
hir: remove NodeId from TraitRef

5 years agohir: remove NodeId from Arg
ljedrz [Tue, 26 Feb 2019 14:33:07 +0000 (15:33 +0100)]
hir: remove NodeId from Arg

5 years agohir: remove NodeId from TypeBinding
ljedrz [Tue, 26 Feb 2019 14:27:56 +0000 (15:27 +0100)]
hir: remove NodeId from TypeBinding

5 years agohir: remove NodeId from ImplItem
ljedrz [Tue, 26 Feb 2019 14:11:59 +0000 (15:11 +0100)]
hir: remove NodeId from ImplItem

5 years agoty: HirIdify some lints
ljedrz [Tue, 26 Feb 2019 10:48:34 +0000 (11:48 +0100)]
ty: HirIdify some lints

5 years agohir: remove NodeId from TraitItem
ljedrz [Tue, 26 Feb 2019 10:04:58 +0000 (11:04 +0100)]
hir: remove NodeId from TraitItem

5 years agomiddle: HirIdify dead
ljedrz [Tue, 26 Feb 2019 10:01:11 +0000 (11:01 +0100)]
middle: HirIdify dead

5 years agohir: remove NodeId from AnonConst
ljedrz [Tue, 26 Feb 2019 09:24:50 +0000 (10:24 +0100)]
hir: remove NodeId from AnonConst

5 years agohir: remove NodeId from Field
ljedrz [Tue, 26 Feb 2019 09:10:54 +0000 (10:10 +0100)]
hir: remove NodeId from Field

5 years agohir: remove NodeId from Local
ljedrz [Tue, 26 Feb 2019 09:04:27 +0000 (10:04 +0100)]
hir: remove NodeId from Local

5 years agohir: remove NodeId from Stmt
ljedrz [Tue, 26 Feb 2019 07:56:00 +0000 (08:56 +0100)]
hir: remove NodeId from Stmt

5 years agotools/rustbook: deny(rust_2018_idioms)
Mazdak Farrokhzad [Fri, 1 Mar 2019 10:15:22 +0000 (11:15 +0100)]
tools/rustbook: deny(rust_2018_idioms)

5 years agoAuto merge of #58631 - spastorino:place2_1, r=oli-obk
bors [Fri, 1 Mar 2019 10:00:17 +0000 (10:00 +0000)]
Auto merge of #58631 - spastorino:place2_1, r=oli-obk

Put Local, Static and Promoted as one Base variant of Place

Related to #52708

The `Place` 2.0 representation use a `Base` variant for `Local`, `Static` and `Promoted` so we start making this change in the current `Place` to make the following steps simpler.

r? @oli-obk

5 years agoRevert "Auto merge of #58597 - pietroalbini:appveyor-gce, r=alexcrichton"
Pietro Albini [Fri, 1 Mar 2019 09:41:25 +0000 (10:41 +0100)]
Revert "Auto merge of #58597 - pietroalbini:appveyor-gce, r=alexcrichton"

This reverts commit fd42f24b0129b32d66f174510518c083cdcec3eb, reversing
changes made to 0e25a6829c66302dc06c351bb494774e3d075f77.

5 years agotidy: deny(rust_2018_idioms)
Mazdak Farrokhzad [Fri, 1 Mar 2019 09:14:09 +0000 (10:14 +0100)]
tidy: deny(rust_2018_idioms)

5 years agoAuto merge of #58689 - memoryruins:exclude_should_panic, r=oli-obk
bors [Fri, 1 Mar 2019 05:17:14 +0000 (05:17 +0000)]
Auto merge of #58689 - memoryruins:exclude_should_panic, r=oli-obk

Add unstable option to ignore should_panic tests

Add an unstable option `--exclude-should-panic` to libtest to workaround https://github.com/rust-lang/miri/issues/636

?r @oli-obk
cc @RalfJung

5 years agoPut Local, Static and Promoted as one Base variant of Place
Santiago Pastorino [Fri, 22 Feb 2019 04:24:03 +0000 (05:24 +0100)]
Put Local, Static and Promoted as one Base variant of Place

5 years agoUse the correct stderr when testing libstd
Jethro Beekman [Thu, 14 Feb 2019 12:36:01 +0000 (18:06 +0530)]
Use the correct stderr when testing libstd

5 years agoAuto merge of #58408 - alexcrichton:update-llvm, r=michaelwoerister
bors [Fri, 1 Mar 2019 01:22:15 +0000 (01:22 +0000)]
Auto merge of #58408 - alexcrichton:update-llvm, r=michaelwoerister

rustc: Update LLVM, remove dead wasm code

This commit updates the LLVM branch to the rebased version of the
upstream release/8.x branch. This includes a wasm patch which means that
the `rewrite_imports` pass in rustc is no longer needed (yay!) and we
can instead rely on `wasm-import-module`, an attribute we're already
emitting, to take care of all the work.

5 years agoUpdate Cargo.lock
John Kåre Alsaker [Wed, 27 Feb 2019 14:17:12 +0000 (15:17 +0100)]
Update Cargo.lock

5 years agoFix import
John Kåre Alsaker [Thu, 31 Jan 2019 19:09:43 +0000 (20:09 +0100)]
Fix import

5 years agoAddress comments
John Kåre Alsaker [Thu, 31 Jan 2019 16:00:06 +0000 (17:00 +0100)]
Address comments

5 years agoAdd support for using a jobserver with Rayon
John Kåre Alsaker [Tue, 18 Dec 2018 08:03:38 +0000 (09:03 +0100)]
Add support for using a jobserver with Rayon

5 years agoFixed a syntax error in the pin docs
Alex Gaynor [Thu, 28 Feb 2019 21:34:03 +0000 (16:34 -0500)]
Fixed a syntax error in the pin docs

5 years agoAuto merge of #58250 - Zoxc:rustc-interface-1, r=oli-obk
bors [Thu, 28 Feb 2019 21:02:12 +0000 (21:02 +0000)]
Auto merge of #58250 - Zoxc:rustc-interface-1, r=oli-obk

Introduce rustc_interface and move some methods there

Split out from https://github.com/rust-lang/rust/pull/56732

r? @oli-obk

5 years agoIntroduce rustc_interface and move some methods there
John Kåre Alsaker [Sat, 8 Dec 2018 19:30:23 +0000 (20:30 +0100)]
Introduce rustc_interface and move some methods there

5 years agoAuto merge of #57760 - dlrobertson:varargs1, r=alexreg
bors [Thu, 28 Feb 2019 15:00:25 +0000 (15:00 +0000)]
Auto merge of #57760 - dlrobertson:varargs1, r=alexreg

Support defining C compatible variadic functions

## Summary

Add support for defining C compatible variadic functions in unsafe rust with
`extern "C"` according to [RFC 2137].

## Details

### Parsing
When parsing a user defined function that is `unsafe` and `extern "C"` allow
variadic signatures and inject a "spoofed" `VaList` in the new functions
signature. This allows the user to interact with the variadic arguments via a
`VaList` instead of manually using `va_start` and `va_end` (See [RFC 2137] for
details).

### Codegen

When running codegen for a variadic function, remove the "spoofed" `VaList`
from the function signature and inject `va_start` when the arg local
references are created for the function and `va_end` on return.

## TODO

 - [x] Get feedback on injecting `va_start/va_end` in MIR vs codegen
 - [x] Properly inject `va_end` - It seems like it should be possible to inject
       `va_end` on the `TerminatorKind::Return`. I just need to figure out how
       to get the `LocalRef` here.
 - [x] Properly call Rust defined C variadic functions in Rust - The spoofed
       `VaList` causes problems here.

Related to: #44930

r? @ghost

[RFC 2137]: https://github.com/rust-lang/rfcs/blob/master/text/2137-variadic.md

5 years agoAuto merge of #58208 - taiki-e:libstd-2018, r=Centril
bors [Thu, 28 Feb 2019 11:38:40 +0000 (11:38 +0000)]
Auto merge of #58208 - taiki-e:libstd-2018, r=Centril

libstd => 2018

Transitions `libstd` to Rust 2018; cc #58099

r? @Centril

5 years agoUpdate src/libcore/mem.rs
Mazdak Farrokhzad [Thu, 28 Feb 2019 08:24:35 +0000 (09:24 +0100)]
Update src/libcore/mem.rs

Co-Authored-By: RalfJung <post@ralfj.de>
5 years agoEnsure `record_layout_for_printing()` is inlined.
Nicholas Nethercote [Thu, 28 Feb 2019 08:10:43 +0000 (19:10 +1100)]
Ensure `record_layout_for_printing()` is inlined.

This reduces instruction counts for the `ctfe-stress-2` benchmark by
about 1%.

5 years agoUpdate edition-guide
Eric Huss [Thu, 28 Feb 2019 05:08:15 +0000 (21:08 -0800)]
Update edition-guide

5 years agoallow specifying attributes for tool lints
Andy Russell [Wed, 27 Feb 2019 15:56:58 +0000 (10:56 -0500)]
allow specifying attributes for tool lints

5 years agoFix rebase fail
Taiki Endo [Wed, 27 Feb 2019 07:15:56 +0000 (16:15 +0900)]
Fix rebase fail

5 years agoFix some imports and paths
Taiki Endo [Sun, 17 Feb 2019 13:35:20 +0000 (22:35 +0900)]
Fix some imports and paths

5 years agoFix error in tag-that-dare-not-speak-its-name
Taiki Endo [Fri, 15 Feb 2019 14:54:05 +0000 (23:54 +0900)]
Fix error in tag-that-dare-not-speak-its-name