]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #61150 - Centril:rollup-wmm7qga, r=Centril
bors [Sat, 25 May 2019 04:10:07 +0000 (04:10 +0000)]
Auto merge of #61150 - Centril:rollup-wmm7qga, r=Centril

Rollup of 13 pull requests

Successful merges:

 - #61026 (Tweak macro parse errors when reaching EOF during macro call parse)
 - #61095 (Update cargo)
 - #61096 (tidy: don't short-circuit on license error)
 - #61107 (Fix a couple docs typos)
 - #61110 (Revert edition-guide toolstate override)
 - #61111 (Fixed type-alias-bounds lint doc)
 - #61113 (Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35)
 - #61116 (Remove the incorrect warning from README.md)
 - #61118 (Dont ICE on an attempt to use GAT without feature gate)
 - #61121 (improve debug-printing of scalars)
 - #61125 (Updated my mailmap entry)
 - #61134 (Annotate each `reverse_bits` with `#[must_use]`)
 - #61138 (Move async/await tests to their own folder)

Failed merges:

r? @ghost

5 years agoRollup merge of #61138 - varkor:async-await-tests, r=cramertj
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:45 +0000 (04:55 +0200)]
Rollup merge of #61138 - varkor:async-await-tests, r=cramertj

Move async/await tests to their own folder

This moves run-pass and ui async/await tests to their own folder `src/test/ui/async-await` and organises some into subfolders. (It does not move rustdoc tests for async/await.)

I also did some drive-by cleaning up of issues/error code tests into their own folders (which already existed). These are in separate commits, so easy to separate out if that's more desirable.

r? @cramertj

5 years agoRollup merge of #61134 - nvzqz:reverse_bits-must_use, r=varkor
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:43 +0000 (04:55 +0200)]
Rollup merge of #61134 - nvzqz:reverse_bits-must_use, r=varkor

Annotate each `reverse_bits` with `#[must_use]`

Because the name sounds like an in-place mutation like `[T]::reverse(&mut self)`, it may be confused for one.

This change was requested at https://github.com/rust-lang/rust/issues/48763#issuecomment-493743741.

5 years agoRollup merge of #61125 - XAMPPRocky:master, r=jonas-schievink
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:41 +0000 (04:55 +0200)]
Rollup merge of #61125 - XAMPPRocky:master, r=jonas-schievink

Updated my mailmap entry

5 years agoRollup merge of #61121 - RalfJung:miri-value-printing, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:40 +0000 (04:55 +0200)]
Rollup merge of #61121 - RalfJung:miri-value-printing, r=oli-obk

improve debug-printing of scalars

* Prettier printing for `Pointer` and `Bits`.
* Don't print the `ScalarMaybeUndef(...)` around `Scalar`.

Before: `Immediate(ScalarMaybeUndef(Scalar(Ptr(Pointer { alloc_id: AllocId(3401), offset: Size { raw: 4 }, tag: Tagged(7723) }))))`
After: `Immediate(Scalar(AllocId(3401).0x4[<7723>]))`

Before: `Immediate(ScalarMaybeUndef(Scalar(Bits { size: 8, bits: 10 })))`
After: `Immediate(Scalar(0x000000000000000A))`

Before: `Immediate(ScalarMaybeUndef(Scalar(Bits { size: 1, bits: 1 })))`
After: `Immediate(Scalar(0x01))`

r? @oli-obk

5 years agoRollup merge of #61118 - pnkfelix:issue-60654-dont-ice-on-gat, r=varkor
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:39 +0000 (04:55 +0200)]
Rollup merge of #61118 - pnkfelix:issue-60654-dont-ice-on-gat, r=varkor

Dont ICE on an attempt to use GAT without feature gate

Fix #60654

5 years agoRollup merge of #61116 - scottmcm:vcpp-download-link, r=alexcrichton
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:37 +0000 (04:55 +0200)]
Rollup merge of #61116 - scottmcm:vcpp-download-link, r=alexcrichton

Remove the incorrect warning from README.md

My problem was user error; thanks to @Zoxc for fixing me!

r? @alexcrichton

5 years agoRollup merge of #61113 - SimonSapin:fnbox, r=alexcrichton
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:36 +0000 (04:55 +0200)]
Rollup merge of #61113 - SimonSapin:fnbox, r=alexcrichton

Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35

FCP completion: https://github.com/rust-lang/rust/issues/28796#issuecomment-439731515

5 years agoRollup merge of #61111 - Cerberuser:patch-1, r=steveklabnik
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:34 +0000 (04:55 +0200)]
Rollup merge of #61111 - Cerberuser:patch-1, r=steveklabnik

Fixed type-alias-bounds lint doc

The example code under type-alias-bounds lint produced two warnings - one from the lint itself and another from the dead_code lint, and only the second one was in the doc. This looked like an error, so I've added `#[allow(dead_code)]` and replaced the example output with the expected one.

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=%23%5Ballow(dead_code)%5D%0Atype%20SendVec%3CT%3A%20Send%3E%20%3D%20Vec%3CT%3E%3B)

According to guidelines,
r? @steveklabnik

5 years agoRollup merge of #61110 - ehuss:revert-edition-override, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:33 +0000 (04:55 +0200)]
Rollup merge of #61110 - ehuss:revert-edition-override, r=Mark-Simulacrum

Revert edition-guide toolstate override

Closes #60929

5 years agoRollup merge of #61107 - blkerby:docs_typos, r=Centril
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:32 +0000 (04:55 +0200)]
Rollup merge of #61107 - blkerby:docs_typos, r=Centril

Fix a couple docs typos

Also add a link to env::split_paths.

5 years agoRollup merge of #61096 - ehuss:tidy-license-short-circuit, r=Centril
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:30 +0000 (04:55 +0200)]
Rollup merge of #61096 - ehuss:tidy-license-short-circuit, r=Centril

tidy: don't short-circuit on license error

If there is more than one license error, tidy would only print the first
error. This changes it so that all license errors are printed.

5 years agoRollup merge of #61095 - ehuss:update-cargo, r=alexcrichton
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:29 +0000 (04:55 +0200)]
Rollup merge of #61095 - ehuss:update-cargo, r=alexcrichton

Update cargo

Update cargo

14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6
2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000
- Bump to 0.38.0 (rust-lang/cargo#6979)
- cargo package: detect new empty directories (rust-lang/cargo#6973)
- Add message caching. (rust-lang/cargo#6933)
- Fix typo (rust-lang/cargo#6974)
- Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971)
- Clippy fixes (rust-lang/cargo#6970)
- Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968)
- Document new `doctest` field. (rust-lang/cargo#6965)
- Update some man pages that missed --offline. (rust-lang/cargo#6964)
- add public & private prop tests. (rust-lang/cargo#6962)
- zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956)
- Change docs "inequality" for semver requirement. (rust-lang/cargo#6963)
- Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959)
- Add `doctest` field into metadata (rust-lang/cargo#6953)

5 years agoRollup merge of #61026 - estebank:macro-eof-spans, r=petrochenkov
Mazdak Farrokhzad [Sat, 25 May 2019 02:55:28 +0000 (04:55 +0200)]
Rollup merge of #61026 - estebank:macro-eof-spans, r=petrochenkov

Tweak macro parse errors when reaching EOF during macro call parse

Add detail on origin of current parser when reaching EOF, stop saying "found `<eof>`" and point at the end of macro calls.

Fix #27569.

5 years agoAuto merge of #60441 - vext01:try-to-kill-projection-params, r=oli-obk
bors [Sat, 25 May 2019 01:20:07 +0000 (01:20 +0000)]
Auto merge of #60441 - vext01:try-to-kill-projection-params, r=oli-obk

Make place projections concrete.

**I'm not sure if we want this. I'm raising the PR  for discussion**

Whilst doing some work on our Rust fork, I noticed the following:

Once upon a time (commit 9bd35c07c26) there were two kinds of
projection: one for places, and one for constants. It therefore made
sense to share the `Projection` struct for both. Although the different
use-cases used different concrete types, sharing was made possible by
type-parameterisation of `Projection`.

Since then, however, the usage of projections in constants has
disappeared, meaning that (forgetting lifetimes for a moment) the
parameterised type is only every instantiated under one guise. So it may
as well be a concrete type. Right?

What do people think? This is entirely untested, although it does check.

If we *don't* want this, then we should at least update the incorrect comment against `Projection`.

Thanks

5 years agoAdd extra arc_wake
varkor [Fri, 24 May 2019 23:23:15 +0000 (00:23 +0100)]
Add extra arc_wake

5 years agoRevert changes that belong to separate PR
Esteban Küber [Fri, 24 May 2019 22:17:32 +0000 (15:17 -0700)]
Revert changes that belong to separate PR

5 years agoDelete stray .stderr
varkor [Fri, 24 May 2019 21:36:57 +0000 (22:36 +0100)]
Delete stray .stderr

5 years agoMove error code tests to error code folder
varkor [Fri, 24 May 2019 21:07:35 +0000 (22:07 +0100)]
Move error code tests to error code folder

5 years agoAdd issues folder in async-await
varkor [Fri, 24 May 2019 21:06:09 +0000 (22:06 +0100)]
Add issues folder in async-await

5 years agoAdd drop-order folder in test/ui/async-await
varkor [Fri, 24 May 2019 21:05:57 +0000 (22:05 +0100)]
Add drop-order folder in test/ui/async-await

5 years agoAdd auxiliary issue file
varkor [Fri, 24 May 2019 21:03:14 +0000 (22:03 +0100)]
Add auxiliary issue file

5 years agoMove some issues into the issues folder
varkor [Fri, 24 May 2019 20:49:52 +0000 (21:49 +0100)]
Move some issues into the issues folder

5 years agoMove async/await tests to test/ui/async-await
varkor [Fri, 24 May 2019 20:49:34 +0000 (21:49 +0100)]
Move async/await tests to test/ui/async-await

5 years agoAnnotate each `reverse_bits` with `#[must_use]`
Nikolai Vazquez [Fri, 24 May 2019 20:26:34 +0000 (22:26 +0200)]
Annotate each `reverse_bits` with `#[must_use]`

Because the name sounds like an in-place mutation like
`[T]::reverse(&mut self)`, it may be confused for one.

5 years agoAuto merge of #60777 - pietroalbini:azure-pipelines, r=alexcrichton
bors [Fri, 24 May 2019 19:22:13 +0000 (19:22 +0000)]
Auto merge of #60777 - pietroalbini:azure-pipelines, r=alexcrichton

Add Azure Pipelines configuration

Huge thanks to @johnterickson and @willsmythe for writing the initial config! :heart:
I applied some changes to the initial config and disabled most of the builders since we're not going to run all of them during the initial step for the evaluation.

[More details about our plans for the Azure Pipelines evaluation.](https://internals.rust-lang.org/t/update-on-the-ci-investigation/10056)

r? @alexcrichton @kennytm
cc @rust-lang/infra @ethomson @rylev

5 years agoMove diagnostic logic out of parser
Esteban Küber [Wed, 22 May 2019 06:16:46 +0000 (23:16 -0700)]
Move diagnostic logic out of parser

5 years agoFix rebase
Esteban Küber [Wed, 22 May 2019 06:13:31 +0000 (23:13 -0700)]
Fix rebase

5 years agoreview comments
Esteban Küber [Wed, 22 May 2019 05:17:53 +0000 (22:17 -0700)]
review comments

5 years agoTweak macro parse errors when reaching EOF during macro call parse
Esteban Küber [Wed, 22 May 2019 00:47:23 +0000 (17:47 -0700)]
Tweak macro parse errors when reaching EOF during macro call parse

- Add detail on origin of current parser when reaching EOF and stop
  saying "found <eof>" and point at the end of macro calls
- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error

5 years agoUpdated my mailmap entry
Erin [Fri, 24 May 2019 16:32:22 +0000 (18:32 +0200)]
Updated my mailmap entry

5 years agothis is for tidy
Ralf Jung [Fri, 24 May 2019 14:44:52 +0000 (16:44 +0200)]
this is for tidy

5 years agoimprove debug-printing of scalars
Ralf Jung [Fri, 24 May 2019 11:03:28 +0000 (13:03 +0200)]
improve debug-printing of scalars

Before: Immediate(ScalarMaybeUndef(Scalar(Ptr(Pointer { alloc_id: AllocId(3401), offset: Size { raw: 4 }, tag: Tagged(7723) }))))
After: Immediate(Scalar(AllocId(3401).0x4[<7723>]))

Before: Immediate(ScalarMaybeUndef(Scalar(Bits { size: 8, bits: 10 })))
After: Immediate(Scalar(0x000000000000000A))

Before: Immediate(ScalarMaybeUndef(Scalar(Bits { size: 1, bits: 1 })))
After: Immediate(Scalar(0x01))

5 years agoRegression test for issue #60654.
Felix S. Klock II [Fri, 24 May 2019 12:02:05 +0000 (14:02 +0200)]
Regression test for issue #60654.

5 years agoMake place projections concrete.
Edd Barrett [Wed, 1 May 2019 14:34:51 +0000 (15:34 +0100)]
Make place projections concrete.

Once upon a time (commit 9bd35c07c26) there were two kinds of
projection: one for places, and one for constants. It therefore made
sense to share the `Projection` struct for both. Although the different
use-cases used different concrete types, sharing was made possible by
type-parameterisation of `Projection`.

Since then, however, the usage of projections in constants has
disappeared, meaning that (forgetting lifetimes for a moment) the
parameterised type is only every instantiated under one guise. So it may
as well be a concrete type.

5 years agoAuto merge of #60568 - petrochenkov:debi, r=Mark-Simulacrum
bors [Fri, 24 May 2019 12:51:50 +0000 (12:51 +0000)]
Auto merge of #60568 - petrochenkov:debi, r=Mark-Simulacrum

rustbuild: Simplify debuginfo configuration

This is supposed to fix https://github.com/rust-lang/rust/issues/52179

This PR introduces one option `debuginfo-level` replacing `debuginfo` and `debuginfo-lines` and corresponding to the `rustc` flag `-C debuginfo=N`.

`debuginfo-level` serves as a default for all Rust code built during bootstrap, but it can be overridden for specific subsets of code using finer-grained options `debuginfo-level-{rustc,std,tools,tests}` replacing `debuginfo-only-std`, `debuginfo-tools` and `debuginfo-tests`.

5 years agoDelay ICE in early_free_scope so feature gate has chance to stop compilation cleanly.
Felix S. Klock II [Fri, 24 May 2019 12:01:07 +0000 (14:01 +0200)]
Delay ICE in early_free_scope so feature gate has chance to stop compilation cleanly.

5 years agoDelay ICE in fold_region so feature gate has chance to stop compilation cleanly.
Felix S. Klock II [Fri, 24 May 2019 11:56:26 +0000 (13:56 +0200)]
Delay ICE in fold_region so feature gate has chance to stop compilation cleanly.

5 years agoAddress review comments
Vadim Petrochenkov [Fri, 24 May 2019 10:01:23 +0000 (13:01 +0300)]
Address review comments

5 years agorustbuild: Untie `debuginfo-level-tests` from `debuginfo-level`
Vadim Petrochenkov [Thu, 23 May 2019 23:11:33 +0000 (02:11 +0300)]
rustbuild: Untie `debuginfo-level-tests` from `debuginfo-level`

5 years agoAuto merge of #60803 - varkor:remove-in-place-syntax, r=petrochenkov
bors [Fri, 24 May 2019 09:54:17 +0000 (09:54 +0000)]
Auto merge of #60803 - varkor:remove-in-place-syntax, r=petrochenkov

Remove `ObsoleteInPlace`

The in place syntax has been deprecated for over a year. As it is, this is accumulated cruft: the error messages are unlikely to be helpful any more and it conflicts with some useful syntax (e.g. const generics in some instances).

It may be that removing `Token::LArrow` is backwards-incompatible. We should do a crater run to check.

cc @eddyb

5 years agoci: Enable debuginfo for std only if release channel is set
Vadim Petrochenkov [Thu, 23 May 2019 22:04:50 +0000 (01:04 +0300)]
ci: Enable debuginfo for std only if release channel is set

5 years agorustbuild: Simplify debuginfo configuration
Vadim Petrochenkov [Sun, 5 May 2019 19:15:42 +0000 (22:15 +0300)]
rustbuild: Simplify debuginfo configuration

5 years agoci: fix invalid syntax in the azure auto.yml
Pietro Albini [Fri, 24 May 2019 08:33:14 +0000 (10:33 +0200)]
ci: fix invalid syntax in the azure auto.yml

5 years agoDeprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35
Simon Sapin [Fri, 24 May 2019 06:55:33 +0000 (08:55 +0200)]
Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35

FCP completion: https://github.com/rust-lang/rust/issues/28796#issuecomment-439731515

5 years agoRemove the incorrect warning from README.md
Scott McMurray [Fri, 24 May 2019 06:40:07 +0000 (23:40 -0700)]
Remove the incorrect warning from README.md

My problem was user error; thanks to @Zoxc for fixing me!

r? @alexcrichton

5 years agoUse FnOnce instead of FnBox in libtest
Simon Sapin [Fri, 24 May 2019 05:51:48 +0000 (07:51 +0200)]
Use FnOnce instead of FnBox in libtest

5 years agoFixed type-alias-bounds lint doc
Cerberuser [Fri, 24 May 2019 05:09:33 +0000 (12:09 +0700)]
Fixed type-alias-bounds lint doc

The example code under type-alias-bounds lint produced two warnings - one from the lint itself and another from the dead_code lint, and only the second one was in the doc. This looked like an error, so I've added `#[allow(dead_code)]` and replaced the example output with the expected one.
[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=%23%5Ballow(dead_code)%5D%0Atype%20SendVec%3CT%3A%20Send%3E%20%3D%20Vec%3CT%3E%3B)

5 years agoRevert edition-guide toolstate override
Eric Huss [Fri, 24 May 2019 04:21:13 +0000 (21:21 -0700)]
Revert edition-guide toolstate override

5 years agoAuto merge of #60984 - matthewjasper:borrowck-error-reporting-cleanup, r=pnkfelix
bors [Fri, 24 May 2019 03:07:07 +0000 (03:07 +0000)]
Auto merge of #60984 - matthewjasper:borrowck-error-reporting-cleanup, r=pnkfelix

Borrowck error reporting cleanup

* Don't show variables created by desugarings in borrowck errors
* Move "conflict error" reporting to it's own module, so that `error_reporting` contains only common error reporting methods.
* Remove unused `ScopeTree` parameter.

r? @pnkfelix

5 years agoFix typo "spit_paths", add link
Brent Kerby [Fri, 24 May 2019 01:35:27 +0000 (19:35 -0600)]
Fix typo "spit_paths", add link

5 years agotypo
Brent Kerby [Sun, 19 May 2019 17:53:35 +0000 (11:53 -0600)]
typo

5 years agoUpdate tests
varkor [Mon, 13 May 2019 21:19:19 +0000 (22:19 +0100)]
Update tests

5 years agoRemove `ObsoleteInPlace`
varkor [Mon, 6 May 2019 13:53:22 +0000 (14:53 +0100)]
Remove `ObsoleteInPlace`

5 years agoAuto merge of #61105 - Centril:rollup-t9lemjf, r=Centril
bors [Fri, 24 May 2019 00:21:00 +0000 (00:21 +0000)]
Auto merge of #61105 - Centril:rollup-t9lemjf, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #59545 (Use arenas to avoid Lrc in queries #2)
 - #61054 (Suggest dereferencing on assignment to mutable borrow)
 - #61056 (tweak discriminant on non-nullary enum diagnostic)
 - #61082 (fix dangling reference in Vec::append)
 - #61086 (Box::into_unique: do the reborrow-to-raw *after* destroying the Box)
 - #61098 (Fix overflowing literal lint in loops)

Failed merges:

r? @ghost

5 years agoRollup merge of #61098 - varkor:fix-overflowing-literal-in-loop, r=estebank
Mazdak Farrokhzad [Thu, 23 May 2019 23:30:25 +0000 (01:30 +0200)]
Rollup merge of #61098 - varkor:fix-overflowing-literal-in-loop, r=estebank

Fix overflowing literal lint in loops

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

r? @estebank

5 years agoRollup merge of #61086 - RalfJung:box, r=alexcrichton
Mazdak Farrokhzad [Thu, 23 May 2019 23:30:24 +0000 (01:30 +0200)]
Rollup merge of #61086 - RalfJung:box, r=alexcrichton

Box::into_unique: do the reborrow-to-raw *after* destroying the Box

Currently we first "reborrow" the box to a raw pointer, and then `forget` it. When tracking raw pointers more strictly (something I am experimenting with locally in Miri), the "use" induced by passing the box to `forget` invalidates the previously created raw pointer.

So adjust my hack from https://github.com/rust-lang/rust/pull/58429 to reorder the two operations.

5 years agoRollup merge of #61082 - RalfJung:vec, r=alexcrichton
Mazdak Farrokhzad [Thu, 23 May 2019 23:30:23 +0000 (01:30 +0200)]
Rollup merge of #61082 - RalfJung:vec, r=alexcrichton

fix dangling reference in Vec::append

Turns out I forgot to enable Miri again for the Vec tests. And there was a dangling reference hiding in there!  `get_unchecked_mut` is UB to call on an empty vector (there is no memory to get a reference to), and yet this code did it.

5 years agoRollup merge of #61056 - euclio:custom-discriminant-error, r=estebank
Mazdak Farrokhzad [Thu, 23 May 2019 23:30:21 +0000 (01:30 +0200)]
Rollup merge of #61056 - euclio:custom-discriminant-error, r=estebank

tweak discriminant on non-nullary enum diagnostic

Adds notes pointing at the non-nullary variants, and uses "custom
discriminant" language to be consistent with the Reference.

Fixes #61039.

r? @estebank

5 years agoRollup merge of #61054 - estebank:mut-ref-reassign, r=zackmdavis
Mazdak Farrokhzad [Thu, 23 May 2019 23:30:20 +0000 (01:30 +0200)]
Rollup merge of #61054 - estebank:mut-ref-reassign, r=zackmdavis

Suggest dereferencing on assignment to mutable borrow

Fix #33570

5 years agoRollup merge of #59545 - Zoxc:the-arena-3, r=eddyb,michaelwoerister
Mazdak Farrokhzad [Thu, 23 May 2019 23:30:18 +0000 (01:30 +0200)]
Rollup merge of #59545 - Zoxc:the-arena-3, r=eddyb,michaelwoerister

Use arenas to avoid Lrc in queries #2

The `Remove subtle Default impl for Value` makes the compilation stop due earlier due to cycle errors, since there's no longer a default value to continue the compilation with.

Based on https://github.com/rust-lang/rust/pull/59540.

5 years agoAuto merge of #60970 - MaulingMonkey:pr-compiletest-cdb-support, r=alexcrichton
bors [Thu, 23 May 2019 20:58:21 +0000 (20:58 +0000)]
Auto merge of #60970 - MaulingMonkey:pr-compiletest-cdb-support, r=alexcrichton

Add basic CDB support to debuginfo compiletest s, to help catch `*.natvis` regressions, like those fixed in #60687.

First draft, feedback welcome.

Several Microsoft debuggers (VS, VS Code, WinDbg, CDB, ...) consume the `*.natvis` files we embed into rust `*.pdb` files.  While this only tests CDB, that test coverage should help for all of them.

# Changes

## src\bootstrap
  - test.rs:  Run CDB debuginfo tests on MSVC targets

## src\test\debuginfo
  - issue-13213.rs:  CDB has trouble with this, skip for now (newly discovered regression?)
  - pretty-std.rs:  Was ignored, re-enable for CDB only to start with, add CDB tests.
  - should-fail.rs:  Add CDB tests.

## src\tools\compiletest:
  - Added "-cdb" option
  - Added Mode::DebugInfoCdb ("debuginfo-cdb")
  - Added run_debuginfo_cdb_test[_no_opt]
  - Renamed Mode::DebugInfoBoth -> DebugInfoGdbLldb ("debuginfo-gdb+lldb") since it's no longer clear what "Both" means.
  - Find CDB at the default Win10 SDK install path "C:\Program Files (x86)\Windows Kits\10\Debugger\\*\cdb.exe"
  - Ignore CDB tests if CDB not found.

# Issues

  - `compute_stamp_hash`: not sure if there's any point in hashing `%ProgramFiles(x86)%`
  - `OsString` lacks any `*.natvis` entries (would be nice to add in a followup changelist)
  - DSTs (array/string slices) which work in VS & VS Code fail in CDB.
  - I've avoided `Mode::DebugInfoAll` as 3 debuggers leads to pow(2,3)=8 possible combinations.

# Reference

CDB is not part of the base Visual Studio install, but can be added via the Windows 10 SDK:
  https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Installing just "Debugging Tools for Windows" is sufficient.

CDB appears to already be installed on appveyor CI, where this changelist can find it, based on it's use here:
  https://github.com/rust-lang/rust/blob/0ffc57311030a1930edfa721fe57d0000a063af4/appveyor.yml#L227

CDB commands and command line reference:
  https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-reference

5 years agoAdd test for denying overflowing literal in loop
varkor [Thu, 23 May 2019 20:48:26 +0000 (21:48 +0100)]
Add test for denying overflowing literal in loop

5 years agoUpdate unreachable loop patterns test
varkor [Thu, 23 May 2019 20:39:36 +0000 (21:39 +0100)]
Update unreachable loop patterns test

5 years agoFix missing overflowing literal lint in for loop
varkor [Thu, 23 May 2019 20:39:27 +0000 (21:39 +0100)]
Fix missing overflowing literal lint in for loop

5 years agotidy: don't short-circuit on license error
Eric Huss [Thu, 23 May 2019 20:33:08 +0000 (13:33 -0700)]
tidy: don't short-circuit on license error

If there is more than one license error, tidy would only print the first
error. This changes it so that all license errors are printed.

5 years agoUpdate cargo
Eric Huss [Thu, 23 May 2019 20:27:49 +0000 (13:27 -0700)]
Update cargo

5 years agoAdd regression test for negative case
Esteban Küber [Thu, 23 May 2019 17:32:01 +0000 (10:32 -0700)]
Add regression test for negative case

5 years agoUpdate crate_variances and inferred_outlives_crate
John Kåre Alsaker [Mon, 20 May 2019 22:40:32 +0000 (00:40 +0200)]
Update crate_variances and inferred_outlives_crate

5 years agoUpdate dylib_dependency_formats, extern_crate and reachable_non_generics
John Kåre Alsaker [Sat, 1 Dec 2018 16:27:12 +0000 (17:27 +0100)]
Update dylib_dependency_formats, extern_crate and reachable_non_generics

5 years agoUpdate foreign_modules and dllimport_foreign_items
John Kåre Alsaker [Sat, 1 Dec 2018 16:14:40 +0000 (17:14 +0100)]
Update foreign_modules and dllimport_foreign_items

5 years agoUpdate visible_parent_map
John Kåre Alsaker [Sat, 1 Dec 2018 16:02:51 +0000 (17:02 +0100)]
Update visible_parent_map

5 years agoUpdate get_lib_features, defined_lib_features, get_lang_items, defined_lang_items...
John Kåre Alsaker [Sat, 1 Dec 2018 15:57:29 +0000 (16:57 +0100)]
Update get_lib_features, defined_lib_features, get_lang_items, defined_lang_items, missing_lang_items, postorder_cnums and maybe_unused_extern_crates

5 years agoUpdate wasm_import_module_map and target_features_whitelist
John Kåre Alsaker [Sat, 1 Dec 2018 15:30:42 +0000 (16:30 +0100)]
Update wasm_import_module_map and target_features_whitelist

5 years agoUpdate upvars and module_exports
John Kåre Alsaker [Sat, 1 Dec 2018 15:23:32 +0000 (16:23 +0100)]
Update upvars and module_exports

5 years agoUpdate in_scope_traits_map
John Kåre Alsaker [Sat, 1 Dec 2018 15:17:59 +0000 (16:17 +0100)]
Update in_scope_traits_map

5 years agoUpdate privacy_access_levels
John Kåre Alsaker [Sat, 1 Dec 2018 14:34:04 +0000 (15:34 +0100)]
Update privacy_access_levels

5 years agoUpdate all_traits
John Kåre Alsaker [Fri, 30 Nov 2018 21:58:06 +0000 (22:58 +0100)]
Update all_traits

5 years agoUpdate stability_index, all_crate_nums and features_query
John Kåre Alsaker [Fri, 30 Nov 2018 21:45:46 +0000 (22:45 +0100)]
Update stability_index, all_crate_nums and features_query

5 years agoUpdate lint_levels
John Kåre Alsaker [Fri, 30 Nov 2018 20:01:50 +0000 (21:01 +0100)]
Update lint_levels

5 years agoUpdate Cargo.lock
John Kåre Alsaker [Sun, 19 May 2019 16:02:55 +0000 (18:02 +0200)]
Update Cargo.lock

5 years agoMake ArenaField private
John Kåre Alsaker [Sun, 19 May 2019 16:02:08 +0000 (18:02 +0200)]
Make ArenaField private

5 years agoAdd a comment for arena_types!
John Kåre Alsaker [Sun, 19 May 2019 15:27:28 +0000 (17:27 +0200)]
Add a comment for arena_types!

5 years agoRemove subtle Default impl for Value
John Kåre Alsaker [Fri, 5 Apr 2019 11:22:13 +0000 (13:22 +0200)]
Remove subtle Default impl for Value

5 years agoUpdate GenericPredicates queries
John Kåre Alsaker [Sat, 1 Dec 2018 17:13:27 +0000 (18:13 +0100)]
Update GenericPredicates queries

5 years agoOptimize alloc_from_iter
John Kåre Alsaker [Tue, 23 Apr 2019 23:45:50 +0000 (01:45 +0200)]
Optimize alloc_from_iter

5 years agoUpdate used_trait_imports
John Kåre Alsaker [Fri, 30 Nov 2018 19:02:56 +0000 (20:02 +0100)]
Update used_trait_imports

5 years agoUpdate item_children
John Kåre Alsaker [Fri, 30 Nov 2018 21:32:16 +0000 (22:32 +0100)]
Update item_children

5 years agoUpdate resolve_lifetimes, named_region_map, is_late_bound_map and object_lifetime_def...
John Kåre Alsaker [Fri, 30 Nov 2018 21:26:57 +0000 (22:26 +0100)]
Update resolve_lifetimes, named_region_map, is_late_bound_map and object_lifetime_defaults_map

5 years agoUpdate implementations_of_trait and all_trait_implementations
John Kåre Alsaker [Fri, 30 Nov 2018 20:23:01 +0000 (21:23 +0100)]
Update implementations_of_trait and all_trait_implementations

5 years agoUpdate upstream_monomorphizations and upstream_monomorphizations_for
John Kåre Alsaker [Fri, 30 Nov 2018 20:05:48 +0000 (21:05 +0100)]
Update upstream_monomorphizations and upstream_monomorphizations_for

5 years agoUpdate borrowck
John Kåre Alsaker [Fri, 30 Nov 2018 19:15:09 +0000 (20:15 +0100)]
Update borrowck

5 years agoUpdate inherent_impls
John Kåre Alsaker [Fri, 30 Nov 2018 14:19:12 +0000 (15:19 +0100)]
Update inherent_impls

5 years agoUpdate associated_item_def_ids
John Kåre Alsaker [Fri, 30 Nov 2018 14:06:42 +0000 (15:06 +0100)]
Update associated_item_def_ids

5 years agoadjust comment
Ralf Jung [Thu, 23 May 2019 16:13:02 +0000 (18:13 +0200)]
adjust comment

5 years agoBox::into_unique: do the reborrow-to-raw *after* destroying the Box
Ralf Jung [Thu, 23 May 2019 15:58:25 +0000 (17:58 +0200)]
Box::into_unique: do the reborrow-to-raw *after* destroying the Box

5 years agotweak discriminant on non-nullary enum diagnostic
Andy Russell [Wed, 22 May 2019 20:56:51 +0000 (16:56 -0400)]
tweak discriminant on non-nullary enum diagnostic

Adds notes pointing at the non-nullary variants, and uses "custom
discriminant" language to be consistent with the Reference.

5 years agofix dangling reference in Vec::append
Ralf Jung [Thu, 23 May 2019 14:30:16 +0000 (16:30 +0200)]
fix dangling reference in Vec::append

5 years agoAuto merge of #60965 - petrochenkov:lit3, r=matklad
bors [Thu, 23 May 2019 13:28:27 +0000 (13:28 +0000)]
Auto merge of #60965 - petrochenkov:lit3, r=matklad

syntax: Continue refactoring literals

A follow up to https://github.com/rust-lang/rust/pull/60679.

https://github.com/rust-lang/rust/commit/a2fd002bd5a91ba7997057724b72b9dac8fae550: Similarly to `EscapeError`, literal parsing now produces a `LitError`.
This way we can get rid of `diag: Option<(Span, &Handler)>` in interfaces while leaving attr/mod alone.

https://github.com/rust-lang/rust/commit/d9516d11208456d4a17fe68a34c1d0a00334e62c: Gathers all components of a literal token in a single struct.

5 years agosyntax: Some code cleanup
Vadim Petrochenkov [Sun, 19 May 2019 16:56:45 +0000 (19:56 +0300)]
syntax: Some code cleanup