]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agocentralize Scalar size sanity checks and also do them in release builds
Ralf Jung [Sun, 26 May 2019 12:13:12 +0000 (14:13 +0200)]
centralize Scalar size sanity checks and also do them in release builds

5 years agofix overflow error in signed wrapping offset
Ralf Jung [Sun, 26 May 2019 12:12:54 +0000 (14:12 +0200)]
fix overflow error in signed wrapping offset

5 years agorename Scalar::Bits to Scalar::Raw and bits field to data
Ralf Jung [Sat, 25 May 2019 08:59:09 +0000 (10:59 +0200)]
rename Scalar::Bits to Scalar::Raw and bits field to data

5 years agoAuto merge of #60852 - alexcrichton:std-backtrace, r=sfackler
bors [Sun, 26 May 2019 03:26:10 +0000 (03:26 +0000)]
Auto merge of #60852 - alexcrichton:std-backtrace, r=sfackler

std: Depend on `backtrace` crate from crates.io

This commit removes all in-tree support for generating backtraces in
favor of depending on the `backtrace` crate on crates.io. This resolves
a very longstanding piece of duplication where the standard library has
long contained the ability to generate a backtrace on panics, but the
code was later extracted and duplicated on crates.io with the
`backtrace` crate. Since that fork each implementation has seen various
improvements one way or another, but typically `backtrace`-the-crate has
lagged behind libstd in one way or another.

The goal here is to remove this duplication of a fairly critical piece
of code and ensure that there's only one source of truth for generating
backtraces between the standard library and the crate on crates.io.
Recently I've been working to bring the `backtrace` crate on crates.io
up to speed with the support in the standard library which includes:

* Support for `StackWalkEx` on MSVC to recover inline frames with
  debuginfo.
* Using `libbacktrace` by default on MinGW targets.
* Supporting `libbacktrace` on OSX as an option.
* Ensuring all the requisite support in `backtrace`-the-crate compiles
  with `#![no_std]`.
* Updating the `libbacktrace` implementation in `backtrace`-the-crate to
  initialize the global state with the correct filename where necessary.

After reviewing the code in libstd the `backtrace` crate should be at
exact feature parity with libstd today. The backtraces generated should
have the same symbols and same number of frames in general, and there's
not known divergence from libstd currently.

Note that one major difference between libstd's backtrace support and
the `backtrace` crate is that on OSX the crates.io crate enables the
`coresymbolication` feature by default. This feature, however, uses
private internal APIs that aren't published for OSX. While they provide
more accurate backtraces this isn't appropriate for libstd distributed
as a binary, so libstd's dependency on the `backtrace` crate explicitly
disables this feature and forces OSX to use `libbacktrace` as a
symbolication strategy.

The long-term goal of this refactoring is to eventually move us towards
a world where we can drop `libbacktrace` entirely and simply use Gimli
and the surrounding crates for backtrace support. That's still aways off
but hopefully will much more easily enabled by having the source of
truth for backtraces live in crates.io!

Procedurally if we go forward with this I'd like to transfer the
`backtrace-rs` crate to the rust-lang GitHub organization as well, but I
figured I'd hold off on that until we get closer to merging.

5 years agostd: Depend on `backtrace` crate from crates.io
Alex Crichton [Wed, 15 May 2019 14:30:15 +0000 (07:30 -0700)]
std: Depend on `backtrace` crate from crates.io

This commit removes all in-tree support for generating backtraces in
favor of depending on the `backtrace` crate on crates.io. This resolves
a very longstanding piece of duplication where the standard library has
long contained the ability to generate a backtrace on panics, but the
code was later extracted and duplicated on crates.io with the
`backtrace` crate. Since that fork each implementation has seen various
improvements one way or another, but typically `backtrace`-the-crate has
lagged behind libstd in one way or another.

The goal here is to remove this duplication of a fairly critical piece
of code and ensure that there's only one source of truth for generating
backtraces between the standard library and the crate on crates.io.
Recently I've been working to bring the `backtrace` crate on crates.io
up to speed with the support in the standard library which includes:

* Support for `StackWalkEx` on MSVC to recover inline frames with
  debuginfo.
* Using `libbacktrace` by default on MinGW targets.
* Supporting `libbacktrace` on OSX as an option.
* Ensuring all the requisite support in `backtrace`-the-crate compiles
  with `#![no_std]`.
* Updating the `libbacktrace` implementation in `backtrace`-the-crate to
  initialize the global state with the correct filename where necessary.

After reviewing the code in libstd the `backtrace` crate should be at
exact feature parity with libstd today. The backtraces generated should
have the same symbols and same number of frames in general, and there's
not known divergence from libstd currently.

Note that one major difference between libstd's backtrace support and
the `backtrace` crate is that on OSX the crates.io crate enables the
`coresymbolication` feature by default. This feature, however, uses
private internal APIs that aren't published for OSX. While they provide
more accurate backtraces this isn't appropriate for libstd distributed
as a binary, so libstd's dependency on the `backtrace` crate explicitly
disables this feature and forces OSX to use `libbacktrace` as a
symbolication strategy.

The long-term goal of this refactoring is to eventually move us towards
a world where we can drop `libbacktrace` entirely and simply use Gimli
and the surrounding crates for backtrace support. That's still aways off
but hopefully will much more easily enabled by having the source of
truth for backtraces live in crates.io!

Procedurally if we go forward with this I'd like to transfer the
`backtrace-rs` crate to the rust-lang GitHub organization as well, but I
figured I'd hold off on that until we get closer to merging.

5 years agoAuto merge of #56595 - ljedrz:x_py_clippy_fix, r=oli-obk
bors [Sat, 25 May 2019 22:42:12 +0000 (22:42 +0000)]
Auto merge of #56595 - ljedrz:x_py_clippy_fix, r=oli-obk

Add clippy and fix commands to x.py

Since they are kind of similar in nature, I have used the same approach as for `cargo check`. At least some of the boilerplate could probably be shared, but I'd prefer to gather some feedback before I decide to merge them more aggressively.

This works reasonably well for `clippy`; with `-A clippy::all` and some extra `#![feature(rustc_private)]`s almost the whole codebase can be processed. There are some concerns, though:
- unlike `check`, in order to be able to traverse all the crates, some of them need to be marked with the `#![feature(rustc_private)]` attribute
- `-W clippy::all` breaks on any error. Is there a way to produce errors but not have them break the progress?
- I'm not sure how to redirect the errors in a way that would show colors; for now I was able to de-jsonize and print them (something not needed for `check`)

`cargo fix` is much more stubborn; it refuses to acknowledge crates like `core` and `std`, so it doesn't progress much at all.

Since this is a bit more tricky than I have envisioned, I need some guidance:
- is this the right approach or am I doing something very wrong ^^?
- why are the extra `rustc_private` features necessary? I was hoping for the same treatment as `check`
- are changes in `clippy` and `cargo fix` needed e.g. in order to produce errors in the same manner as `check` or did I miss something?
- do we need this level of file granularity (e.g. for futureproofing) or can `check`, `clippy` and `fix` files be condensed?

Hopes-to-fix: https://github.com/rust-lang/rust/issues/53896

Cc @alexcrichton, @zackmdavis

5 years agoAuto merge of #59276 - oli-obk:cleanups, r=eddyb
bors [Sat, 25 May 2019 16:08:11 +0000 (16:08 +0000)]
Auto merge of #59276 - oli-obk:cleanups, r=eddyb

Cleanup (pretty) printing of `ty::Const`

r? @eddyb

addresses https://github.com/rust-lang/rust/pull/59178/files/5cd28066214a4a255bac6655c20bf05cb95730fd#r266243236 and https://github.com/rust-lang/rust/pull/59178/files/5cd28066214a4a255bac6655c20bf05cb95730fd#r266243336

5 years agoUpdate nll ui tests
Oliver Scherer [Sat, 25 May 2019 15:21:29 +0000 (17:21 +0200)]
Update nll ui tests

5 years agoAdd clippy and fix commands to x.py
ljedrz [Tue, 4 Dec 2018 18:26:54 +0000 (19:26 +0100)]
Add clippy and fix commands to x.py

5 years agoAuto merge of #61151 - Centril:rollup-5rpyhfo, r=Centril
bors [Sat, 25 May 2019 09:30:02 +0000 (09:30 +0000)]
Auto merge of #61151 - Centril:rollup-5rpyhfo, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #61092 (Make sanitize_place iterate instead of recurse)
 - #61093 (Make borrow_of_local_data iterate instead of recurse)
 - #61094 (Make find_local iterate instead of recurse)
 - #61099 (Make ignore_borrow iterate instead of recurse)
 - #61103 (Make find iterate instead of recurse)
 - #61104 (Make eval_place_to_op iterate instead of recurse)

Failed merges:

r? @ghost

5 years agoFix missing tcx
varkor [Fri, 24 May 2019 19:47:39 +0000 (20:47 +0100)]
Fix missing tcx

5 years agoOnly print integers in symbol path's constants
Oliver Scherer [Sat, 11 May 2019 14:04:14 +0000 (16:04 +0200)]
Only print integers in symbol path's constants

5 years agoUpdate ui tests
Oliver Scherer [Sat, 11 May 2019 13:48:57 +0000 (15:48 +0200)]
Update ui tests

5 years agoPrint types for unevaluated constants
Oliver Scherer [Sat, 11 May 2019 13:48:47 +0000 (15:48 +0200)]
Print types for unevaluated constants

5 years agoFix rebase fallout
Oliver Scherer [Tue, 7 May 2019 15:47:52 +0000 (17:47 +0200)]
Fix rebase fallout

5 years agoBreak cycle during array length printing
Oliver Scherer [Fri, 3 May 2019 08:59:04 +0000 (10:59 +0200)]
Break cycle during array length printing

5 years agorustc: integrate ty::Const into ty::print as print_const.
Eduard-Mihai Burtescu [Mon, 18 Mar 2019 10:50:57 +0000 (12:50 +0200)]
rustc: integrate ty::Const into ty::print as print_const.

5 years agoUpdate ui tests
Oliver Scherer [Wed, 24 Apr 2019 14:12:53 +0000 (16:12 +0200)]
Update ui tests

5 years agoPrint unevaluted constants as `_` or as their source representation
Oliver Scherer [Wed, 24 Apr 2019 12:10:52 +0000 (14:10 +0200)]
Print unevaluted constants as `_` or as their source representation

5 years agoUse `write_char` to skip the formatting infrastructure
Oliver Scherer [Wed, 24 Apr 2019 12:10:31 +0000 (14:10 +0200)]
Use `write_char` to skip the formatting infrastructure

5 years agoFix tidy
Oliver Scherer [Wed, 24 Apr 2019 12:10:05 +0000 (14:10 +0200)]
Fix tidy

5 years agoPrint generic args in function calls in MIR
Oliver Scherer [Wed, 17 Apr 2019 16:19:59 +0000 (18:19 +0200)]
Print generic args in function calls in MIR

5 years agoGroup common printing code during constant pretty printing
Oliver Scherer [Wed, 17 Apr 2019 15:50:47 +0000 (17:50 +0200)]
Group common printing code during constant pretty printing

5 years agoRender unresolved anon consts like closures
Oliver Scherer [Wed, 17 Apr 2019 15:29:38 +0000 (17:29 +0200)]
Render unresolved anon consts like closures

5 years ago`u8` is printed as a number, not a character
Oliver Scherer [Mon, 15 Apr 2019 09:00:55 +0000 (11:00 +0200)]
`u8` is printed as a number, not a character

5 years agoRender const byte slices in MIR
Oliver Scherer [Thu, 11 Apr 2019 20:04:04 +0000 (22:04 +0200)]
Render const byte slices in MIR

5 years agoMake `ConstValue::Slice` solely take `[u8]` and `str`
Oliver Scherer [Thu, 11 Apr 2019 13:06:42 +0000 (15:06 +0200)]
Make `ConstValue::Slice` solely take `[u8]` and `str`

5 years agoRefactor string constant printing to prep for byte string printing
Oliver Scherer [Thu, 11 Apr 2019 09:12:47 +0000 (11:12 +0200)]
Refactor string constant printing to prep for byte string printing

5 years agoAdd test showing how byte slices are printed in MIR
Oliver Scherer [Thu, 11 Apr 2019 09:11:11 +0000 (11:11 +0200)]
Add test showing how byte slices are printed in MIR

5 years agoDon't use `ty::Const` without immediately interning
Oliver Scherer [Wed, 3 Apr 2019 13:29:31 +0000 (15:29 +0200)]
Don't use `ty::Const` without immediately interning

5 years agoPrint const chars escaped with surrounding quotes
Oliver Scherer [Tue, 2 Apr 2019 12:26:56 +0000 (14:26 +0200)]
Print const chars escaped with surrounding quotes

5 years agoMerge the string printing paths of ty::Const
Oliver Scherer [Tue, 2 Apr 2019 12:26:28 +0000 (14:26 +0200)]
Merge the string printing paths of ty::Const

5 years agoThere's a tcx in scope, don't use the tls one
Oliver Scherer [Tue, 2 Apr 2019 12:23:23 +0000 (14:23 +0200)]
There's a tcx in scope, don't use the tls one

5 years agoReuse the pretty printing architecture for printing of constants
Oliver Scherer [Fri, 29 Mar 2019 09:52:09 +0000 (10:52 +0100)]
Reuse the pretty printing architecture for printing of constants

5 years agoIgnore .vscode even if it is a symlink
Oliver Scherer [Tue, 26 Mar 2019 16:57:13 +0000 (17:57 +0100)]
Ignore .vscode even if it is a symlink

5 years agoRemove unnecessary secondary recursion
Oliver Scherer [Mon, 18 Mar 2019 13:21:41 +0000 (14:21 +0100)]
Remove unnecessary secondary recursion

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 #61104 - spastorino:eval-place-to-op-iterate, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:57:38 +0000 (04:57 +0200)]
Rollup merge of #61104 - spastorino:eval-place-to-op-iterate, r=oli-obk

Make eval_place_to_op iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61103 - spastorino:find-iterate, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:57:37 +0000 (04:57 +0200)]
Rollup merge of #61103 - spastorino:find-iterate, r=oli-obk

Make find iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61099 - spastorino:ignore-borrow-iterate, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:57:36 +0000 (04:57 +0200)]
Rollup merge of #61099 - spastorino:ignore-borrow-iterate, r=oli-obk

Make ignore_borrow iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61094 - spastorino:find-local-iterate, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:57:34 +0000 (04:57 +0200)]
Rollup merge of #61094 - spastorino:find-local-iterate, r=oli-obk

Make find_local iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61093 - spastorino:borrow-of-local-data-iterate, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:57:33 +0000 (04:57 +0200)]
Rollup merge of #61093 - spastorino:borrow-of-local-data-iterate, r=oli-obk

Make borrow_of_local_data iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61092 - spastorino:sanitize-place-iterative, r=oli-obk
Mazdak Farrokhzad [Sat, 25 May 2019 02:57:32 +0000 (04:57 +0200)]
Rollup merge of #61092 - spastorino:sanitize-place-iterative, r=oli-obk

Make sanitize_place iterate instead of recurse

r? @oli-obk

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 agoMake eval_place_to_op iterate instead of recurse
Santiago Pastorino [Thu, 23 May 2019 23:28:41 +0000 (01:28 +0200)]
Make eval_place_to_op iterate instead of recurse

5 years agoMake eval_place_to_mplace take PlaceBase::Static
Santiago Pastorino [Fri, 24 May 2019 20:35:32 +0000 (22:35 +0200)]
Make eval_place_to_mplace take PlaceBase::Static

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 agoAvoid catch-all arm, use Base(PlaceBase::Static(_))
Santiago Pastorino [Fri, 24 May 2019 18:37:57 +0000 (20:37 +0200)]
Avoid catch-all arm, use Base(PlaceBase::Static(_))

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 agoMake ignore_borrow iterate instead of recurse
Santiago Pastorino [Thu, 23 May 2019 19:53:59 +0000 (21:53 +0200)]
Make ignore_borrow iterate instead of recurse

5 years agoMake borrow_of_local_data iterate instead of recurse
Santiago Pastorino [Thu, 23 May 2019 19:43:21 +0000 (21:43 +0200)]
Make borrow_of_local_data iterate instead of recurse

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

5 years agoMake sanitize_place iterate instead of recurse
Santiago Pastorino [Thu, 23 May 2019 19:41:10 +0000 (21:41 +0200)]
Make sanitize_place iterate instead of recurse

5 years agoMake find iterate instead of recurse
Santiago Pastorino [Thu, 23 May 2019 23:15:08 +0000 (01:15 +0200)]
Make find iterate instead of recurse

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