]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #68818 - matthiaskrgr:misc_perf, r=Mark-Simulacrum
Dylan DPC [Tue, 4 Feb 2020 20:51:56 +0000 (21:51 +0100)]
Rollup merge of #68818 - matthiaskrgr:misc_perf, r=Mark-Simulacrum

fix couple of perf related clippy warnings

librustc: don't clone a type that is copy
librustc_incremental: use faster vector initialization
librustc_typeck: don't clone a type that is copy
librustdoc: don't create a vector where a slice will do

4 years agoRollup merge of #68815 - matthiaskrgr:redundant_imports, r=alexcrichton
Dylan DPC [Tue, 4 Feb 2020 20:51:55 +0000 (21:51 +0100)]
Rollup merge of #68815 - matthiaskrgr:redundant_imports, r=alexcrichton

remove redundant imports (clippy::single_component_path_imports)

4 years agoRollup merge of #68810 - ollie27:once_with_copy, r=Dylan-DPC
Dylan DPC [Tue, 4 Feb 2020 20:51:53 +0000 (21:51 +0100)]
Rollup merge of #68810 - ollie27:once_with_copy, r=Dylan-DPC

Remove Copy impl from OnceWith

Iterators typically don't implement `Copy` and this shouldn't be an exception.

4 years agoRollup merge of #68805 - matthiaskrgr:cleanup_bootstrap, r=Mark-Simulacrum
Dylan DPC [Tue, 4 Feb 2020 20:51:52 +0000 (21:51 +0100)]
Rollup merge of #68805 - matthiaskrgr:cleanup_bootstrap, r=Mark-Simulacrum

bootstrap: fix clippy warnings

r? @oli-obk

4 years agoRollup merge of #68758 - daboross:fix-59191, r=petrochenkov
Dylan DPC [Tue, 4 Feb 2020 20:51:50 +0000 (21:51 +0100)]
Rollup merge of #68758 - daboross:fix-59191, r=petrochenkov

Fix 59191 - ICE when macro replaces crate root with non-module item

Hi,

This should fix #59191! My friend and I are working on learning the rustc codebase through contributions, so please feel free to mention anything amiss or that could be done better.

The code adds an explicit case for when a macro applied to the crate root (via an inner attribute) replaces it with something nonsensical, like a function. The crate root must be a module, and the error message reflects this.

---

I should note that there are a few other weird edge cases here, like if they do output a module, it succeeds but uses that module's name as a prefix for all names in the crate. I'm assuming that's an issue for stabilizing #54726, though.

4 years agoRollup merge of #68282 - tmiasko:sanitizer-example, r=steveklabnik
Dylan DPC [Tue, 4 Feb 2020 20:51:48 +0000 (21:51 +0100)]
Rollup merge of #68282 - tmiasko:sanitizer-example, r=steveklabnik

Instrument C / C++ in MemorySanitizer example

Modify the example to instrument C / C++ in addition to Rust, since it
will be generally required (e.g., when using libbacktrace for symbolication).

4 years agoAuto merge of #68377 - estebank:fn-obligations-spans, r=oli-obk
bors [Tue, 4 Feb 2020 17:17:55 +0000 (17:17 +0000)]
Auto merge of #68377 - estebank:fn-obligations-spans, r=oli-obk

Tweak obligation error output

- Point at arguments or output when fn obligations come from them, or ident when they don't
- Point at `Sized` bound (fix #47990)
- When object unsafe trait uses itself in associated item suggest using `Self` (fix #66424, fix #33375, partially address #38376, cc #61525)
-  Point at reason in object unsafe trait with `Self` in supertraits or `where`-clause (cc #40533, cc #68377)
- On implicit type parameter `Sized` obligations, suggest `?Sized` (fix #57744, fix #46683)

4 years agoAuto merge of #68708 - Mark-Simulacrum:stage0-step, r=pietroalbini
bors [Tue, 4 Feb 2020 14:16:18 +0000 (14:16 +0000)]
Auto merge of #68708 - Mark-Simulacrum:stage0-step, r=pietroalbini

Step stage0 to bootstrap from 1.42

This also includes a commit which fixes the rustfmt downloading logic to redownload when the rustfmt channel changes, and bumps rustfmt to a more recent version.

4 years agoDrop unused extern crates
Mark Rousskov [Tue, 4 Feb 2020 13:14:08 +0000 (08:14 -0500)]
Drop unused extern crates

4 years agoAuto merge of #68804 - ecstatic-morse:qualif-cursor-lazy, r=estebank
bors [Tue, 4 Feb 2020 10:58:45 +0000 (10:58 +0000)]
Auto merge of #68804 - ecstatic-morse:qualif-cursor-lazy, r=estebank

Always use lazy qualif getters during const-checking

`has_mut_interior_eager_seek` was needed to work around an overly restrictive bound on the `per_local` argument to the `Qualif` trait. This PR makes that bound `FnMut` instead of `Fn` so we can seek cursors inside of it, resolving a FIXME in the const-checking code.

4 years agoAuto merge of #68601 - 0dvictor:split, r=tmandry
bors [Tue, 4 Feb 2020 05:48:54 +0000 (05:48 +0000)]
Auto merge of #68601 - 0dvictor:split, r=tmandry

Split `join_codegen_and_link()` into two steps

`join_codegen_and_link()` is split to `join_codegen()` and `link()`.

4 years agofix couple of perf related clipyp warnings
Matthias Krüger [Tue, 4 Feb 2020 01:28:11 +0000 (02:28 +0100)]
fix couple of perf related clipyp warnings

librustc: don't clone a type that is copy
librustc_incremental: use faster vector initialization
librustc_typeck: don't clone a type that is copy
librustdoc: don't create a vector where a slice will do

4 years agoSplit `join_codegen_and_link()` into two steps
Victor Ding [Tue, 28 Jan 2020 13:16:14 +0000 (00:16 +1100)]
Split `join_codegen_and_link()` into two steps

`join_codegen_and_link()` is split to `join_codegen()` and `link()`.

4 years agoremove redundant imports (clippy::single_component_path_imports)
Matthias Krüger [Tue, 4 Feb 2020 00:05:45 +0000 (01:05 +0100)]
remove redundant imports (clippy::single_component_path_imports)

4 years agoRemove Copy impl from OnceWith
Oliver Middleton [Mon, 3 Feb 2020 22:30:17 +0000 (22:30 +0000)]
Remove Copy impl from OnceWith

Iterators typically don't implement `Copy` and this shouldn't be an exception.

4 years agoAuto merge of #67668 - matthewjasper:or-patterns, r=pnkfelix
bors [Mon, 3 Feb 2020 22:02:26 +0000 (22:02 +0000)]
Auto merge of #67668 - matthewjasper:or-patterns, r=pnkfelix

Implement MIR lowering for or-patterns

This is the last thing needed to get meaningful run-pass tests for or-patterns. There probably need to be more tests before stabilizing this, but the most important cases should have been covered.

Note: we can generate exponentially large MIR CFGs when using or-patterns containing bindings, type ascriptions, or that are for a match arm with a guard. `src/test/mir-opt/exponential-or.rs` shows the best case for what we currently do.

cc #54883
closes #60350
closes #67514

cc @Centril
r? @pnkfelix

4 years agoAvoid scheduling repeated `StorageDead`s
Matthew Jasper [Sat, 25 Jan 2020 00:10:40 +0000 (00:10 +0000)]
Avoid scheduling repeated `StorageDead`s

Also add some comments

4 years agoMake use of `Place: Copy`
Matthew Jasper [Sat, 11 Jan 2020 20:30:42 +0000 (20:30 +0000)]
Make use of `Place: Copy`

4 years agoApply suggestions from code review
matthewjasper [Mon, 30 Dec 2019 17:47:10 +0000 (17:47 +0000)]
Apply suggestions from code review

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoAddress review comments
Matthew Jasper [Sun, 29 Dec 2019 17:28:41 +0000 (17:28 +0000)]
Address review comments

4 years agoMake `Candidate` private
Matthew Jasper [Sun, 29 Dec 2019 17:00:23 +0000 (17:00 +0000)]
Make `Candidate` private

4 years agoAdd more tests for or-patterns
Matthew Jasper [Fri, 27 Dec 2019 18:11:20 +0000 (18:11 +0000)]
Add more tests for or-patterns

4 years agobootstrap: fix clippy warnings
Matthias Krüger [Mon, 3 Feb 2020 19:13:30 +0000 (20:13 +0100)]
bootstrap: fix clippy warnings

4 years agoChange wording for object unsafe because of assoc const
Esteban Küber [Mon, 3 Feb 2020 18:43:45 +0000 (10:43 -0800)]
Change wording for object unsafe because of assoc const

4 years agoAuto merge of #68803 - Dylan-DPC:rollup-b4x6ghj, r=Dylan-DPC
bors [Mon, 3 Feb 2020 18:40:54 +0000 (18:40 +0000)]
Auto merge of #68803 - Dylan-DPC:rollup-b4x6ghj, r=Dylan-DPC

Rollup of 8 pull requests

Successful merges:

 - #68678 (Install robots.txt into rust-docs tarballs)
 - #68711 (Added upper bound of what vecs and boxes can allocate)
 - #68744 (Do not ICE in `type-alias-impl-trait` with save-analysis)
 - #68777 (Clean up E0263 explanation)
 - #68787 (Optimize core::ptr::align_offset (part 1))
 - #68797 (Fix links to types instead of modules)
 - #68798 (Test that `#[track_caller]` as `fn()` respects RT / CTFE equivalence)
 - #68800 (Stabilize `core::iter::once_with()`)

Failed merges:

r? @ghost

4 years agoTreat `Rvalue::AddressOf` the same as `Rvalue::Ref`
Dylan MacKenzie [Mon, 3 Feb 2020 18:37:36 +0000 (10:37 -0800)]
Treat `Rvalue::AddressOf` the same as `Rvalue::Ref`

4 years agoEliminate "eager" qualif getter
Dylan MacKenzie [Mon, 3 Feb 2020 18:33:29 +0000 (10:33 -0800)]
Eliminate "eager" qualif getter

All qualif getters are now lazy

4 years agoPass correct closure type to `Qualif` methods
Dylan MacKenzie [Mon, 3 Feb 2020 18:32:54 +0000 (10:32 -0800)]
Pass correct closure type to `Qualif` methods

4 years agoTake `FnMut` instead of `Fn` in `Qualif` methods
Dylan MacKenzie [Mon, 3 Feb 2020 18:27:38 +0000 (10:27 -0800)]
Take `FnMut` instead of `Fn` in `Qualif` methods

4 years agoRollup merge of #68800 - JohnTitor:stabilize-once-with, r=Centril
Dylan DPC [Mon, 3 Feb 2020 17:58:37 +0000 (18:58 +0100)]
Rollup merge of #68800 - JohnTitor:stabilize-once-with, r=Centril

Stabilize `core::iter::once_with()`

Fixes #57581

FCP: https://github.com/rust-lang/rust/issues/57581#issuecomment-576178031

r? @SimonSapin

4 years agoRollup merge of #68798 - Centril:caller-loc-ctfe-rt-equiv, r=RalfJung
Dylan DPC [Mon, 3 Feb 2020 17:58:36 +0000 (18:58 +0100)]
Rollup merge of #68798 - Centril:caller-loc-ctfe-rt-equiv, r=RalfJung

Test that `#[track_caller]` as `fn()` respects RT / CTFE equivalence

r? @RalfJung cc @anp @eddyb

4 years agoRollup merge of #68797 - GuillaumeGomez:link-to-types, r=Dylan-DPC
Dylan DPC [Mon, 3 Feb 2020 17:58:35 +0000 (18:58 +0100)]
Rollup merge of #68797 - GuillaumeGomez:link-to-types, r=Dylan-DPC

Fix links to types instead of modules

r? @Dylan-DPC

4 years agoRollup merge of #68787 - amosonn:patch-1, r=nagisa
Dylan DPC [Mon, 3 Feb 2020 17:58:33 +0000 (18:58 +0100)]
Rollup merge of #68787 - amosonn:patch-1, r=nagisa

Optimize core::ptr::align_offset (part 1)

r? @nagisa
See #68616 for main discussion.

4 years agoRollup merge of #68777 - GuillaumeGomez:clean-up-e0263, r=Dylan-DPC
Dylan DPC [Mon, 3 Feb 2020 17:58:32 +0000 (18:58 +0100)]
Rollup merge of #68777 - GuillaumeGomez:clean-up-e0263, r=Dylan-DPC

Clean up E0263 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68744 - JohnTitor:fix-ice-save-analysis, r=cramertj
Dylan DPC [Mon, 3 Feb 2020 17:58:30 +0000 (18:58 +0100)]
Rollup merge of #68744 - JohnTitor:fix-ice-save-analysis, r=cramertj

Do not ICE in `type-alias-impl-trait` with save-analysis

FIxes #68621
Fixes #68750

4 years agoRollup merge of #68711 - hman523:fix-68593, r=Dylan-DPC
Dylan DPC [Mon, 3 Feb 2020 17:58:27 +0000 (18:58 +0100)]
Rollup merge of #68711 - hman523:fix-68593, r=Dylan-DPC

Added upper bound of what vecs and boxes can allocate

Fixed issue #68593
I added a line of documentation to these two files to reflect that vectors and boxes ensure that they never allocate more than `isize::MAX` bytes.
r? @steveklabnik

4 years agoRollup merge of #68678 - Mark-Simulacrum:robots, r=pietroalbini
Dylan DPC [Mon, 3 Feb 2020 17:58:23 +0000 (18:58 +0100)]
Rollup merge of #68678 - Mark-Simulacrum:robots, r=pietroalbini

Install robots.txt into rust-docs tarballs

Fixes #68677.

I believe this might just work out from the central-station perspective, but even if it doesn't, this is a prerequisite step anyway.

4 years agoStabilize `core::iter::once_with()`
Yuki Okushi [Mon, 3 Feb 2020 15:47:04 +0000 (00:47 +0900)]
Stabilize `core::iter::once_with()`

4 years agotrack_caller test caller_location ctfe/rt equivalence wrt. fnptrs
Mazdak Farrokhzad [Mon, 3 Feb 2020 15:15:30 +0000 (16:15 +0100)]
track_caller test caller_location ctfe/rt equivalence wrt. fnptrs

4 years agoFix links to types instead of modules
Guillaume Gomez [Mon, 3 Feb 2020 15:12:35 +0000 (16:12 +0100)]
Fix links to types instead of modules

4 years agoAuto merge of #68665 - eddyb:debuginfo-early-create-var, r=nagisa
bors [Mon, 3 Feb 2020 13:06:44 +0000 (13:06 +0000)]
Auto merge of #68665 - eddyb:debuginfo-early-create-var, r=nagisa

codegen: create DIVariables ahead of using them with llvm.dbg.declare.

Instead of having `rustc_codegen_llvm` bundle creation of a `DIVariable` and `llvm.dbg.declare` into a single operation, they are now two separate methods, and the `DIVariable` is created earlier, specifically when `mir::VarDebugInfo`s are being partitioned into locals.

While this isn't currently needed, it's a prerequisite for #48300, which adds fragmented debuginfo, where one `mir::VarDebugInfo` has multiple parts of itself mapped to different `mir::Place`s.
For debuggers to see one composite variable instead of several ones with the same name, we need to create a single `DIVariable` and share it between multiple `llvm.dbg.declare` calls, which are likely pointing to different MIR locals.
That makes the `per_local_var_debug_info` partitioning a good spot to do this in, as we can create *exactly* one `DIVariable` per `mir::VarDebugInfo`, and refer to it as many things as needed.

I'm opening this PR separately because I want to test its perf impact in isolation (see https://github.com/rust-lang/rust/pull/48300#issuecomment-580121438).

r? @nagisa or @oli-obk cc @michaelwoerister @nikomatsakis

4 years agorustc_codegen_llvm: avoid redundant calls to span_start.
Eduard-Mihai Burtescu [Mon, 3 Feb 2020 10:14:05 +0000 (12:14 +0200)]
rustc_codegen_llvm: avoid redundant calls to span_start.

4 years agorustc_codegen_ssa: convert mir::VarDebugInfo into a custom PerLocalVarDebugInfo.
Eduard-Mihai Burtescu [Wed, 22 Jan 2020 17:45:22 +0000 (19:45 +0200)]
rustc_codegen_ssa: convert mir::VarDebugInfo into a custom PerLocalVarDebugInfo.

4 years agorustc_codegen_ssa: split declare_local into create_dbg_var and dbg_var_addr.
Eduard-Mihai Burtescu [Sun, 26 Jan 2020 16:50:13 +0000 (18:50 +0200)]
rustc_codegen_ssa: split declare_local into create_dbg_var and dbg_var_addr.

4 years agoAuto merge of #68778 - RalfJung:raw-addr-of, r=eddyb
bors [Mon, 3 Feb 2020 09:54:09 +0000 (09:54 +0000)]
Auto merge of #68778 - RalfJung:raw-addr-of, r=eddyb

add raw-addr-of variant to mir_raw_fat_ptr

As suggested at https://github.com/rust-lang/rust/pull/48300#discussion_r372520388

r? @eddyb

4 years agoAuto merge of #68772 - matthewjasper:relate-opt, r=davidtwco
bors [Mon, 3 Feb 2020 06:38:34 +0000 (06:38 +0000)]
Auto merge of #68772 - matthewjasper:relate-opt, r=davidtwco

Avoid exponential behaviour when relating types

When equating bound types we check subtyping in both directions. Since closures are invariant in their substs, we end up comparing the two types an exponential number of times. If there are no bound variables this isn't needed.

Closes #68061

4 years agoChange expansion error to be non-fatal
David [Sun, 2 Feb 2020 19:28:32 +0000 (11:28 -0800)]
Change expansion error to be non-fatal

Changes the error handler for inner attributes that replace the root
with a non-module. Previously it would emit a fatal error. It now emits
an empty expasion and a non-fatal error like the existing handler for a
failed expansion.

4 years agoAuto merge of #68756 - JohnTitor:fix-ice-save-analysis-2, r=davidtwco
bors [Mon, 3 Feb 2020 03:28:08 +0000 (03:28 +0000)]
Auto merge of #68756 - JohnTitor:fix-ice-save-analysis-2, r=davidtwco

Fix ICE with save-analysis

Fixes #68749

It should be fine since it's the same way as `visit_expr`.

4 years agoAuto merge of #68735 - JohnTitor:fix-ice-0202, r=estebank
bors [Mon, 3 Feb 2020 00:04:16 +0000 (00:04 +0000)]
Auto merge of #68735 - JohnTitor:fix-ice-0202, r=estebank

Use `next_point` to avoid ICE

Fixes #68730

r? @estebank (I think you're familiar with that)

4 years agoOptimize core::ptr::align_offset
Amos Onn [Sun, 2 Feb 2020 01:18:33 +0000 (02:18 +0100)]
Optimize core::ptr::align_offset

- As explained in the comment inside mod_inv, it is valid to work mod
  `usize::max_value()` right until the end.

4 years agoOptimize core::ptr::align_offset
Amos Onn [Tue, 28 Jan 2020 21:14:04 +0000 (22:14 +0100)]
Optimize core::ptr::align_offset

- When calculating the inverse, it's enough to work `mod a/g` instead
  of `mod a`.

4 years agoOptimize core::ptr::align_offset
Amos Onn [Thu, 30 Jan 2020 19:04:24 +0000 (20:04 +0100)]
Optimize core::ptr::align_offset

- Stopping condition inside mod_inv can be >= instead of >
- Remove intrinsics::unchecked_rem, we are working modulu powers-of-2 so
we can simply mask

4 years agoDeal with spans showing `std` lib
Esteban Küber [Sun, 2 Feb 2020 21:51:23 +0000 (13:51 -0800)]
Deal with spans showing `std` lib

Address #53081

4 years agoPoint at reason in object unsafe trait with `Self` in supertraits or `where`-clause
Esteban Küber [Sun, 2 Feb 2020 20:51:30 +0000 (12:51 -0800)]
Point at reason in object unsafe trait with `Self` in supertraits or `where`-clause

4 years agofix rebase
Esteban Küber [Sun, 2 Feb 2020 20:50:07 +0000 (12:50 -0800)]
fix rebase

4 years agoAuto merge of #68720 - wesleywiser:llvm_time_trace, r=davidtwco
bors [Sun, 2 Feb 2020 20:33:47 +0000 (20:33 +0000)]
Auto merge of #68720 - wesleywiser:llvm_time_trace, r=davidtwco

Add support for enabling the LLVM time-trace feature

I found this helpful while investigating an LLVM performance issue.
Passing `-Z llvm-time-trace` causes a `llvm_timings.json` file to be
created. This file can be inspected in with the Chrome Profiler
tools or with any other compatible tool like SpeedScope.

More information on the LLVM feature:

- https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/

- https://reviews.llvm.org/rL357340

4 years agoAccount for `?Sized` type parameter bounds
Esteban Küber [Sun, 2 Feb 2020 10:03:54 +0000 (02:03 -0800)]
Account for `?Sized` type parameter bounds

4 years agoRemove duplicated code
Esteban Küber [Sun, 2 Feb 2020 09:38:12 +0000 (01:38 -0800)]
Remove duplicated code

4 years agoSuggest `?Sized` on type parameters
Esteban Küber [Sun, 2 Feb 2020 08:54:13 +0000 (00:54 -0800)]
Suggest `?Sized` on type parameters

4 years agoadd tests for structured suggestion
Esteban Küber [Sat, 1 Feb 2020 03:04:58 +0000 (19:04 -0800)]
add tests for structured suggestion

4 years agoUse more appropriate spans on object unsafe traits and provide structured suggestions...
Esteban Küber [Sat, 1 Feb 2020 02:48:35 +0000 (18:48 -0800)]
Use more appropriate spans on object unsafe traits and provide structured suggestions when possible

4 years agoWording changes to object unsafe trait errors
Esteban Küber [Sat, 1 Feb 2020 00:47:00 +0000 (16:47 -0800)]
Wording changes to object unsafe trait errors

Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920

4 years agoPoint at `Sized` requirements
Esteban Küber [Fri, 31 Jan 2020 04:12:46 +0000 (20:12 -0800)]
Point at `Sized` requirements

Make #47990 easier to understand

4 years agoreview comments
Esteban Küber [Fri, 31 Jan 2020 03:35:48 +0000 (19:35 -0800)]
review comments

4 years agoRemove duplicated code
Esteban Küber [Thu, 30 Jan 2020 18:34:38 +0000 (10:34 -0800)]
Remove duplicated code

4 years agoSlight rewording of diagnostic message
Esteban Küber [Thu, 30 Jan 2020 18:20:47 +0000 (10:20 -0800)]
Slight rewording of diagnostic message

4 years agoUse more accurate failed predicate spans
Esteban Küber [Thu, 30 Jan 2020 00:55:37 +0000 (16:55 -0800)]
Use more accurate failed predicate spans

4 years agoPoint at return type obligations instead of at `fn` ident
Esteban Küber [Wed, 29 Jan 2020 22:16:31 +0000 (14:16 -0800)]
Point at return type obligations instead of  at `fn` ident

4 years agoPoint at the `Sized` obligation in `where` clauses
Esteban Küber [Wed, 29 Jan 2020 21:27:53 +0000 (13:27 -0800)]
Point at the `Sized` obligation in `where` clauses

4 years agoTweak `Self: Sized` restriction diagnostic output
Esteban Küber [Wed, 29 Jan 2020 20:59:04 +0000 (12:59 -0800)]
Tweak `Self: Sized` restriction diagnostic output

4 years agoreview comments
Esteban Küber [Sat, 25 Jan 2020 22:28:23 +0000 (14:28 -0800)]
review comments

4 years agofix test
Esteban Küber [Mon, 20 Jan 2020 03:22:15 +0000 (19:22 -0800)]
fix test

4 years agoWhen object unsafe trait uses itself in associated item suggest using `Self`
Esteban Küber [Mon, 20 Jan 2020 01:27:37 +0000 (17:27 -0800)]
When object unsafe trait uses itself in associated item suggest using `Self`

4 years agoPoint at `Sized` bound
Esteban Küber [Sun, 19 Jan 2020 22:53:37 +0000 (14:53 -0800)]
Point at `Sized` bound

4 years agoPoint at arguments or output when fn obligations come from them, or ident when they...
Esteban Küber [Sat, 18 Jan 2020 22:57:56 +0000 (14:57 -0800)]
Point at arguments or output when fn obligations come from them, or ident when they don't

4 years agoadd raw-addr-of variant to mir_raw_fat_ptr
Ralf Jung [Sun, 2 Feb 2020 19:51:24 +0000 (20:51 +0100)]
add raw-addr-of variant to mir_raw_fat_ptr

4 years agoAuto merge of #68774 - RalfJung:miri, r=RalfJung
bors [Sun, 2 Feb 2020 16:58:49 +0000 (16:58 +0000)]
Auto merge of #68774 - RalfJung:miri, r=RalfJung

bump Miri

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

Cc @oli-obk r? @ghost

4 years agoClean up E0263 explanation
Guillaume Gomez [Sun, 2 Feb 2020 14:28:18 +0000 (15:28 +0100)]
Clean up E0263 explanation

4 years agobump Miri
Ralf Jung [Sun, 2 Feb 2020 13:51:30 +0000 (14:51 +0100)]
bump Miri

4 years agoAuto merge of #68771 - Centril:rollup-zllcup9, r=Centril
bors [Sun, 2 Feb 2020 13:16:43 +0000 (13:16 +0000)]
Auto merge of #68771 - Centril:rollup-zllcup9, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #68733 (Update option.rs)
 - #68760 (Issue error on `compile-fail` header in UI test)
 - #68763 (Do not suggest duplicate bounds)
 - #68764 (parser: syntactically allow `self` in all `fn` contexts)
 - #68769 (parser: avoid re-wrapping NtItem)

Failed merges:

r? @ghost

4 years agoRollup merge of #68769 - Centril:unwrap, r=petrochenkov
Mazdak Farrokhzad [Sun, 2 Feb 2020 13:15:53 +0000 (14:15 +0100)]
Rollup merge of #68769 - Centril:unwrap, r=petrochenkov

parser: avoid re-wrapping NtItem

r? @petrochenkov

4 years agoRollup merge of #68764 - Centril:self-semantic, r=petrochenkov
Mazdak Farrokhzad [Sun, 2 Feb 2020 13:15:52 +0000 (14:15 +0100)]
Rollup merge of #68764 - Centril:self-semantic, r=petrochenkov

parser: syntactically allow `self` in all `fn` contexts

Part of https://github.com/rust-lang/rust/pull/68728.

`self` parameters are now *syntactically* allowed as the first parameter irrespective of item context (and in function pointers). Instead, semantic validation (`ast_validation`) is used.

r? @petrochenkov

4 years agoRollup merge of #68763 - JohnTitor:do-not-sugg-dup-bounds, r=estebank
Mazdak Farrokhzad [Sun, 2 Feb 2020 13:15:51 +0000 (14:15 +0100)]
Rollup merge of #68763 - JohnTitor:do-not-sugg-dup-bounds, r=estebank

Do not suggest duplicate bounds

Fixes #68205
Fixes #68695

r? @estebank

4 years agoRollup merge of #68760 - Tyg13:compile_fail_ui_test, r=Centril
Mazdak Farrokhzad [Sun, 2 Feb 2020 13:15:49 +0000 (14:15 +0100)]
Rollup merge of #68760 - Tyg13:compile_fail_ui_test, r=Centril

Issue error on `compile-fail` header in UI test

Fixes #68732

r? @Centril

4 years agoRollup merge of #68733 - cata0309:patch-1, r=Dylan-DPC
Mazdak Farrokhzad [Sun, 2 Feb 2020 13:15:48 +0000 (14:15 +0100)]
Rollup merge of #68733 - cata0309:patch-1, r=Dylan-DPC

Update option.rs

I updated the example of the `expect` examples so they won't contain depressing sentences any more !

4 years agoparser: avoid re-wrapping NtItem
Mazdak Farrokhzad [Fri, 31 Jan 2020 06:24:23 +0000 (07:24 +0100)]
parser: avoid re-wrapping NtItem

4 years agoparser: address review comments re. `self`.
Mazdak Farrokhzad [Sun, 2 Feb 2020 10:10:27 +0000 (11:10 +0100)]
parser: address review comments re. `self`.

4 years agoAvoid exponential behaviour when relating types
Matthew Jasper [Sun, 2 Feb 2020 11:54:11 +0000 (11:54 +0000)]
Avoid exponential behaviour when relating types

4 years agoDo not suggest duplicate bounds
Yuki Okushi [Sun, 2 Feb 2020 08:55:11 +0000 (17:55 +0900)]
Do not suggest duplicate bounds

4 years agoparser: move restrictions re. `self` to `ast_validation`.
Mazdak Farrokhzad [Wed, 29 Jan 2020 00:30:01 +0000 (01:30 +0100)]
parser: move restrictions re. `self` to `ast_validation`.

4 years agoAuto merge of #68737 - Centril:fix-68710, r=petrochenkov
bors [Sun, 2 Feb 2020 09:19:40 +0000 (09:19 +0000)]
Auto merge of #68737 - Centril:fix-68710, r=petrochenkov

pretty: print attrs in struct expr

Fixes https://github.com/rust-lang/rust/issues/68710 by printing the attributes on struct expression fields.

r? @petrochenkov
cc @dtolnay

4 years agopretty: print attrs in struct expr
Mazdak Farrokhzad [Sat, 1 Feb 2020 17:45:03 +0000 (18:45 +0100)]
pretty: print attrs in struct expr

4 years agocompiletest: error if `compile-fail` header in ui test.
Tyler Lanphear [Sun, 2 Feb 2020 06:05:53 +0000 (01:05 -0500)]
compiletest: error if `compile-fail` header in ui test.

4 years agoAuto merge of #68754 - JohnTitor:clippy-up, r=JohnTitor
bors [Sun, 2 Feb 2020 06:09:00 +0000 (06:09 +0000)]
Auto merge of #68754 - JohnTitor:clippy-up, r=JohnTitor

Update Clippy

Fixes #68745

r? @ghost

4 years agoAuto merge of #68672 - jonas-schievink:dedup-witness, r=Zoxc
bors [Sun, 2 Feb 2020 03:02:41 +0000 (03:02 +0000)]
Auto merge of #68672 - jonas-schievink:dedup-witness, r=Zoxc

Deduplicate types in the generator witness

For the `await-call-tree` benchmark this often reduces the types inside the witness from 12 to 2.

4 years agoAdd tests for issue 59191
David Ross [Sun, 2 Feb 2020 02:07:26 +0000 (18:07 -0800)]
Add tests for issue 59191

4 years agoFix 59191
David Ross [Sun, 2 Feb 2020 02:04:07 +0000 (18:04 -0800)]
Fix 59191

This adds an explicit error for when macros replace the crate root with
a non-module item.

4 years agoFix ICE with save-analysis
Yuki Okushi [Sun, 2 Feb 2020 00:23:47 +0000 (09:23 +0900)]
Fix ICE with save-analysis

4 years agoCatch more ICEs
Yuki Okushi [Sun, 2 Feb 2020 00:02:54 +0000 (09:02 +0900)]
Catch more ICEs

4 years agoUpdate Clippy
Yuki Okushi [Sat, 1 Feb 2020 23:38:28 +0000 (08:38 +0900)]
Update Clippy