]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoCorrect handling of arguments in async fn
Taiki Endo [Sun, 5 May 2019 03:03:32 +0000 (12:03 +0900)]
Correct handling of arguments in async fn

5 years agoAuto merge of #60476 - froydnj:aarch64-profiling, r=alexcrichton
bors [Sun, 5 May 2019 00:40:38 +0000 (00:40 +0000)]
Auto merge of #60476 - froydnj:aarch64-profiling, r=alexcrichton

build dist-aarch64-linux with --enable-profiler

This change should enable PGO to be used for aarch64-linux.

Fixes #57257.

5 years agoAuto merge of #60415 - jespersm:pr_unused_import_45268, r=petrochenkov
bors [Sat, 4 May 2019 21:50:11 +0000 (21:50 +0000)]
Auto merge of #60415 - jespersm:pr_unused_import_45268, r=petrochenkov

Fix #45268 by saving all NodeId's for resolved traits.

This fixes #45268 by saving all NodeId's for resolved traits.

I've verifies this against master (but only on MacOS). However, with some recent changes in master, it appears that there are some failures on my machine. They are unrelated to my changes, anyway.

5 years agoEarly error for mixing order of const and type parameters
varkor [Sat, 4 May 2019 13:38:10 +0000 (14:38 +0100)]
Early error for mixing order of const and type parameters

5 years agoRevert Cargo.lock changes accidentally introduced during rebase
Vadim Petrochenkov [Sat, 4 May 2019 21:12:38 +0000 (00:12 +0300)]
Revert Cargo.lock changes accidentally introduced during rebase

5 years agoDelegate SmallVec's stable_hash to array's stable_hash.
Jesper Steen Møller [Thu, 2 May 2019 18:16:48 +0000 (20:16 +0200)]
Delegate SmallVec's stable_hash to array's stable_hash.

5 years agoHash all of the import_ids for the TraitCandidate.
Jesper Steen Møller [Thu, 2 May 2019 13:08:03 +0000 (15:08 +0200)]
Hash all of the import_ids for the TraitCandidate.

5 years agoRemoved unneccesary reference for trait name
Jesper Steen Møller [Thu, 2 May 2019 11:40:12 +0000 (13:40 +0200)]
Removed unneccesary reference for trait name

5 years agoUse binding autoref, because we can.
Jesper Steen Møller [Thu, 2 May 2019 09:56:45 +0000 (11:56 +0200)]
Use binding autoref, because we can.

5 years agoReuse 'kind' parameter.
Jesper Steen Møller [Thu, 2 May 2019 06:31:15 +0000 (08:31 +0200)]
Reuse 'kind' parameter.

5 years agoImproved name: first_import_id
Jesper Steen Møller [Thu, 2 May 2019 06:30:16 +0000 (08:30 +0200)]
Improved name: first_import_id

5 years agoRevert the introduced typedefs
Jesper Steen Møller [Thu, 2 May 2019 06:27:57 +0000 (08:27 +0200)]
Revert the introduced typedefs

5 years agoFix misleading indentation
Jesper Steen Møller [Wed, 1 May 2019 13:17:43 +0000 (15:17 +0200)]
Fix misleading indentation

5 years agoFix #45268 by saving all NodeId's for resolved traits.
Jesper Steen Møller [Tue, 30 Apr 2019 13:59:29 +0000 (15:59 +0200)]
Fix #45268 by saving all NodeId's for resolved traits.

5 years agoRemove `Res::Label`
Vadim Petrochenkov [Sat, 4 May 2019 14:22:00 +0000 (17:22 +0300)]
Remove `Res::Label`

Paths can never resolve to labels

5 years agoRename `Res::kind_name` to `Res::descr` for consistency
Vadim Petrochenkov [Sat, 4 May 2019 12:22:00 +0000 (15:22 +0300)]
Rename `Res::kind_name` to `Res::descr` for consistency

5 years agoRename `PathResolution` to `PartialRes`
Vadim Petrochenkov [Sat, 4 May 2019 12:18:58 +0000 (15:18 +0300)]
Rename `PathResolution` to `PartialRes`

Don't use `PartialRes` when `Res` is enough

5 years agoAdd tests
varkor [Fri, 3 May 2019 13:42:38 +0000 (14:42 +0100)]
Add tests

5 years agoFix subst error for consts in wfcheck
varkor [Fri, 3 May 2019 13:42:32 +0000 (14:42 +0100)]
Fix subst error for consts in wfcheck

5 years agoFix subst error for consts in astconv
varkor [Fri, 3 May 2019 13:42:04 +0000 (14:42 +0100)]
Fix subst error for consts in astconv

5 years agoImprove subst error when parameter kinds mismatch
varkor [Fri, 3 May 2019 13:41:47 +0000 (14:41 +0100)]
Improve subst error when parameter kinds mismatch

5 years agoAuto merge of #60538 - matthiaskrgr:submodule_upd, r=eddyb
bors [Sat, 4 May 2019 13:08:58 +0000 (13:08 +0000)]
Auto merge of #60538 - matthiaskrgr:submodule_upd, r=eddyb

submodules: update clippy from 2ed0b3bf to fc96aa03

Changes:
````
Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)
Fix link in into_iter_on_array documentation
remove function body from "too many args" span
check closure arguments before use it
format code
fix suggestion for search_is_some
fix suggestion for search_is_some naively
change |&x| to |x| in stderr file
cargo fmt
useless_let_if_seq handle interior mutability
````
Fixes https://github.com/rust-lang/rust/issues/60534

5 years agoremoving param_env from pointee_info_at
Saleem Jaffer [Sat, 4 May 2019 12:36:40 +0000 (18:06 +0530)]
removing param_env from pointee_info_at

5 years agomatch on type directlty
Ralf Jung [Sat, 4 May 2019 11:49:04 +0000 (13:49 +0200)]
match on type directlty

5 years agofix Miri visiting generators
Ralf Jung [Sat, 4 May 2019 11:14:56 +0000 (13:14 +0200)]
fix Miri visiting generators

5 years agoresolving conflicts
Saleem Jaffer [Sat, 4 May 2019 10:40:47 +0000 (16:10 +0530)]
resolving conflicts

5 years agoAuto merge of #60117 - sunfishcode:wasi-os, r=sunfishcode
bors [Sat, 4 May 2019 10:22:05 +0000 (10:22 +0000)]
Auto merge of #60117 - sunfishcode:wasi-os, r=sunfishcode

Categorize WASI as an "OS" rather than as an "environment".

This distinction is fairly abstract, but in practice, the main advantage
here is that LLVM's triple code considers WASI to be an OS, so this
makes rustc agree with that.

5 years agoadding HasParamEnv trait
Saleem Jaffer [Sat, 4 May 2019 09:32:22 +0000 (15:02 +0530)]
adding HasParamEnv trait

5 years agoadding is_freeze to TyLayoutMethods
Saleem Jaffer [Fri, 3 May 2019 07:35:10 +0000 (13:05 +0530)]
adding is_freeze to TyLayoutMethods

5 years agoremoving map_same from MaybeResult
Saleem Jaffer [Tue, 30 Apr 2019 06:49:53 +0000 (12:19 +0530)]
removing map_same from MaybeResult

5 years agosubmodules: update clippy from 2ed0b3bf to fc96aa03
Matthias Krüger [Sat, 4 May 2019 09:47:37 +0000 (11:47 +0200)]
submodules: update clippy from 2ed0b3bf to fc96aa03

Changes:
````
Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)
Fix link in into_iter_on_array documentation
remove function body from "too many args" span
check closure arguments before use it
format code
fix suggestion for search_is_some
fix suggestion for search_is_some naively
change |&x| to |x| in stderr file
cargo fmt
useless_let_if_seq handle interior mutability
````

5 years agoadd to_result to ty::MaybeResult
Saleem Jaffer [Thu, 25 Apr 2019 12:52:34 +0000 (18:22 +0530)]
add to_result to ty::MaybeResult

5 years agotidy fixes
Saleem Jaffer [Wed, 24 Apr 2019 15:55:56 +0000 (21:25 +0530)]
tidy fixes

5 years agoresolving conflicts
Saleem Jaffer [Wed, 24 Apr 2019 14:59:46 +0000 (20:29 +0530)]
resolving conflicts

5 years agoimpl `pointee_info_at` in TyLayout.
Daan de Graaf [Mon, 11 Mar 2019 20:26:49 +0000 (21:26 +0100)]
impl `pointee_info_at` in TyLayout.

5 years agoMake line fit within 100 character limit.
Daan de Graaf [Fri, 11 Jan 2019 10:26:47 +0000 (11:26 +0100)]
Make line fit within 100 character limit.

5 years agoAdd param_env parameter to pointee_info_at.
Daan de Graaf [Fri, 28 Dec 2018 14:19:23 +0000 (15:19 +0100)]
Add param_env parameter to pointee_info_at.

An associated type ParamEnv has been added to TyLayoutMethods to
facilitate this.

5 years agoRemove old pointee_info_at body.
Daan de Graaf [Fri, 28 Dec 2018 12:15:39 +0000 (13:15 +0100)]
Remove old pointee_info_at body.

5 years agoReturn instead of collecting to mut result.
Daan de Graaf [Fri, 28 Dec 2018 11:52:31 +0000 (12:52 +0100)]
Return instead of collecting to mut result.

5 years agoFix typo in src/librustc/ty/layout.rs
Oliver Scherer [Fri, 28 Dec 2018 11:23:23 +0000 (12:23 +0100)]
Fix typo in src/librustc/ty/layout.rs

Co-Authored-By: wildarch <daandegraaf9@gmail.com>
5 years agoMove pointee_info_at to TyLayoutMethods.
Daan de Graaf [Mon, 24 Dec 2018 16:52:50 +0000 (17:52 +0100)]
Move pointee_info_at to TyLayoutMethods.

The original implementation is still present at
librustc_codegen_llvm/abi.rs, should be removed later to prevent code
duplication.

5 years agoRemove `def_path_from_id`, `node_id_to_string`
Fabian Drinck [Sat, 27 Apr 2019 20:39:17 +0000 (22:39 +0200)]
Remove `def_path_from_id`, `node_id_to_string`

5 years agoReplace `NodeId` variant of `read`
Fabian Drinck [Sat, 27 Apr 2019 17:24:45 +0000 (19:24 +0200)]
Replace `NodeId` variant of `read`

5 years agoRemove obsolete comment
Fabian Drinck [Sat, 27 Apr 2019 17:23:00 +0000 (19:23 +0200)]
Remove obsolete comment

5 years agoAuto merge of #60537 - Centril:rollup-42jxz82, r=Centril
bors [Sat, 4 May 2019 07:40:13 +0000 (07:40 +0000)]
Auto merge of #60537 - Centril:rollup-42jxz82, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #60429 (Account for paths in incorrect pub qualifier help)
 - #60449 (Constrain all regions in the concrete type for an opaque type)
 - #60486 (Place related refactors)
 - #60513 (Remove -Z borrowck=compare flag)
 - #60516 (Remove TypeckMir)
 - #60517 (Reword casting message)
 - #60520 (Add rustfmt toml)
 - #60521 (Migrate tidy to rust 2018 edition)
 - #60527 (Fix async fn lowering ICE with APIT.)

Failed merges:

r? @ghost

5 years agoRollup merge of #60527 - davidtwco:issue-60518, r=cramertj
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:34 +0000 (09:21 +0200)]
Rollup merge of #60527 - davidtwco:issue-60518, r=cramertj

Fix async fn lowering ICE with APIT.

Fixes #60518.

This PR fixes an ICE where simple bindings (which aren't replaced with replacement arguments during async fn lowering) were not being visited in the def collector and thus caused an ICE during HIR lowering for types that use their `DefId` at that point - such as `impl Trait`.

r? @cramertj

5 years agoRollup merge of #60521 - rasendubi:tidy-2018-edition, r=Centril
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:32 +0000 (09:21 +0200)]
Rollup merge of #60521 - rasendubi:tidy-2018-edition, r=Centril

Migrate tidy to rust 2018 edition

cc @Centril

5 years agoRollup merge of #60520 - matklad:rustfmt-all-the-new-things, r=Centril
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:31 +0000 (09:21 +0200)]
Rollup merge of #60520 - matklad:rustfmt-all-the-new-things, r=Centril

Add rustfmt toml

This commit adds an rustfmt.toml for using for **new** code.
Old code should continut to use old style, until we put automated
style checks in place.

See
https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81
for the reason why we deviate from the default formatting. The TL;DR
is that currently compiler uses a pretty condensed style of code, and
default settings both create a huge diff and inflate the number of
lines. use_small_heuristics=Max fixes that.

version=Two is required for bug-fixes, which technically can't be made
to the stable first version

cc @Centril: I guess adding config file with agreed-upon formatting doesn't hurt :-)

EDIT: Zullip discussion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/x.2Epy.20fmt

5 years agoRollup merge of #60517 - estebank:wording, r=davidtwco
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:29 +0000 (09:21 +0200)]
Rollup merge of #60517 - estebank:wording, r=davidtwco

Reword casting message

r? @davidtwco

5 years agoRollup merge of #60516 - JohnTitor:remove-typeck, r=matthewjasper
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:27 +0000 (09:21 +0200)]
Rollup merge of #60516 - JohnTitor:remove-typeck, r=matthewjasper

Remove TypeckMir

Fixes #60422

r? @matthewjasper

5 years agoRollup merge of #60513 - chrisvittal:remove-borrowck-compare, r=matthewjasper
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:26 +0000 (09:21 +0200)]
Rollup merge of #60513 - chrisvittal:remove-borrowck-compare, r=matthewjasper

Remove -Z borrowck=compare flag

This is the start of the work that needs to be done on #59193. It just removes the flag and updates
the tests.

r? @matthewjasper

5 years agoRollup merge of #60486 - spastorino:place-related-refactors, r=oli-obk
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:24 +0000 (09:21 +0200)]
Rollup merge of #60486 - spastorino:place-related-refactors, r=oli-obk

Place related refactors

Meanwhile I was working on Place 2 I'm finding some little things that I had on my branch but preferred to land a separate PR for things that are simpler to merge.

r? @oli-obk

5 years agoRollup merge of #60449 - matthewjasper:impl-trait-outlives, r=pnkfelix
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:23 +0000 (09:21 +0200)]
Rollup merge of #60449 - matthewjasper:impl-trait-outlives, r=pnkfelix

Constrain all regions in the concrete type for an opaque type

`push_outlives_components` skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes #57464
Closes #60127

5 years agoRollup merge of #60429 - estebank:pub-path, r=michaelwoerister
Mazdak Farrokhzad [Sat, 4 May 2019 07:21:21 +0000 (09:21 +0200)]
Rollup merge of #60429 - estebank:pub-path, r=michaelwoerister

Account for paths in incorrect pub qualifier help

Handle case where incorrect pub qualifier with a mod path is used and provide the same help given for all other incorrect qualifiers by making the `pub(crate)` parse check more specific.

5 years agoBump libc dependency to 0.2.54.
Dan Gohman [Fri, 3 May 2019 13:43:25 +0000 (06:43 -0700)]
Bump libc dependency to 0.2.54.

5 years agoCategorize WASI as an "OS" rather than as an "environment".
Dan Gohman [Fri, 19 Apr 2019 16:59:35 +0000 (09:59 -0700)]
Categorize WASI as an "OS" rather than as an "environment".

This distinction is fairly abstract, but in practice, the main advantage
here is that LLVM's triple code considers WASI to be an OS, so this
makes rustc agree with that.

5 years agoCorrect code points to match their textual description
Gianluca Recchia [Sat, 4 May 2019 05:44:30 +0000 (07:44 +0200)]
Correct code points to match their textual description

5 years agoAuto merge of #59897 - tmandry:variantful-generators, r=eddyb
bors [Sat, 4 May 2019 03:18:14 +0000 (03:18 +0000)]
Auto merge of #59897 - tmandry:variantful-generators, r=eddyb

Multi-variant layouts for generators

This allows generators to overlap fields using variants, but doesn't do any such overlapping yet. It creates one variant for every state of the generator (unresumed, returned, panicked, plus one for every yield), and puts every stored local in each of the yield-point variants.

Required for optimizing generator layouts (#52924).

There was quite a lot of refactoring needed for this change. I've done my best in later commits to eliminate assumptions in the code that only certain kinds of types are multi-variant, and to centralize knowledge of the inner mechanics of generators in as few places as possible.

This change also emits debuginfo about the fields contained in each variant, as well as preserving debuginfo about stored locals while running in the generator.

Also, fixes #59972.

Future work:
- Use this change for an optimization pass that actually overlaps locals within the generator struct (#52924)
- In the type layout fields, don't include locals that are uninitialized for a particular variant, so miri and UB sanitizers can check our memory (see https://github.com/rust-lang/rust/issues/59972#issuecomment-483058172)
- Preserve debuginfo scopes across generator yield points

5 years agoAddress review comments
Tyler Mandry [Fri, 3 May 2019 23:11:39 +0000 (16:11 -0700)]
Address review comments

5 years agoRemove unused feature(need_allocator).
Mazdak Farrokhzad [Sat, 4 May 2019 02:20:55 +0000 (04:20 +0200)]
Remove unused feature(need_allocator).

5 years agorustc: rename DefPathData::{MacroDef,LifetimeParam} to {Macro,Lifetime}Ns.
Eduard-Mihai Burtescu [Fri, 3 May 2019 19:45:36 +0000 (22:45 +0300)]
rustc: rename DefPathData::{MacroDef,LifetimeParam} to {Macro,Lifetime}Ns.

5 years agorustc: collapse relevant DefPathData variants into ValueNs.
Eduard-Mihai Burtescu [Fri, 3 May 2019 19:28:29 +0000 (22:28 +0300)]
rustc: collapse relevant DefPathData variants into ValueNs.

5 years agorustc: collapse relevant DefPathData variants into TypeNs.
Eduard-Mihai Burtescu [Fri, 3 May 2019 18:51:24 +0000 (21:51 +0300)]
rustc: collapse relevant DefPathData variants into TypeNs.

5 years agoRename 'no tracking issue START' to fit better with tidy.
Mazdak Farrokhzad [Sat, 4 May 2019 01:34:05 +0000 (03:34 +0200)]
Rename 'no tracking issue START' to fit better with tidy.

5 years agoEnforce sorting of accepted and removed features.
Mazdak Farrokhzad [Sat, 4 May 2019 01:26:52 +0000 (03:26 +0200)]
Enforce sorting of accepted and removed features.

5 years agoAuto merge of #60462 - eddyb:def-1-a-mere-resolution, r=petrochenkov
bors [Fri, 3 May 2019 23:11:17 +0000 (23:11 +0000)]
Auto merge of #60462 - eddyb:def-1-a-mere-resolution, r=petrochenkov

rustc: factor out most of hir::def::Def's variants into DefKind, and rename to Res.

The first two commits are about introducing `DefKind`, both to simplify/orthogonalize `hir::def::Def`, and to allow reasoning about the kind of a definition without dealing with the redundant `DefId`.
(There are likely more changes to be made, such as adding enough `DefKind` variants for `tcx.def_kind(def_id)` to return just `DefKind`, not `Option<DefKind>`, but this is pretty big as-is)

The third commit frees up the `Def` name (which we may want to use in the future for "definitions", in the sense of "entities with a `DefId`") by renaming `hir::def::Def` to `Res` ("resolution").
IMO this fits, as it represents all the possible name resolution results, not just "definitions (with a `DefId`)".

Quick examples:
```rust
// Before:
if tcx.describe_def(def_id) == Some(Def::Struct(def_id)) {...}
if let Def::Struct(def_id) = path.def {...}
```
```rust
// After:
if tcx.def_kind(def_id) == Some(DefKind::Struct) {...}
if let Res::Def(DefKind::Struct, def_id) = path.res {...}
```

r? @petrochenkov cc @rust-lang/compiler

5 years agoSplit out debuginfo from type info in MIR GeneratorLayout
Tyler Mandry [Fri, 3 May 2019 23:03:05 +0000 (16:03 -0700)]
Split out debuginfo from type info in MIR GeneratorLayout

5 years agoFix async fn lowering ICE with APIT.
David Wood [Fri, 3 May 2019 21:36:35 +0000 (22:36 +0100)]
Fix async fn lowering ICE with APIT.

This commit fixes an ICE where simple bindings (which aren't replaced
with replacement arguments during async fn lowering) were not being
visited in the def collector and thus caused an ICE during HIR lowering
for types that use their `DefId` at that point - such as `impl Trait`.

5 years agoUpdate help message
Christopher Vittal [Fri, 3 May 2019 21:34:17 +0000 (17:34 -0400)]
Update help message

5 years agoMake variant_fields inner an IndexVec
Tyler Mandry [Fri, 3 May 2019 21:25:22 +0000 (14:25 -0700)]
Make variant_fields inner an IndexVec

5 years agorustc: Always handle exported symbols on the wasm target
Alex Crichton [Fri, 3 May 2019 20:59:50 +0000 (13:59 -0700)]
rustc: Always handle exported symbols on the wasm target

Currently when linking an artifact rustc will only conditionally call
the `Linker::export_symbols` function, but this causes issues on some
targets, like WebAssembly, where it means that executable outputs will
not have the same symbols exported that cdylib outputs have. This commit
sinks the conditional call to `export_symbols` inside the various
implementations of the function that still need it, and otherwise the
wasm linker is configured to always pass through symbol visibility
lists.

5 years agorustc: rename hir::def::Def to Res (short for "resolution").
Eduard-Mihai Burtescu [Sat, 20 Apr 2019 16:36:05 +0000 (19:36 +0300)]
rustc: rename hir::def::Def to Res (short for "resolution").

5 years agorustc: use DefKind instead of Def, where possible.
Eduard-Mihai Burtescu [Sat, 20 Apr 2019 16:46:19 +0000 (19:46 +0300)]
rustc: use DefKind instead of Def, where possible.

5 years agorustc: factor most DefId-containing variants out of Def and into DefKind.
Eduard-Mihai Burtescu [Sat, 20 Apr 2019 15:26:26 +0000 (18:26 +0300)]
rustc: factor most DefId-containing variants out of Def and into DefKind.

5 years agotidy: Extract `let mut part` out of `parts` block in `version.rs`
Alexey Shmalko [Fri, 3 May 2019 19:45:59 +0000 (22:45 +0300)]
tidy: Extract `let mut part` out of `parts` block in `version.rs`

5 years agoAuto merge of #60496 - jethrogb:jb/address-integer-overflow, r=alexcrichton
bors [Fri, 3 May 2019 19:42:13 +0000 (19:42 +0000)]
Auto merge of #60496 - jethrogb:jb/address-integer-overflow, r=alexcrichton

Fix potential integer overflow in SGX memory range calculation.

Thanks to Eduard Marin and David Oswald at the University of Burmingham, and Jo Van Bulck at KU Leuven for discovering this issue.

5 years agoFix test
Yuki Okushi [Fri, 3 May 2019 19:24:32 +0000 (04:24 +0900)]
Fix test

5 years agoMigrate tidy to rust 2018 edition
Alexey Shmalko [Fri, 3 May 2019 19:19:24 +0000 (22:19 +0300)]
Migrate tidy to rust 2018 edition

5 years agoAdd rustfmt toml
Aleksey Kladov [Fri, 3 May 2019 18:35:21 +0000 (21:35 +0300)]
Add rustfmt toml

This commit adds an rustfmt.toml for using for **new** code.
Old code should continut to use old style, until we put automated
style checks in place.

See
https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81
for the reason why we deviate from the default formatting. The TL;DR
is that currently compiler uses a pretty condensed style of code, and
default settings both create a huge diff and inflate the number of
lines. use_small_heuristics=Max fixes that.

version=Two is required for bug-fixes, which technically can't be made
to the stable first version

5 years agoReword casting message
Esteban Küber [Fri, 3 May 2019 17:41:26 +0000 (10:41 -0700)]
Reword casting message

5 years agoRemove TypeckMir
Yuki Okushi [Fri, 3 May 2019 17:24:42 +0000 (02:24 +0900)]
Remove TypeckMir

5 years agouse span instead of div for since version
Andy Russell [Fri, 3 May 2019 16:55:31 +0000 (12:55 -0400)]
use span instead of div for since version

5 years agoAuto merge of #60510 - Centril:rollup-gsndjbp, r=Centril
bors [Fri, 3 May 2019 15:10:16 +0000 (15:10 +0000)]
Auto merge of #60510 - Centril:rollup-gsndjbp, r=Centril

Rollup of 12 pull requests

Successful merges:

 - #59928 (Make deprecation lint `ambiguous_associated_items` deny-by-default)
 - #60220 (report fatal errors during doctest parsing)
 - #60373 (Tidy: ensure lang features are sorted by since)
 - #60388 (Disallow non-explicit elided lifetimes in async fn)
 - #60393 ( Do not suggest incorrect syntax on pattern type error due to borrow)
 - #60401 (Rename `RUST_LOG` to `RUSTC_LOG`)
 - #60409 (Require a trait in the bounds of existential types)
 - #60455 (Resolve match arm ty when arms diverge)
 - #60457 (Const prop refactoring)
 - #60467 (Avoid repeated interning of static strings.)
 - #60478 (minor compiler doc tweaks)
 - #60501 (Propagate mutability from arguments to local bindings in async fn)

Failed merges:

r? @ghost

5 years agoRollup merge of #60501 - taiki-e:async-await-mutable-arguments, r=cramertj
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:09 +0000 (16:25 +0200)]
Rollup merge of #60501 - taiki-e:async-await-mutable-arguments, r=cramertj

Propagate mutability from arguments to local bindings in async fn

Fixes #60498

cc @nikomatsakis
r? @davidtwco

5 years agoRollup merge of #60478 - euclio:doc-fixes, r=cramertj
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:08 +0000 (16:25 +0200)]
Rollup merge of #60478 - euclio:doc-fixes, r=cramertj

minor compiler doc tweaks

5 years agoRollup merge of #60467 - nnethercote:less-symbol-interning, r=davidtwco
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:06 +0000 (16:25 +0200)]
Rollup merge of #60467 - nnethercote:less-symbol-interning, r=davidtwco

Avoid repeated interning of static strings.

`file_metadata_raw` interns the strings `"<unknown>"` and `""` very
frequently. This commit avoids that, which reduces the number of symbols
interned significantly and reduces instruction counts by up to 0.5% on
some workloads.

5 years agoRollup merge of #60457 - wesleywiser:const_prop_refactoring, r=oli-obk
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:05 +0000 (16:25 +0200)]
Rollup merge of #60457 - wesleywiser:const_prop_refactoring, r=oli-obk

Const prop refactoring

This is rebased on top of #60428 so only the top commit is new.

This is the refactoring to remove the `mir` field from `ConstPropagator` which is necessary before we can begin to actually propagate constants.

r? @oli-obk

5 years agoRollup merge of #60455 - estebank:resolve-match-arm-ty, r=davidtwco
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:04 +0000 (16:25 +0200)]
Rollup merge of #60455 - estebank:resolve-match-arm-ty, r=davidtwco

Resolve match arm ty when arms diverge

Fix #58695.

5 years agoRollup merge of #60409 - JohnTitor:error-for-existential-type, r=oli-obk
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:02 +0000 (16:25 +0200)]
Rollup merge of #60409 - JohnTitor:error-for-existential-type, r=oli-obk

Require a trait in the bounds of existential types

Fixes #53090

r? @oli-obk

5 years agoRollup merge of #60401 - JohnTitor:rename-log, r=davidtwco
Mazdak Farrokhzad [Fri, 3 May 2019 14:25:00 +0000 (16:25 +0200)]
Rollup merge of #60401 - JohnTitor:rename-log, r=davidtwco

Rename `RUST_LOG` to `RUSTC_LOG`

cc: #57985

I think we should also change these submodules:

- rustc-guide
- Cargo (rename to `CARGO_LOG`, cc: https://github.com/rust-lang/cargo/pull/6605, https://github.com/rust-lang/cargo/issues/6189)
- miri
- rls
- rustfmt

r? @davidtwco

5 years agoRollup merge of #60393 - estebank:pat-sugg, r=oli-obk
Mazdak Farrokhzad [Fri, 3 May 2019 14:24:59 +0000 (16:24 +0200)]
Rollup merge of #60393 - estebank:pat-sugg, r=oli-obk

 Do not suggest incorrect syntax on pattern type error due to borrow

Fix #55174.

5 years agoRollup merge of #60388 - cramertj:elided-lifetime-async, r=nikomatsakis
Mazdak Farrokhzad [Fri, 3 May 2019 14:24:57 +0000 (16:24 +0200)]
Rollup merge of #60388 - cramertj:elided-lifetime-async, r=nikomatsakis

Disallow non-explicit elided lifetimes in async fn

Fix https://github.com/rust-lang/rust/issues/60203

r? @nikomatsakis

5 years agoRollup merge of #60373 - rasendubi:lang-features-sort-since, r=Centril
Mazdak Farrokhzad [Fri, 3 May 2019 14:24:56 +0000 (16:24 +0200)]
Rollup merge of #60373 - rasendubi:lang-features-sort-since, r=Centril

Tidy: ensure lang features are sorted by since

This is the tidy side of https://github.com/rust-lang/rust/issues/60361.

What is left is actually splitting features into groups and sorting by since.

This PR also likely to produce a small (a couple of lines) merge conflict with https://github.com/rust-lang/rust/pull/60362.

r? @Centril

5 years agoRollup merge of #60220 - euclio:rustdoc-test-fatal-parsing-errors, r=QuietMisdreavus
Mazdak Farrokhzad [Fri, 3 May 2019 14:24:54 +0000 (16:24 +0200)]
Rollup merge of #60220 - euclio:rustdoc-test-fatal-parsing-errors, r=QuietMisdreavus

report fatal errors during doctest parsing

Fixes #59557.

5 years agoRollup merge of #59928 - petrochenkov:denyambass, r=varkor
Mazdak Farrokhzad [Fri, 3 May 2019 14:24:52 +0000 (16:24 +0200)]
Rollup merge of #59928 - petrochenkov:denyambass, r=varkor

Make deprecation lint `ambiguous_associated_items` deny-by-default

As requested by r? @Centril

cc https://github.com/rust-lang/rust/issues/57644

5 years agoAuto merge of #60423 - varkor:update-getopts, r=alexcrichton
bors [Fri, 3 May 2019 10:15:48 +0000 (10:15 +0000)]
Auto merge of #60423 - varkor:update-getopts, r=alexcrichton

Update getopts

This is a prerequisite to fixing https://github.com/rust-lang/rust/issues/32352. The rustbuild fix has been pulled out of https://github.com/rust-lang/rust/pull/59440.

r? @alexcrichton

5 years agoAuto merge of #59883 - ebarnard:clonefile, r=sfackler
bors [Fri, 3 May 2019 07:26:46 +0000 (07:26 +0000)]
Auto merge of #59883 - ebarnard:clonefile, r=sfackler

Make `std::fs::copy` attempt to create copy-on-write clones of files on MacOS

The behaviour of MacOS now matches Linux which uses `copy_file_range` to perform CoW file copies where available and supported by the underlying filesystem.

5 years agoUpdate tests
Christopher Vittal [Thu, 2 May 2019 22:34:15 +0000 (18:34 -0400)]
Update tests

5 years agoPropagate mutability from arguments to local bindings in async fn
Taiki Endo [Fri, 3 May 2019 04:04:26 +0000 (13:04 +0900)]
Propagate mutability from arguments to local bindings in async fn

5 years agoFix potential integer overflow in SGX memory range calculation.
Jethro Beekman [Fri, 3 May 2019 01:15:44 +0000 (18:15 -0700)]
Fix potential integer overflow in SGX memory range calculation.

Thanks to Eduard Marin and David Oswald at the University of Burmingham,
and Jo Van Bulck at KU Leuven for discovering this issue.