Commit graph

100089 commits

Author SHA1 Message Date
Jonas Schievink
98f02b2362 Pacify tidy 2019-10-05 15:33:26 +02:00
Jonas Schievink
a0cf5315ef Test that we get the proper errors 2019-10-05 15:33:26 +02:00
Jonas Schievink
9aaef06cf6 Fix the bootstrap 2019-10-05 15:33:26 +02:00
Jonas Schievink
02f36e52a6 Hide the Iterator specialization behind a trait 2019-10-05 15:33:25 +02:00
Jonas Schievink
55277d4a6e Add comment to Type and OpaqueTy match 2019-10-05 15:33:25 +02:00
Jonas Schievink
2cd5030ef5 Deny specializing items not in the parent impl 2019-10-05 15:33:24 +02:00
bors
2e7244807a Auto merge of #64994 - GuillaumeGomez:fix-rustdoc-display-js-disabled, r=Mark-Simulacrum
Fix rustdoc display with js disabled

Fixes #64988.

Currently, all sections are collapsed when the page is loading, and then is displayed once done. However, if js is disabled, they never get expanded. Therefore, they need to be shown by default.

r? @Mark-Simulacrum
2019-10-04 12:17:13 +00:00
bors
9e35a2811d Auto merge of #65087 - Centril:rollup-skxq0zr, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #64749 (Fix most remaining Polonius test differences)
 - #64817 (Replace ClosureSubsts with SubstsRef)
 - #64874 (Simplify ExprUseVisitor)
 - #65026 (metadata: Some crate loading cleanup)
 - #65073 (Remove `borrowck_graphviz_postflow` from test)

Failed merges:

r? @ghost
2019-10-04 07:27:59 +00:00
Mazdak Farrokhzad
aacc89a1dd
Rollup merge of #65073 - ecstatic-morse:issue-65071, r=petrochenkov
Remove `borrowck_graphviz_postflow` from test

Resolves #65071.

r? @petrochenkov
2019-10-04 07:24:39 +02:00
Mazdak Farrokhzad
a16c637374
Rollup merge of #65026 - petrochenkov:ice1, r=eddyb
metadata: Some crate loading cleanup

So, my goal was to fix caching of loaded crates which is broken and causes ICEs like #56935 or #64450.
While investigating I found that the code is pretty messy and likes to confuse various things that look similar but are actually different.
This PR does some initial cleanup in that area, I hope to get to the caching itself a bit later.
2019-10-04 07:24:37 +02:00
Mazdak Farrokhzad
cb4145e759
Rollup merge of #64874 - matthewjasper:simplify-euv, r=eddyb
Simplify ExprUseVisitor

* Remove HIR const qualification
* Remove parts of ExprUseVisitor that aren't being used

r? @eddyb
2019-10-04 07:24:36 +02:00
Mazdak Farrokhzad
17e1f23209
Rollup merge of #64817 - csmoe:closure, r=nikomatsakis
Replace ClosureSubsts with SubstsRef

Addresses https://github.com/rust-lang/rust/issues/42340 part 3
https://github.com/rust-lang/rust/pull/59312 might benefit from this clean up.
r? @nikomatsakis
2019-10-04 07:24:34 +02:00
Mazdak Farrokhzad
314fbf48cf
Rollup merge of #64749 - matthewjasper:liveness-opt, r=nikomatsakis
Fix most remaining Polonius test differences

This fixes most of the Polonius test differences and also avoids overflow in issue-38591.rs.

r? @nikomatsakis
2019-10-04 07:24:33 +02:00
bors
31d75c4e9c Auto merge of #65076 - tmandry:rollup-ka7nzb6, r=tmandry
Rollup of 11 pull requests

Successful merges:

 - #61879 (Stabilize todo macro)
 - #64675 (Deprecate `#![plugin]` & `#[plugin_registrar]`)
 - #64690 (proc_macro API: Expose `macro_rules` hygiene)
 - #64706 (add regression test for #60218)
 - #64741 (Prevent rustdoc feature doctests)
 - #64842 (Disallow Self in type param defaults of ADTs)
 - #65004 (Replace mentions of IRC with Discord)
 - #65018 (Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr)
 - #65055 (Add long error explanation for E0556)
 - #65056 (Make visit projection iterative)
 - #65057 (typo: fix typo in E0392)

Failed merges:

r? @ghost
2019-10-03 23:29:48 +00:00
Tyler Mandry
cc5dcfaada
Rollup merge of #65057 - mathstuf:fix-warning-typo, r=Centril
typo: fix typo in E0392

See #64931.

---
Cc: @Centril @estebank
2019-10-03 16:25:51 -07:00
Tyler Mandry
4a25c3c1ec
Rollup merge of #65056 - spastorino:place-mut-visitor-adjusts, r=oli-obk
Make visit projection iterative

r? @oli-obk

/cc @nikomatsakis
2019-10-03 16:25:49 -07:00
Tyler Mandry
dd9ccb20fc
Rollup merge of #65055 - GuillaumeGomez:long-err-explanation-E0556, r=petrochenkov
Add long error explanation for E0556

Part of #61137
2019-10-03 16:25:47 -07:00
Tyler Mandry
211bc4a687
Rollup merge of #65018 - Aaron1011:fix/backtrace-stderr, r=nikomatsakis
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr

This removes the implicit dependency on the environment variables set
when running `./x.py test`
2019-10-03 16:25:46 -07:00
Tyler Mandry
4886f35537
Rollup merge of #65004 - BO41:mentions, r=alexcrichton
Replace mentions of IRC with Discord

Revival of #61531

closes #61524

what was the outcome of this? https://github.com/rust-lang/rust/pull/61531#issuecomment-500452638

should this be changed in this PR as well? https://github.com/rust-lang/rust/pull/61531#issuecomment-501473787
2019-10-03 16:25:44 -07:00
Tyler Mandry
27c90524a0
Rollup merge of #64842 - pnkfelix:fix-issue-61631-self-in-type-param-default, r=alexreg
Disallow Self in type param defaults of ADTs

Fix #61631

(also includes a drive-by fix to a typo in some related diagnostic output.)
2019-10-03 16:25:43 -07:00
Tyler Mandry
69837b14d6
Rollup merge of #64741 - GuillaumeGomez:prevent-rustdoc-feature-doctests, r=QuietMisdreavus
Prevent rustdoc feature doctests

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

cc @ollie27
2019-10-03 16:25:41 -07:00
Tyler Mandry
c6999a5834
Rollup merge of #64706 - nikomatsakis:issue-60218-test-case, r=centril
add regression test for #60218

Fixes #60218
2019-10-03 16:25:40 -07:00
Tyler Mandry
2a9bd75994
Rollup merge of #64690 - petrochenkov:mixed, r=dtolnay
proc_macro API: Expose `macro_rules` hygiene

Proc macros do not have direct access to our oldest and most stable hygiene kind - `macro_rules` hygiene.

To emulate it macro authors have to go through two steps - first generate a temporary `macro_rules` item (using a derive, at least until https://github.com/rust-lang/rust/pull/64035 is merged), then generate a macro call to that item. Popular crates like [proc_macro_hack](https://crates.io/crates/proc-macro-hack) use this trick to generate hygienic identifiers from proc macros.

I'd say that these workarounds with nested macro definitions have more chances to hit some corner cases in our hygiene system, in which we don't have full confidence.
So, let's provide a direct access to `macro_rules` hygiene instead.

This PR does that by adding a new method `Span::mixed_site` (bikeshedding is welcome) in addition to existing `Span::call_site` (stable) and `Span::def_site` (unstable).
Identifiers with this span resolve at def-site in for local variables, labels and `$crate`, and resolve at call-site for everything else, i.e. exactly like identifiers produced by `macro_rules`.

This API addition opens the way to stabilizing proc macros in expression positions (https://github.com/rust-lang/rust/issues/54727), for which use of call-site hygiene or workarounds with temporary items would be quite unfortunate.
(`macro_rules` expanded in expression position, on the other hand, are stable since 1.0 and widely used.)

r? @dtolnay @alexcrichton
2019-10-03 16:25:39 -07:00
Tyler Mandry
da0afc1638
Rollup merge of #64675 - Centril:deprecate-plugin, r=oli-obk
Deprecate `#![plugin]` & `#[plugin_registrar]`

This PR deprecates `#![plugin]` and `#[plugin_registrar]`.

~A removal deadline is set: 1.44.0. This will be in 9 months from now and should give everyone who is still relying on the feature ample time to rid themselves of this dependency.~

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

r? @Mark-Simulacrum
2019-10-03 16:25:37 -07:00
Tyler Mandry
f7ee31e3d7
Rollup merge of #61879 - stjepang:stabilize-todo, r=withoutboats
Stabilize todo macro

The `todo!` macro is just another name for `unimplemented!`.

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

This PR needs a FCP to merge.

r? @withoutboats
2019-10-03 16:25:35 -07:00
Dylan MacKenzie
1cda591314 Bless test 2019-10-03 15:51:11 -07:00
Vadim Petrochenkov
68aadcb2ae metadata: Remove unused Option from fn dlsym_proc_macros 2019-10-04 01:12:29 +03:00
Vadim Petrochenkov
0f96ba92b6 metadata: Remove CrateMetadata::name
It duplicates `CrateRoot::name`
2019-10-04 01:12:29 +03:00
Vadim Petrochenkov
f13adc5f9d metadata: Remove CrateMetadata::host_lib
It was only used for retreiving edition, which was a bug.
In case of dual proc macros the edition should be taken from the target crate version, like any other metadata.
2019-10-04 01:12:29 +03:00
Vadim Petrochenkov
92386a7ff3 metadata: Simplify interface of resolve_crate 2019-10-04 01:12:29 +03:00
Vadim Petrochenkov
33c9ada800 metadata: Remove locator::Context::ident
It's a crate name after renaming, so it's entirely irrelevant to crate loading
2019-10-04 01:12:29 +03:00
Vadim Petrochenkov
acd102aebf metadata: Do not pass crate name after renaming to register_crate
It's entirely irrelevant to crate loading
2019-10-04 01:12:28 +03:00
Vadim Petrochenkov
b507971119 metadata: Remove CrateMetadata::imported_name
It's entirely irrelevant to crate loading
2019-10-04 01:12:28 +03:00
Dylan MacKenzie
4d9b4b4769 Remove borrowck_graphviz_postflow from test 2019-10-03 14:24:52 -07:00
Felix S. Klock II
e443e1bdf9 Regression tests.
Update: incorporate review feedback.
2019-10-03 20:21:55 +02:00
bors
032a53a06c Auto merge of #64938 - estebank:ice-ice-baby, r=matthewjasper
Avoid ICE on ReFree region on where clause

Fix #64855.
2019-10-03 16:14:32 +00:00
Santiago Pastorino
b9ed64268d
Make visit_projection iterative 2019-10-03 11:19:26 -03:00
Ben Boeckel
126bf3b1dd typo: fix typo in E0392
See #64931.
2019-10-03 09:22:29 -04:00
bors
cfb6d84720 Auto merge of #64999 - nikomatsakis:issue-60424-async-return-inference, r=cramertj
extract expected return type for async fn generators

Fixes #60424

cc @Centril, I know you've been eager to see this fixed.

r? @cramertj
2019-10-03 12:19:21 +00:00
Guillaume Gomez
1d49f9a10a update ui tests 2019-10-03 14:11:39 +02:00
Guillaume Gomez
e86af1bbeb Add long error explanation for E0556 2019-10-03 14:11:31 +02:00
Felix S. Klock II
a18d424c48 Allocate a new diagnostic for defaulted type parameters cannot use Self
(Without this commit, you still get an error (a very similar one, at
that), but it complains about use of forward declaration, which is
confusing since people do not necessarily think of `Self` as being
declared at all.)

Update: incorporate review feedback.
2019-10-03 13:54:27 +02:00
Felix S. Klock II
3a4921cde1 The crux of the bug fix.
Update: review feedback
Update: placate tidy
2019-10-03 13:54:07 +02:00
csmoe
9b91bef78b generate ClosureSubsts from SubstsRef 2019-10-03 19:24:59 +08:00
Niko Matsakis
4396a1ccd4 add regression test for #60218 2019-10-03 05:59:18 -04:00
Vadim Petrochenkov
d1310dc6c9 proc_macro: Add Span::mixed_site exposing macro_rules hygiene 2019-10-03 11:28:06 +03:00
Niko Matsakis
a807032f9e ./x.py test --bless --compare-mode=nll 2019-10-03 04:20:51 -04:00
Mazdak Farrokhzad
d1f95ef3c5 --bless ui-fulldeps tests 2019-10-03 09:33:28 +02:00
bors
0221e26562 Auto merge of #65045 - Centril:rollup-djvi539, r=Centril
Rollup of 2 pull requests

Successful merges:

 - #64941 (Inline `{min,max}_value` even in debug builds)
 - #65002 (Update llvm-project submodule)

Failed merges:

r? @ghost
2019-10-03 06:05:08 +00:00
Mazdak Farrokhzad
64ac499db5
Rollup merge of #65002 - alexcrichton:update-lvlm, r=nikic
Update llvm-project submodule

Bring in rust-lang/llvm-project#24 which brings in some wasm
improvements related to the bulk-memory proposal
2019-10-03 08:04:34 +02:00