]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRename read_query_job -> current_query_job and simplify it.
Camille GILLOT [Wed, 25 Mar 2020 06:52:12 +0000 (07:52 +0100)]
Rename read_query_job -> current_query_job and simplify it.

4 years agoAdd comment.
Camille GILLOT [Tue, 24 Mar 2020 22:50:47 +0000 (23:50 +0100)]
Add comment.

4 years agoSimplify generics on try_start.
Camille GILLOT [Tue, 24 Mar 2020 22:48:37 +0000 (23:48 +0100)]
Simplify generics on try_start.

4 years agoMove generics on QueryCache.
Camille GILLOT [Tue, 24 Mar 2020 22:46:47 +0000 (23:46 +0100)]
Move generics on QueryCache.

4 years agoPrune dependencies.
Camille GILLOT [Tue, 24 Mar 2020 19:37:19 +0000 (20:37 +0100)]
Prune dependencies.

4 years agoRetire DepGraphSafe and HashStableContext.
Camille GILLOT [Tue, 24 Mar 2020 19:09:06 +0000 (20:09 +0100)]
Retire DepGraphSafe and HashStableContext.

4 years agoAccess QueryStateShard directly.
Camille GILLOT [Tue, 24 Mar 2020 08:30:13 +0000 (09:30 +0100)]
Access QueryStateShard directly.

4 years agoUnify key types in get_lookup.
Camille GILLOT [Tue, 24 Mar 2020 08:27:29 +0000 (09:27 +0100)]
Unify key types in get_lookup.

4 years agoRustfmt.
Camille GILLOT [Thu, 26 Mar 2020 08:40:50 +0000 (09:40 +0100)]
Rustfmt.

4 years agoMake librustc compile.
Camille GILLOT [Thu, 19 Mar 2020 13:24:21 +0000 (14:24 +0100)]
Make librustc compile.

4 years agoMake librustc_query_system compile.
Camille GILLOT [Thu, 19 Mar 2020 13:13:31 +0000 (14:13 +0100)]
Make librustc_query_system compile.

4 years agoMove query system to librustc_query_system.
Camille GILLOT [Thu, 19 Mar 2020 07:49:03 +0000 (08:49 +0100)]
Move query system to librustc_query_system.

4 years agoMake get_query into an extension trait.
Camille GILLOT [Thu, 19 Mar 2020 17:43:01 +0000 (18:43 +0100)]
Make get_query into an extension trait.

4 years agoGeneralise Query starting.
Camille GILLOT [Thu, 19 Mar 2020 17:31:17 +0000 (18:31 +0100)]
Generalise Query starting.

4 years agoGeneralise JobOwner::try_start.
Camille GILLOT [Thu, 19 Mar 2020 16:59:19 +0000 (17:59 +0100)]
Generalise JobOwner::try_start.

4 years agoGeneralise try_get_cached.
Camille GILLOT [Thu, 19 Mar 2020 16:53:31 +0000 (17:53 +0100)]
Generalise try_get_cached.

4 years agoMove HashStable bound to the trait definition.
Camille GILLOT [Thu, 19 Mar 2020 12:15:34 +0000 (13:15 +0100)]
Move HashStable bound to the trait definition.

4 years agoParametrise by try_collect_active_jobs.
Camille GILLOT [Thu, 19 Mar 2020 07:28:24 +0000 (08:28 +0100)]
Parametrise by try_collect_active_jobs.

4 years agoGeneralise QueryLatch.
Camille GILLOT [Wed, 18 Mar 2020 22:58:19 +0000 (23:58 +0100)]
Generalise QueryLatch.

4 years agoDecouple from DepKind.
Camille GILLOT [Wed, 18 Mar 2020 20:02:02 +0000 (21:02 +0100)]
Decouple from DepKind.

4 years agoGeneralise QueryJobId.
Camille GILLOT [Wed, 18 Mar 2020 19:30:02 +0000 (20:30 +0100)]
Generalise QueryJobId.

4 years agoMake QueryContext a subtrait of DepContext.
Camille GILLOT [Wed, 18 Mar 2020 19:19:44 +0000 (20:19 +0100)]
Make QueryContext a subtrait of DepContext.

4 years agoMake QueryCache generic on the context.
Camille GILLOT [Wed, 11 Mar 2020 21:02:50 +0000 (22:02 +0100)]
Make QueryCache generic on the context.

4 years agoMake QueryDescription parameter a type.
Camille GILLOT [Sun, 8 Mar 2020 18:42:11 +0000 (19:42 +0100)]
Make QueryDescription parameter a type.

4 years agoMake QueryAccessor argument a type.
Camille GILLOT [Sun, 8 Mar 2020 17:20:18 +0000 (18:20 +0100)]
Make QueryAccessor argument a type.

4 years agoMake QueryConfig argument a type.
Camille GILLOT [Sun, 8 Mar 2020 16:24:56 +0000 (17:24 +0100)]
Make QueryConfig argument a type.

4 years agoAuto merge of #70415 - Centril:rollup-1zttfvl, r=Centril
bors [Thu, 26 Mar 2020 02:22:26 +0000 (02:22 +0000)]
Auto merge of #70415 - Centril:rollup-1zttfvl, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #69866 (Rename `def_span` to `guess_head_span`)
 - #69878 (Tweak chained operators diagnostic)
 - #70375 (avoid catching InterpError)
 - #70386 (typeck: minor pattern typing improvements)
 - #70389 (borrowck: prefer "value" over "`_`" in diagnostics)
 - #70395 (Update cargo.)

Failed merges:

r? @ghost

4 years agoRollup merge of #70395 - ehuss:update-cargo, r=ehuss
Mazdak Farrokhzad [Thu, 26 Mar 2020 02:21:33 +0000 (03:21 +0100)]
Rollup merge of #70395 - ehuss:update-cargo, r=ehuss

Update cargo.

8 commits in 7019b3ed3d539db7429d10a343b69be8c426b576..8a0d4d9c9abc74fd670353094387d62028b40ae9
2020-03-17 21:02:00 +0000 to 2020-03-24 17:57:04 +0000
- Re-implement proc-macro feature decoupling. (rust-lang/cargo#8028)
- Remove unused transitive dependencies: miniz_oxide, adler32 (rust-lang/cargo#8023)
- Fix bug with -Zfeatures=dev_dep and `check --profile=test`. (rust-lang/cargo#8027)
- Remove Config from CompileOptions. (rust-lang/cargo#8021)
- Add `rustless.org` to documented blocklist. (rust-lang/cargo#7922)
- Print colored warnings when build script panics (rust-lang/cargo#8017)
- Do not supply --crate-version flag to rustdoc if present in RUSTDOCFLAGS (rust-lang/cargo#8014)
- Add proc-macro to index, and new feature resolver. (rust-lang/cargo#8003)

4 years agoRollup merge of #70389 - Centril:borrowck-no-underscores, r=mark-i-m
Mazdak Farrokhzad [Thu, 26 Mar 2020 02:21:31 +0000 (03:21 +0100)]
Rollup merge of #70389 - Centril:borrowck-no-underscores, r=mark-i-m

borrowck: prefer "value" over "`_`" in diagnostics

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

r? @pnkfelix @matthewjasper
cc @mark-i-m

4 years agoRollup merge of #70386 - Centril:patty, r=estebank
Mazdak Farrokhzad [Thu, 26 Mar 2020 02:21:30 +0000 (03:21 +0100)]
Rollup merge of #70386 - Centril:patty, r=estebank

typeck: minor pattern typing improvements

r? @estebank

4 years agoRollup merge of #70375 - RalfJung:check-defined-err, r=oli-obk
Mazdak Farrokhzad [Thu, 26 Mar 2020 02:21:29 +0000 (03:21 +0100)]
Rollup merge of #70375 - RalfJung:check-defined-err, r=oli-obk

avoid catching InterpError

Avoid raising and then capturing `InterpError` for the definedness check.

Cc https://github.com/rust-lang/rust/issues/69297
r? @oli-obk

4 years agoRollup merge of #69878 - estebank:chained-ops, r=Centril
Mazdak Farrokhzad [Thu, 26 Mar 2020 02:21:27 +0000 (03:21 +0100)]
Rollup merge of #69878 - estebank:chained-ops, r=Centril

Tweak chained operators diagnostic

Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors

r? @Centril

4 years agoRollup merge of #69866 - estebank:guess_head_span, r=eddyb
Mazdak Farrokhzad [Thu, 26 Mar 2020 02:21:26 +0000 (03:21 +0100)]
Rollup merge of #69866 - estebank:guess_head_span, r=eddyb

Rename `def_span` to `guess_head_span`

r? @eddyb

4 years agotypeck/pat: address review comments
Mazdak Farrokhzad [Thu, 26 Mar 2020 01:29:42 +0000 (02:29 +0100)]
typeck/pat: address review comments

4 years agoborrowck diagnostics: address review comments.
Mazdak Farrokhzad [Thu, 26 Mar 2020 00:55:16 +0000 (01:55 +0100)]
borrowck diagnostics: address review comments.

4 years agoreview comments
Esteban Küber [Thu, 26 Mar 2020 01:10:18 +0000 (18:10 -0700)]
review comments

4 years agoTweak chained operators diagnostic
Esteban Küber [Tue, 10 Mar 2020 03:21:37 +0000 (20:21 -0700)]
Tweak chained operators diagnostic

Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors

4 years agoRename `def_span` to `guess_head_span`
Esteban Küber [Mon, 9 Mar 2020 18:42:37 +0000 (11:42 -0700)]
Rename `def_span` to `guess_head_span`

4 years agoavoid catching InterpError
Ralf Jung [Tue, 24 Mar 2020 23:12:49 +0000 (00:12 +0100)]
avoid catching InterpError

4 years agoAuto merge of #70412 - Dylan-DPC:rollup-yuq2mfy, r=Dylan-DPC
bors [Wed, 25 Mar 2020 22:56:53 +0000 (22:56 +0000)]
Auto merge of #70412 - Dylan-DPC:rollup-yuq2mfy, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #69700 (Rename LayoutDetails to just Layout.)
 - #70392 (Make x.py compatible with python 3.8.)
 - #70406 (Clean up E0458 explanation)
 - #70407 (Avoid tagging as I-nominated on toolstate breakage)
 - #70409 (gitignore: allow target to be a symlink)

Failed merges:

 - #70375 (avoid catching InterpError)

r? @ghost

4 years agoRollup merge of #70409 - mathstuf:gitignore-target-symlink, r=Mark-Simulacrum
Dylan DPC [Wed, 25 Mar 2020 22:53:04 +0000 (23:53 +0100)]
Rollup merge of #70409 - mathstuf:gitignore-target-symlink, r=Mark-Simulacrum

gitignore: allow target to be a symlink

Following rust-lang/cargo#4944.

4 years agoRollup merge of #70407 - spastorino:avoid-nomination-on-toolstate-breakage, r=Mark...
Dylan DPC [Wed, 25 Mar 2020 22:53:03 +0000 (23:53 +0100)]
Rollup merge of #70407 - spastorino:avoid-nomination-on-toolstate-breakage, r=Mark-Simulacrum

Avoid tagging as I-nominated on toolstate breakage

r? @Mark-Simulacrum

4 years agoRollup merge of #70406 - GuillaumeGomez:cleanup-e0458, r=Dylan-DPC
Dylan DPC [Wed, 25 Mar 2020 22:53:01 +0000 (23:53 +0100)]
Rollup merge of #70406 - GuillaumeGomez:cleanup-e0458, r=Dylan-DPC

Clean up E0458 explanation

r? @Dylan-DPC

4 years agoRollup merge of #70392 - brain0:fixxpy, r=Mark-Simulacrum
Dylan DPC [Wed, 25 Mar 2020 22:52:59 +0000 (23:52 +0100)]
Rollup merge of #70392 - brain0:fixxpy, r=Mark-Simulacrum

Make x.py compatible with python 3.8.

Python 3.8 removes the `time.clock()` function, use `time.perf_counter()` instead.

4 years agoRollup merge of #69700 - anyska:layout-details-rename, r=oli-obk
Dylan DPC [Wed, 25 Mar 2020 22:52:57 +0000 (23:52 +0100)]
Rollup merge of #69700 - anyska:layout-details-rename, r=oli-obk

Rename LayoutDetails to just Layout.

4 years agogitignore: allow target to be a symlink
Ben Boeckel [Wed, 25 Mar 2020 21:29:17 +0000 (17:29 -0400)]
gitignore: allow target to be a symlink

Following rust-lang/cargo#4944.

4 years agoRevert "Automatically tag as nominated for T-compiler"
Santiago Pastorino [Wed, 25 Mar 2020 20:15:12 +0000 (17:15 -0300)]
Revert "Automatically tag as nominated for T-compiler"

This reverts commit 46a8fcdf3cf0eb64b5ac70b4847f1facbdd12be1.

4 years agoClean up E0458 explanation
Guillaume Gomez [Wed, 25 Mar 2020 19:49:36 +0000 (20:49 +0100)]
Clean up E0458 explanation

4 years agoAuto merge of #70404 - Dylan-DPC:rollup-iikcm6r, r=Dylan-DPC
bors [Wed, 25 Mar 2020 19:42:22 +0000 (19:42 +0000)]
Auto merge of #70404 - Dylan-DPC:rollup-iikcm6r, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #70226 (use checked casts and arithmetic in Miri engine)
 - #70319 (correctly normalize constants)
 - #70352 (Add long error explanation for E0710 )
 - #70366 (Implement Fuse with Option)
 - #70379 (fix incorrect type name in doc comments)

Failed merges:

 - #70375 (avoid catching InterpError)

r? @ghost

4 years agoRollup merge of #70379 - JOE1994:patch-2, r=petrochenkov
Dylan DPC [Wed, 25 Mar 2020 18:28:14 +0000 (19:28 +0100)]
Rollup merge of #70379 - JOE1994:patch-2, r=petrochenkov

fix incorrect type name in doc comments

Change : `InterpCtx` => `InterpCx`
(`rustc_mir::interpret::InterpCx`)

4 years agoRollup merge of #70366 - cuviper:option-fuse, r=dtolnay
Dylan DPC [Wed, 25 Mar 2020 18:28:12 +0000 (19:28 +0100)]
Rollup merge of #70366 - cuviper:option-fuse, r=dtolnay

Implement Fuse with Option

The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.

The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.

r? @scottmcm

4 years agoRollup merge of #70352 - bishtpawan:doc/61137-add-long-error-code-e0710, r=Dylan-DPC
Dylan DPC [Wed, 25 Mar 2020 18:28:11 +0000 (19:28 +0100)]
Rollup merge of #70352 - bishtpawan:doc/61137-add-long-error-code-e0710, r=Dylan-DPC

Add long error explanation for E0710

Add long explanation for the E0710 error code
Part of #61137

r? @GuillaumeGomez

4 years agoRollup merge of #70319 - lcnr:issue63695, r=eddyb
Dylan DPC [Wed, 25 Mar 2020 18:28:09 +0000 (19:28 +0100)]
Rollup merge of #70319 - lcnr:issue63695, r=eddyb

correctly normalize constants

closes #70317

implements https://github.com/rust-lang/rust/issues/70125#issuecomment-602133708

r? eddyb cc @varkor

4 years agoRollup merge of #70226 - RalfJung:checked, r=oli-obk
Dylan DPC [Wed, 25 Mar 2020 18:28:08 +0000 (19:28 +0100)]
Rollup merge of #70226 - RalfJung:checked, r=oli-obk

use checked casts and arithmetic in Miri engine

This is unfortunately pretty annoying because we have to cast back and forth between `u64` and `usize` more often that should be necessary, and that cast is considered fallible.

For example, should [this](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/interpret/value/enum.ConstValue.html) really be `usize`?

Also, `LayoutDetails` uses `usize` for field indices, but in Miri we use `u64` to be able to also handle array indexing. Maybe methods like `mplace_field` should be suitably generalized to accept both `u64` and `usize`?

r? @oli-obk Cc @eddyb

4 years agoimpl TrustedRandomAccess for Fuse without FusedIterator
Josh Stone [Wed, 25 Mar 2020 18:09:00 +0000 (11:09 -0700)]
impl TrustedRandomAccess for Fuse without FusedIterator

4 years agoUpdate cargo.
Eric Huss [Wed, 25 Mar 2020 16:03:01 +0000 (09:03 -0700)]
Update cargo.

4 years agoMake x.py compatible with python 3.8.
Thomas Bächler [Wed, 25 Mar 2020 15:11:04 +0000 (16:11 +0100)]
Make x.py compatible with python 3.8.

Python 3.8 removes the time.clock() function, use time.perf_counter() instead.

4 years agorun test only on 64bit
Bastian Kauschke [Wed, 25 Mar 2020 15:07:36 +0000 (16:07 +0100)]
run test only on 64bit

4 years agoRename LayoutDetails to just Layout.
Ana-Maria Mihalache [Wed, 4 Mar 2020 14:13:00 +0000 (14:13 +0000)]
Rename LayoutDetails to just Layout.

4 years agoadd usize methods for Size getters
Ralf Jung [Tue, 24 Mar 2020 16:13:26 +0000 (17:13 +0100)]
add usize methods for Size getters

4 years agogo back to infix ops for Size
Ralf Jung [Tue, 24 Mar 2020 15:43:50 +0000 (16:43 +0100)]
go back to infix ops for Size

4 years agoadd helper method for ptr ops on Scalar; reduce unnecessary large operand of overflow...
Ralf Jung [Tue, 24 Mar 2020 09:16:39 +0000 (10:16 +0100)]
add helper method for ptr ops on Scalar; reduce unnecessary large operand of overflowing_signed_offset

4 years agouse Size addition instead of checked int addition
Ralf Jung [Tue, 24 Mar 2020 09:07:46 +0000 (10:07 +0100)]
use Size addition instead of checked int addition

4 years agomake Size::from* methods generic in the integer type they accept
Ralf Jung [Sun, 22 Mar 2020 16:48:11 +0000 (17:48 +0100)]
make Size::from* methods generic in the integer type they accept

4 years agoremove unnecessary cast
Ralf Jung [Sat, 21 Mar 2020 16:28:46 +0000 (17:28 +0100)]
remove unnecessary cast

4 years agomiri: avoid a bunch of casts by offering usized-based field indexing
Ralf Jung [Sat, 21 Mar 2020 16:17:01 +0000 (17:17 +0100)]
miri: avoid a bunch of casts by offering usized-based field indexing

4 years agoavoid double-cast in mplace_field
Ralf Jung [Sat, 21 Mar 2020 15:28:34 +0000 (16:28 +0100)]
avoid double-cast in mplace_field

4 years agomake bit_width return u64, consistently with other sizes in the compiler
Ralf Jung [Sat, 21 Mar 2020 12:58:06 +0000 (13:58 +0100)]
make bit_width return u64, consistently with other sizes in the compiler

4 years agouse checked casts and arithmetic in Miri engine
Ralf Jung [Sat, 21 Mar 2020 12:49:02 +0000 (13:49 +0100)]
use checked casts and arithmetic in Miri engine

4 years agomiri: simplify shift operator overflow checking
Ralf Jung [Tue, 17 Mar 2020 13:11:51 +0000 (14:11 +0100)]
miri: simplify shift operator overflow checking

4 years agoAuto merge of #70297 - nnethercote:clean-up-debugging-options, r=michaelwoerister
bors [Wed, 25 Mar 2020 14:46:51 +0000 (14:46 +0000)]
Auto merge of #70297 - nnethercote:clean-up-debugging-options, r=michaelwoerister

Clean up debugging options

I found various sub-optimal things when I was looking at option handling.

4 years agoborrowck: prefer "value" over "`_`".
Mazdak Farrokhzad [Wed, 25 Mar 2020 10:17:06 +0000 (11:17 +0100)]
borrowck: prefer "value" over "`_`".

4 years agosimplify check_pat_tuple_struct
Mazdak Farrokhzad [Wed, 25 Mar 2020 08:32:39 +0000 (09:32 +0100)]
simplify check_pat_tuple_struct

4 years agoimprove non-exhaustive struct pat error
Mazdak Farrokhzad [Wed, 25 Mar 2020 07:35:17 +0000 (08:35 +0100)]
improve non-exhaustive struct pat error

4 years agois_union() instead of string comparsion
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:57:00 +0000 (06:57 +0100)]
is_union() instead of string comparsion

4 years agoupdate tool_lints
bishtpawan [Wed, 25 Mar 2020 06:02:23 +0000 (11:32 +0530)]
update tool_lints

4 years agoAuto merge of #70383 - Centril:rollup-hmfft3y, r=Centril
bors [Wed, 25 Mar 2020 05:46:43 +0000 (05:46 +0000)]
Auto merge of #70383 - Centril:rollup-hmfft3y, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #70331 (Increase verbosity when using update syntax with private fields)
 - #70349 (move `hir_id_validation` to `rustc_passes` + simplify `hir::map` code)
 - #70361 (Update backtrace crate to 0.3.46)
 - #70364 (resolve: Remove `rustc_attrs` as a standalone feature gate)
 - #70369 (Fix smaller issues with invalid placeholder type errors)
 - #70373 (normalize some imports & prefer direct ones)
 - #70376 (Add test for #66312)

Failed merges:

r? @ghost

4 years agoRollup merge of #70376 - tmandry:issue-66312, r=Centril
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:38 +0000 (06:45 +0100)]
Rollup merge of #70376 - tmandry:issue-66312, r=Centril

Add test for #66312

Closes #66312. This issue was fixed by #68884.

r? @Zoxc

4 years agoRollup merge of #70373 - Centril:canon-imports, r=Mark-Simulacrum
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:36 +0000 (06:45 +0100)]
Rollup merge of #70373 - Centril:canon-imports, r=Mark-Simulacrum

normalize some imports & prefer direct ones

r? @Mark-Simulacrum

4 years agoRollup merge of #70369 - estebank:bad-placeholder-in-where, r=Centril
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:35 +0000 (06:45 +0100)]
Rollup merge of #70369 - estebank:bad-placeholder-in-where, r=Centril

Fix smaller issues with invalid placeholder type errors

Follow up to #70294.

- Fix placement of suggested generic param when bounds are present.
- Reduce error duplication for invalid placeholder types in `fn` types.

r? @Centril

4 years agoRollup merge of #70364 - petrochenkov:nofrustc, r=Centril
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:33 +0000 (06:45 +0100)]
Rollup merge of #70364 - petrochenkov:nofrustc, r=Centril

resolve: Remove `rustc_attrs` as a standalone feature gate

Now it only gates specific built-in attributes.

So if you want to make a rustc attribute, make it a built-in (this was already the case in practice for some time).

4 years agoRollup merge of #70361 - tmiasko:backtrace, r=Mark-Simulacrum
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:32 +0000 (06:45 +0100)]
Rollup merge of #70361 - tmiasko:backtrace, r=Mark-Simulacrum

Update backtrace crate to 0.3.46

* Support line-tables-only when using libbacktrace
* Update libbacktrace to latest master
* Define HAVE_KERN_PROC on FreeBSD to fix rust-lang/rust#54434

4 years agoRollup merge of #70349 - Centril:hir-outa-rustc, r=Zoxc
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:30 +0000 (06:45 +0100)]
Rollup merge of #70349 - Centril:hir-outa-rustc, r=Zoxc

move `hir_id_validation` to `rustc_passes` + simplify `hir::map` code

r? @Zoxc

4 years agoRollup merge of #70331 - jeremystucki:privacy, r=estebank
Mazdak Farrokhzad [Wed, 25 Mar 2020 05:45:27 +0000 (06:45 +0100)]
Rollup merge of #70331 - jeremystucki:privacy, r=estebank

Increase verbosity when using update syntax with private fields

Resolves #70323

4 years agofix type name typo in doc comments
Youngsuk Kim [Wed, 25 Mar 2020 01:34:36 +0000 (21:34 -0400)]
fix type name typo in doc comments

InterpCtx => InterpCx
(rustc_mir::interpret::InterpCx)

4 years agoReduce error duplication for invalid placeholder types in fn types
Esteban Küber [Tue, 24 Mar 2020 18:35:48 +0000 (11:35 -0700)]
Reduce error duplication for invalid placeholder types in fn types

4 years agoAdd test for #66312
Tyler Mandry [Tue, 24 Mar 2020 23:44:45 +0000 (16:44 -0700)]
Add test for #66312

Closes #66312. This issue was fixed by #68884.

4 years agonormalize some imports, prefer direct ones.
Mazdak Farrokhzad [Tue, 24 Mar 2020 08:09:42 +0000 (09:09 +0100)]
normalize some imports, prefer direct ones.

4 years agoAuto merge of #70371 - Centril:rollup-ywi1vo3, r=Centril
bors [Tue, 24 Mar 2020 20:33:53 +0000 (20:33 +0000)]
Auto merge of #70371 - Centril:rollup-ywi1vo3, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #70023 (clean up E0436 explanation)
 - #70234 (#[track_caller] on core::ops::{Index, IndexMut}.)
 - #70241 (Miri: move ModifiedStatic to ConstEval errors)
 - #70342 (IoSlice/IoSliceMut should be Send and Sync)
 - #70350 (Request "-Z unstable-options" for unstable options)
 - #70355 (Clean up E0454)
 - #70359 (must_use on split_off)
 - #70368 (Mark hotplug_codegen_backend as ignore-stage1)

Failed merges:

r? @ghost

4 years agoRollup merge of #70368 - bjorn3:patch-2, r=jonas-schievink
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:37 +0000 (21:32 +0100)]
Rollup merge of #70368 - bjorn3:patch-2, r=jonas-schievink

Mark hotplug_codegen_backend as ignore-stage1

Suggested by @eddyb in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/do.20we.20really.20need.20stage2.2E.2E.3F/near/191659846.

4 years agoRollup merge of #70359 - kornelski:mustsplit, r=Dylan-DPC
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:36 +0000 (21:32 +0100)]
Rollup merge of #70359 - kornelski:mustsplit, r=Dylan-DPC

must_use on split_off

A couple more for #70194

4 years agoRollup merge of #70355 - GuillaumeGomez:cleanup-e0454, r=Dylan-DPC
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:34 +0000 (21:32 +0100)]
Rollup merge of #70355 - GuillaumeGomez:cleanup-e0454, r=Dylan-DPC

Clean up E0454

r? @Dylan-DPC

4 years agoRollup merge of #70350 - workingjubilee:patch-1, r=Dylan-DPC
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:32 +0000 (21:32 +0100)]
Rollup merge of #70350 - workingjubilee:patch-1, r=Dylan-DPC

Request "-Z unstable-options" for unstable options

Explicitly requests the "-Z unstable-options" flag if someone attempts to use
a cargo option gated by it. This enhances discoverability, particularly in the
instance where the user is on the nightly compiler but isn't using the flag.

This relates to, but does not end with or resolve, issue #65770.

4 years agoRollup merge of #70342 - withoutboats:io-slice-send-sync, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:31 +0000 (21:32 +0100)]
Rollup merge of #70342 - withoutboats:io-slice-send-sync, r=Mark-Simulacrum

IoSlice/IoSliceMut should be Send and Sync

Closes #70308

4 years agoRollup merge of #70241 - RalfJung:global-mem, r=oli-obk
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:29 +0000 (21:32 +0100)]
Rollup merge of #70241 - RalfJung:global-mem, r=oli-obk

Miri: move ModifiedStatic to ConstEval errors

Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically `static` items).

4 years agoRollup merge of #70234 - anp:tracked-std-traits, r=Amanieu
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:28 +0000 (21:32 +0100)]
Rollup merge of #70234 - anp:tracked-std-traits, r=Amanieu

#[track_caller] on core::ops::{Index, IndexMut}.

Applies the attribute to `core::ops::Index(Mut)` and enough std internals to cover the [functions listed in "tier 1" in the original RFC](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md#survey-of-panicking-standard-functions).

Split out from #69251 to allow separate assessment of perf impact.

To my knowledge, this is the last piece of implementing RFC 2091.

Tracking issue: https://github.com/rust-lang/rust/issues/47809

4 years agoRollup merge of #70023 - GuillaumeGomez:cleanup-e0436, r=Centril
Mazdak Farrokhzad [Tue, 24 Mar 2020 20:32:26 +0000 (21:32 +0100)]
Rollup merge of #70023 - GuillaumeGomez:cleanup-e0436, r=Centril

clean up E0436 explanation

r? @Dylan-DPC

4 years agoMark hotplug_codegen_backend as ignore-stage1
bjorn3 [Tue, 24 Mar 2020 19:21:50 +0000 (20:21 +0100)]
Mark hotplug_codegen_backend as ignore-stage1

4 years agoImplement Fuse with Option
Josh Stone [Sun, 22 Mar 2020 23:03:34 +0000 (16:03 -0700)]
Implement Fuse with Option

The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.

The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.

4 years agoresolve: Remove `rustc_attrs` as a standalone feature gate
Vadim Petrochenkov [Tue, 24 Mar 2020 17:41:16 +0000 (20:41 +0300)]
resolve: Remove `rustc_attrs` as a standalone feature gate

Now it only gates specific built-in attributes