]> git.lizzy.rs Git - rust.git/log
rust.git
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

4 years agoFix placement of suggested generic param when bounds are present
Esteban Küber [Tue, 24 Mar 2020 01:46:09 +0000 (18:46 -0700)]
Fix placement of suggested generic param when bounds are present

4 years agofmt
Jeremy Stucki [Tue, 24 Mar 2020 18:26:58 +0000 (19:26 +0100)]
fmt

4 years agomust_use on split_off
Kornel [Tue, 24 Mar 2020 13:33:35 +0000 (13:33 +0000)]
must_use on split_off

#70194

4 years agoupdate mir opt test
Bastian Kauschke [Tue, 24 Mar 2020 15:56:12 +0000 (16:56 +0100)]
update mir opt test

4 years agoAuto merge of #70190 - pietroalbini:gha, r=Mark-Simulacrum
bors [Tue, 24 Mar 2020 15:49:27 +0000 (15:49 +0000)]
Auto merge of #70190 - pietroalbini:gha, r=Mark-Simulacrum

Add GitHub Actions configuration

This PR adds the GitHub Actions configuration to the rust-lang/rust repository. The configuration will be run in parallel with Azure Pipelines until the evaluation finishes: the infrastructure team will then decide whether to switch.

Since GitHub Actions doesn't currently have any way to include pieces of configuration, this also adds the `src/tools/expand-yaml-anchors` tool, which serves as a sort of templating system. Otherwise the configuration is a mostly straight port from the Azure Pipelines configuration (thanks to all the PRs opened in the past).

There are still a few small things I need to fix before we can land this, but it's mostly complete and ready for an initial review.

r? @Mark-Simulacrum

4 years agospaces between braces really ruin readability
Without Boats [Tue, 24 Mar 2020 14:39:29 +0000 (15:39 +0100)]
spaces between braces really ruin readability

4 years agoci: add notice on top of the azure pipelines configuration
Pietro Albini [Mon, 23 Mar 2020 14:01:58 +0000 (15:01 +0100)]
ci: add notice on top of the azure pipelines configuration

This will inform contributors tweaking the Azure Pipelines configuration
that they also need to tweak the GitHub Actions setup.

4 years agobootstrap: remove default and only_host from expand-yaml-anchors
Pietro Albini [Fri, 20 Mar 2020 17:37:34 +0000 (18:37 +0100)]
bootstrap: remove default and only_host from expand-yaml-anchors

4 years agoci: run the "bors build finished" jobs only during try and auto runs
Pietro Albini [Fri, 20 Mar 2020 17:28:47 +0000 (18:28 +0100)]
ci: run the "bors build finished" jobs only during try and auto runs

4 years agoci: move the whole workspace directory on gha/linux
Pietro Albini [Fri, 20 Mar 2020 17:06:21 +0000 (18:06 +0100)]
ci: move the whole workspace directory on gha/linux

Moving just the `obj` directory created problems with mountpoints and
Docker containers, so this tries to symlink the parent directory.

4 years agoci: run gha workflows for try, auto and master on the fork
Pietro Albini [Fri, 20 Mar 2020 15:46:45 +0000 (16:46 +0100)]
ci: run gha workflows for try, auto and master on the fork

4 years agoci: fix out of disk space errors on linux GHA
Pietro Albini [Fri, 20 Mar 2020 16:02:10 +0000 (17:02 +0100)]
ci: fix out of disk space errors on linux GHA

The /mnt mount point has 53GB of free disk space at the time of writing
this commit, so this moves the build there to avoid running out of disk
space during builds.

4 years agoci: don't move the build to C: on GitHub Actions
Pietro Albini [Mon, 16 Dec 2019 11:38:43 +0000 (12:38 +0100)]
ci: don't move the build to C: on GitHub Actions

On Azure Pipeliones, the C: filesystem is huge with a lot of free space,
while D: is small. By default builds happened in D:, so we added a
script to symlink the big directories to C:, granting us more space.

    Filesystem  Size  Used Avail Use%
    C:          256G  143G  114G  56%
    D:           14G  2.0G   13G  15%

On GitHub Actions instead C: is almost full, and we have a lot of free
space on D:, where the build happens.

    Filesystem  Size  Used Avail Use%
    C:          128G  114G   15G  89%
    D:          56G   4.8G   52G   9%

This commit stops creating the symlink on GitHub Actions, fixing the out
of disk space errors we were seeing on some Windows builders.

4 years agoci: add github actions configuration
Pietro Albini [Tue, 26 Nov 2019 11:06:30 +0000 (12:06 +0100)]
ci: add github actions configuration

4 years agoci: rename script windows-symlink-build-dir to symlink-build-dir
Pietro Albini [Fri, 20 Mar 2020 15:49:39 +0000 (16:49 +0100)]
ci: rename script windows-symlink-build-dir to symlink-build-dir

There will be a need to symlink the Linux build directory in the future
as well, so let's make the script name generic.

4 years agoci: fix azure pipeline specific code in install-awscli
Pietro Albini [Tue, 7 Jan 2020 10:08:58 +0000 (11:08 +0100)]
ci: fix azure pipeline specific code in install-awscli

4 years agoRemove unknown lint from deny attribute
bishtpawan [Tue, 24 Mar 2020 13:36:08 +0000 (19:06 +0530)]
Remove unknown lint from deny attribute

4 years agoactually we can reject all reads from mutable allocs in const-prop
Ralf Jung [Tue, 24 Mar 2020 13:31:55 +0000 (14:31 +0100)]
actually we can reject all reads from mutable allocs in const-prop

4 years agoClean up E0454
Guillaume Gomez [Tue, 24 Mar 2020 12:58:00 +0000 (13:58 +0100)]
Clean up E0454

4 years agoAuto merge of #70163 - nikic:llvm-10-preparation, r=cuviper
bors [Tue, 24 Mar 2020 12:42:54 +0000 (12:42 +0000)]
Auto merge of #70163 - nikic:llvm-10-preparation, r=cuviper

Prepare for LLVM 10 upgrade

This is #67759 minus the submodule update.

 * Fix two compatibility issues in the rustllvm wrapper.
 * Update data layout strings in tests.
 * Fix LLVM version comparison (this become a problem because the major version has two digits now).

r? @cuviper

4 years agoAdd explanation for inner attribute
bishtpawan [Tue, 24 Mar 2020 11:41:04 +0000 (17:11 +0530)]
Add explanation for inner attribute

4 years agoimprove normalize cycle error
Bastian Kauschke [Tue, 24 Mar 2020 10:24:24 +0000 (11:24 +0100)]
improve normalize cycle error

4 years agoUpdate tools_lints
bishtpawan [Tue, 24 Mar 2020 10:11:31 +0000 (15:41 +0530)]
Update tools_lints