Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NLL: report type moved from behind borrow of array/slice #51247

Conversation

pnkfelix
Copy link
Member

When NLL has illegal move due to borrowed content in an array or slice, provide feedback about why the move wasn't a copy.

Drive by: While comparing the resulting .nll.stderr files to their old borrowck variants, I noticed that the test for borrowck-vec-pattern-nesting.rs was not signaling some errors under NLL due to the test assuming lexical lifetimes. So I fixed that too.

Fix #51190

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 31, 2018
@pnkfelix pnkfelix force-pushed the issue-51190-report-type-moved-from-behind-borrow branch from 7c84263 to e99f5ec Compare May 31, 2018 11:02
@pnkfelix
Copy link
Member Author

pnkfelix commented Jun 1, 2018

@nikomatsakis you want to review this? (or maybe hand it off to another member of WG-compiler-nll ?)

@pnkfelix
Copy link
Member Author

pnkfelix commented Jun 4, 2018

r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 5, 2018

📌 Commit e99f5ec has been approved by nikomatsakis

@bors bors 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 Jun 5, 2018
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jun 5, 2018
…ved-from-behind-borrow, r=nikomatsakis

NLL: report type moved from behind borrow of array/slice

When NLL has illegal move due to borrowed content in an array or slice, provide feedback about why the move wasn't a copy.

Drive by: While comparing the resulting `.nll.stderr` files to their old borrowck variants, I noticed that the test for borrowck-vec-pattern-nesting.rs was not signaling some errors under NLL due to the test assuming lexical lifetimes. So I fixed that too.

Fix rust-lang#51190
@bors
Copy link
Contributor

bors commented Jun 6, 2018

🔒 Merge conflict

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 6, 2018
@pnkfelix pnkfelix force-pushed the issue-51190-report-type-moved-from-behind-borrow branch from e99f5ec to e5b378b Compare June 6, 2018 21:37
@pnkfelix
Copy link
Member Author

pnkfelix commented Jun 6, 2018

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Jun 6, 2018

📌 Commit e5b378b has been approved by nikomatsakis

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 6, 2018
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jun 6, 2018
…ved-from-behind-borrow, r=nikomatsakis

NLL: report type moved from behind borrow of array/slice

When NLL has illegal move due to borrowed content in an array or slice, provide feedback about why the move wasn't a copy.

Drive by: While comparing the resulting `.nll.stderr` files to their old borrowck variants, I noticed that the test for borrowck-vec-pattern-nesting.rs was not signaling some errors under NLL due to the test assuming lexical lifetimes. So I fixed that too.

Fix rust-lang#51190
@bors bors 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 Jun 8, 2018
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed on Travis (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.
[00:20:28]     Updating git repository `https://github.com/rust-lang-nursery/rustfmt`
[00:21:01] warning: spurious network error (2 tries remaining): curl error: Couldn't resolve host 'github.com'
[00:21:01] ; class=Net (12)
[00:21:08]  Downloading petgraph v0.4.12
[00:21:45] warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Couldn't resolve host 'crates.io')
[00:22:08]  Downloading lazy_static v0.2.11
[00:22:08]  Downloading getopts v0.2.17
[00:22:08]  Downloading time v0.1.39
[00:22:09]  Downloading filetime v0.1.15
---
  0     0    0     0    0     0      0      0 --:--:--  0:03:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:05 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:06 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:07 --:--:--     0curl: (7) Failed to connect to s3-us-west-1.amazonaws.com port 443: Connection timed out
[01:44:19] curl: (6) Couldn't resolve host 's3-us-west-1.amazonaws.com'
[01:44:19] thread 'main' panicked at 'failed to download openssl source: exit code: 6', bootstrap/native.rs:575:17
[01:44:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
[01:44:19] Build completed unsuccessfully in 1:19:49
travis_time:end:05837eca:start=1528462669938858777,finish=1528468929531919920,duration=6259593061143

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)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed on Travis (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.
[00:20:28]     Updating git repository `https://github.com/rust-lang-nursery/rustfmt`
[00:21:01] warning: spurious network error (2 tries remaining): curl error: Couldn't resolve host 'github.com'
[00:21:01] ; class=Net (12)
[00:21:08]  Downloading petgraph v0.4.12
[00:21:45] warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Couldn't resolve host 'crates.io')
[00:22:08]  Downloading lazy_static v0.2.11
[00:22:08]  Downloading getopts v0.2.17
[00:22:08]  Downloading time v0.1.39
[00:22:09]  Downloading filetime v0.1.15
---
  0     0    0     0    0     0      0      0 --:--:--  0:03:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:05 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:06 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:07 --:--:--     0curl: (7) Failed to connect to s3-us-west-1.amazonaws.com port 443: Connection timed out
[01:44:19] curl: (6) Couldn't resolve host 's3-us-west-1.amazonaws.com'
[01:44:19] thread 'main' panicked at 'failed to download openssl source: exit code: 6', bootstrap/native.rs:575:17
[01:44:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
[01:44:19] Build completed unsuccessfully in 1:19:49
travis_time:end:05837eca:start=1528462669938858777,finish=1528468929531919920,duration=6259593061143

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)

@kennytm
Copy link
Member

kennytm commented Jun 8, 2018

@bors retry

@bors bors 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 Jun 8, 2018
@bors
Copy link
Contributor

bors commented Jun 8, 2018

⌛ Testing commit e5b378b with merge 6514ef6680d36624bbdb5d674718fc83c6d5fd6a...

@bors
Copy link
Contributor

bors commented Jun 8, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (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.
travis_fold:start:worker_info
Worker information
hostname: 15d1e2b5-5e55-432b-8334-0681710b0985@1.production-5-worker-org-a-1-gce
version: v3.8.0 https://github.com/travis-ci/worker/tree/cccff7c89da7ba0cf47a90e5615266a45b372e30
instance: travis-job-1f3de9da-b9a5-4460-ad5b-7b52021b80b9 travis-ci-connie-trusty-1512502258-986baf0 (via amqp)
startup: 26.548592147s
travis_fold:end:worker_info
Download from https://build.travis-ci.org/filter/redirect_io.rb failed. Trying https://build.travis-ci.com/filter/redirect_io.rb ...
Build system information
Build language: shell
Build group: stable
Build dist: trusty

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 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 Jun 8, 2018
@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (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.
travis_fold:start:worker_info
Worker information
hostname: 15d1e2b5-5e55-432b-8334-0681710b0985@1.production-5-worker-org-a-1-gce
version: v3.8.0 https://github.com/travis-ci/worker/tree/cccff7c89da7ba0cf47a90e5615266a45b372e30
instance: travis-job-1f3de9da-b9a5-4460-ad5b-7b52021b80b9 travis-ci-connie-trusty-1512502258-986baf0 (via amqp)
startup: 26.548592147s
travis_fold:end:worker_info
Download from https://build.travis-ci.org/filter/redirect_io.rb failed. Trying https://build.travis-ci.com/filter/redirect_io.rb ...
Build system information
Build language: shell
Build group: stable
Build dist: trusty

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)

@kennytm
Copy link
Member

kennytm commented Jun 8, 2018

@bors retry

@bors bors 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 Jun 8, 2018
@bors
Copy link
Contributor

bors commented Jun 8, 2018

⌛ Testing commit e5b378b with merge d7a04b98a929989a9c360b76be2563a02eeb4e14...

@bors
Copy link
Contributor

bors commented Jun 8, 2018

💔 Test failed - status-appveyor

@bors bors 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 Jun 8, 2018
@kennytm
Copy link
Member

kennytm commented Jun 8, 2018

@bors retry #42693

@bors bors 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 Jun 8, 2018
@bors
Copy link
Contributor

bors commented Jun 8, 2018

⌛ Testing commit e5b378b with merge 8afb894...

bors added a commit that referenced this pull request Jun 8, 2018
…hind-borrow, r=nikomatsakis

NLL: report type moved from behind borrow of array/slice

When NLL has illegal move due to borrowed content in an array or slice, provide feedback about why the move wasn't a copy.

Drive by: While comparing the resulting `.nll.stderr` files to their old borrowck variants, I noticed that the test for borrowck-vec-pattern-nesting.rs was not signaling some errors under NLL due to the test assuming lexical lifetimes. So I fixed that too.

Fix #51190
@kennytm
Copy link
Member

kennytm commented Jun 8, 2018

@bors treeclosed-

@bors
Copy link
Contributor

bors commented Jun 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 8afb894 to master...

@bors bors merged commit e5b378b into rust-lang:master Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: 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.

NLL elides type behind a borrow (and its Copy-ness) when reporting move error
6 participants