Skip to content

Rollup of 8 pull requests - #66640

Merged
bors merged 27 commits into
rust-lang:masterfrom
Centril:rollup-862009l
Nov 23, 2019
Merged

Rollup of 8 pull requests#66640
bors merged 27 commits into
rust-lang:masterfrom
Centril:rollup-862009l

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Centriland others added 27 commits November 11, 2019 06:33
The ability to print a specific item as identified by NodeId or path
seems not particularly useful, and certainly carries quite a bit of
complexity with it.
Fixesrust-lang#66476 by turning the violating example into an explicit
counterexample.
…rochenkov
*Syntactically* permit visibilities on trait items & enum variants
Fixesrust-lang#65041
Suppose we have `$vis trait_item` or `$vis enum_variant` and `$vis` is a `:vis` macro fragment. Before this PR, this would fail to parse. This is now instead allowed as per language team consensus in rust-lang#65041 (comment). (See added tests for elaboration.)
Moreover, we now also permit visibility modifiers on trait items & enum variants *syntactically* but reject them with semantic checks (in `ast_validation`):
```rust
#[cfg(FALSE)]
trait Foo { pub fn bar(); } // OK
#[cfg(FALSE)]
enum E { pub U } // OK
```
Document pitfall with `impl PartialEq<B> for A`
Fixesrust-lang#66476 by turning the violating example into an explicit
counterexample.
Remove pretty printing of specific nodes in AST
The ability to print a specific item as identified by NodeId or path
seems not particularly useful, and certainly carries quite a bit of
complexity with it.
This is intended to simplify our CLI parsing a bit and remove a
non-uncomplicated piece of it; I largely did this to remove the
dependency on NodeId from librustc/session but it's not really
necessary to do so in this invasive a way. The alternative is
moving it to librustc_interface or driver, probably.
…t, r=oli-obk
Handle statics in MIR as const pointers
This is the first PR towards the goal of removing `PlaceBase::Static`. In this PR:
* Statics are lowered to dereferencing a const pointer.
* The temporaries holding such pointers are tracked in MIR, for the most part this is only used for diagnostics. There are two exceptions:
* The borrow checker has some checks for thread-locals that directly use this data.
* Const checking will suppress "cannot dereference raw pointer" diagnostics for pointers to `static mut`/`extern static`. This is to maintain the current behaviour (12 tests fail otherwise).
The following are left to future PRs (I think that @spastorino will be working on the first 3):
* Applying the same treatments to promoted statics.
* Removing `PlaceBase::Static`.
* Replacing `PlaceBase` with `Local`.
* Moving the ever growing collection of metadata that we have for diagnostics in MIR passes somewhere more appropriate.
r? @oli-obk
…erb, r=Centril
follow the convention in this file to use third-person singular verbs
…=Dylan-DPC
Error code's long explanation cleanup
Continuing to clean up the error code's long explanation.
r? @Dylan-DPC
fix reoccuring typo: dereferencable -> dereferenceable
…etrochenkov
resolve: more declarative `fresh_binding`
Following up on rust-lang#64111, this PR redefines `fresh_binding` wrt. `already_bound_and` and `already_bound_or` in a more declarative and simplified fashion.
cc rust-lang#54883
r? @petrochenkov
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors r+ p=8 rollup=never

@bors

bors commented Nov 22, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 56512b9 has been approved by Centril

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 22, 2019
@bors

bors commented Nov 22, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 56512b9 with merge fb92cf0e0ac7f2924399e60afc767e3f967d004d...

@rust-highfive

Copy link
Copy Markdown
Contributor

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-22T21:31:58.9043502Z 2019-11-22T21:31:58.9043533Z 2019-11-22T21:31:58.9043580Z 2019-11-22T21:31:58.9043607Z 2019-11-22T21:31:58.9043708Z - #66183 (*Syntactically* permit visibilities on trait items & enum variants)
2019-11-22T21:31:58.9043791Z - #66566 (Document pitfall with `impl PartialEq<B> for A`)
2019-11-22T21:31:58.9043883Z - #66575 (Remove pretty printing of specific nodes in AST)
2019-11-22T21:31:58.9043955Z - #66587 (Handle statics in MIR as const pointers)
2019-11-22T21:31:58.9044056Z - #66619 (follow the convention in this file to use third-person singular verbs)
2019-11-22T21:31:58.9044133Z - #66633 (Error code's long explanation cleanup)
2019-11-22T21:31:58.9044413Z - #66637 (fix reoccuring typo: dereferencable -> dereferenceable)
2019-11-22T21:31:58.9044507Z - #66639 (resolve: more declarative `fresh_binding`)
2019-11-22T21:31:58.9044653Z AGENT_DISABLELOGPLUGIN_TESTFILEPUBLISHERPLUGIN=true
2019-11-22T21:31:58.9044723Z AGENT_DISABLELOGPLUGIN_TESTRESULTLOGPLUGIN=true
2019-11-22T21:31:58.9044801Z AGENT_HOMEDIRECTORY=C:\agents\2.160.1
2019-11-22T21:31:58.9044858Z AGENT_ID=519
---
2019-11-22T21:32:12.6380147Z 33 480M 33 160M 0 0 22.7M 0 0:00:21 0:00:07 0:00:14 25.4M
2019-11-22T21:32:13.4453888Z 38 480M 38 186M 0 0 22.5M 0 0:00:21 0:00:08 0:00:13 24.2M
2019-11-22T21:32:14.0966384Z 43 480M 43 209M 0 0 23.0M 0 0:00:20 0:00:09 0:00:11 24.1M
2019-11-22T21:32:14.0978805Z 44 480M 44 212M 0 0 21.8M 0 0:00:21 0:00:09 0:00:12 20.6M
2019-11-22T21:32:14.0979807Z curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
2019-11-22T21:32:14.1003249Z 2019-11-22T21:32:14.1003529Z gzip: stdin: unexpected end of file
2019-11-22T21:32:14.1013254Z tar: Unexpected EOF in archive
2019-11-22T21:32:14.1013603Z tar: Unexpected EOF in archive
2019-11-22T21:32:14.1013794Z tar: Error is not recoverable: exiting now
2019-11-22T21:32:14.1077671Z 2019-11-22T21:32:14.1168865Z ##[error]Bash exited with code '2'.
2019-11-22T21:32:14.1377959Z ##[section]Starting: Checkout
2019-11-22T21:32:14.1486935Z ==============================================================================
2019-11-22T21:32:14.1487043Z Task : Get sources
2019-11-22T21:32:14.1487125Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors

bors commented Nov 22, 2019

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-azure

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 22, 2019
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors retry spurious

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 22, 2019
@bors

bors commented Nov 22, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 56512b9 with merge a449535...

bors added a commit that referenced this pull request Nov 22, 2019
Rollup of 8 pull requests
Successful merges:
- #66183 (*Syntactically* permit visibilities on trait items & enum variants)
- #66566 (Document pitfall with `impl PartialEq<B> for A`)
- #66575 (Remove pretty printing of specific nodes in AST)
- #66587 (Handle statics in MIR as const pointers)
- #66619 (follow the convention in this file to use third-person singular verbs)
- #66633 (Error code's long explanation cleanup)
- #66637 (fix reoccuring typo: dereferencable -> dereferenceable)
- #66639 (resolve: more declarative `fresh_binding`)
Failed merges:
r? @ghost
@bors

bors commented Nov 23, 2019

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Centril
Pushing a449535 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Nov 23, 2019
@bors
bors merged commit 56512b9 into rust-lang:masterNov 23, 2019
@Centril
Centril deleted the rollup-862009l branch November 23, 2019 01:13
@CentrilCentril added the rollup A PR which is a rollup label Dec 3, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@Centril@bors@rust-highfive@Mark-Simulacrum@oli-obk@spastorino@matthewjasper@robamler@RalfJung@GuillaumeGomez