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

Mark variables captured by reference as mutable correctly #59708

Merged
merged 1 commit into from
Apr 14, 2019

Conversation

matthewjasper
Copy link
Contributor

Closes #59620

r? @pnkfelix

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:1ba23a58:start=1554406701387824575,finish=1554406802117133265,duration=100729308690
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---

[00:04:25] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:25] tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1274: line longer than 100 chars
[00:04:25] tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1277: line longer than 100 chars
[00:04:27] some tidy checks failed
[00:04:27] 
[00:04:27] 
[00:04:27] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:27] 
[00:04:27] 
[00:04:27] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:27] Build completed unsuccessfully in 0:00:47
[00:04:27] Build completed unsuccessfully in 0:00:47
[00:04:27] make: *** [tidy] Error 1
[00:04:27] Makefile:67: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:01a64cfc
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Apr  4 19:44:39 UTC 2019
---
travis_time:end:03e1c18c:start=1554407080473843968,finish=1554407080479692438,duration=5848470
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:246f02e0
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1905faa1
travis_time:start:1905faa1
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:026dd920
$ dmesg | grep -i kill

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)

@pnkfelix
Copy link
Member

pnkfelix commented Apr 8, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Apr 8, 2019

📌 Commit 968ea1c has been approved by pnkfelix

@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 Apr 8, 2019
Centril added a commit to Centril/rust that referenced this pull request Apr 8, 2019
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
@bors
Copy link
Contributor

bors commented Apr 9, 2019

⌛ Testing commit 968ea1c with merge b7212399ae2ba4338861998b9d70bed68c9de4fc...

@bors
Copy link
Contributor

bors commented Apr 9, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job dist-x86_64-apple 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.
travis_fold:start:worker_info
Worker information
hostname: c7b69a8a-0430-4fdd-8dc5-52b7d2147819@1.worker-custom-2-7846647cfb-d9k8w.macstadium-prod-2
instance: 95ae0ce2-3541-4cff-ba8c-ee93b6da55b2 moar-travis-ci-macos10.13-xcode9.3-1516902186 (via amqp)
startup: 59.412573022s
travis_fold:end:worker_info
Ignoring bigdecimal-1.3.4 because its extensions are not built.  Try: gem pristine bigdecimal --version 1.3.4
---
voltdb
wry
zxing-cpp
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.4.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e7/e7be50f4ee00e35887f3957263334eb3baba59e8c061919060f9259351be6880?__gda__=exp=1554794954~hmac=e1303dc9cff03502bb0500f5fd6d953a18d2d2e02a7a80e8d0512bad239ef1ba&response-content-disposition=attachment%3Bfilename%3D%22xz-5.2.4.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX18NkzrA9cp5bfeBRkjkxskgkasFz6KrJ7MeZO9jzfTPMv5fE4NV_9kCAFPdPKYduEGZ63deHbpDs9Pded7eFFCgZUujLZilZQ-vdVO4lwvDb7ire5y_FDLyMpMIBnMuQJIEgjDDSFEFKg&response-X-Checksum-Sha1=32dc0b28e61f32b40c20e2993418aa8cb6e746d5&response-X-Checksum-Sha2=e7be50f4ee00e35887f3957263334eb3baba59e8c061919060f9259351be6880
🍺  /usr/local/Cellar/xz/5.2.4: 92 files, 1MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /Users/travis/Library/Caches/Homebrew/boost-1.66.0.high_sierra.bottle.tar.gz... (84.6MB)
Removing: /Users/travis/Library/Caches/Homebrew/carthage-0.28.0.high_sierra.bottle.tar.gz... (8.3MB)
---
Pruned 0 symbolic links and 5 directories from /usr/local
==> Installing dependencies for swig: pcre
==> Installing swig dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.43.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/03/0389911a93a88efd4a69b52dea8ecb872fdb55bcfff45d2f7313be5f79730861?__gda__=exp=1554794967~hmac=2af26079751e7cb081b8ec6bad58145d531c29f8a894f7cad945774e8c6947b4&response-content-disposition=attachment%3Bfilename%3D%22pcre-8.43.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1-25GYG1jTpiBMqQAzyGph4Qrsd2NX7Iy-Te-gehs4VrbMGoSob01ItLPF2UfUVMgDk8YtIhdjNtWY9knLZz-99pCOVk-hH8IOI7qYeybgLMfqo6OTJdLM1orjqdJ_azJEp4NLYYwFf1w&response-X-Checksum-Sha1=c67d4b99bb245f0ea56b34118dd6325b06a7250c&response-X-Checksum-Sha2=0389911a93a88efd4a69b52dea8ecb872fdb55bcfff45d2f7313be5f79730861
🍺  /usr/local/Cellar/pcre/8.43: 204 files, 5.5MB
==> Installing swig
==> Downloading https://homebrew.bintray.com/bottles/swig-3.0.12.high_sierra.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/swig-3.0.12.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/c0/c0e2656fd10d57281280d20ce8bf9a060cf8714f4283dd1dfde383b3688d9ed1?__gda__=exp=1554794970~hmac=17d4dcd9214d20978c9c630a2be84439edee2b2a26acf4370f01b5e47eb37b3e&response-content-disposition=attachment%3Bfilename%3D%22swig-3.0.12.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX19FQiM6JRNX3FnwvQ1IrexElgviM2uX_K1JCJ1jUDhV6FBaN1TsNMHDbqPE4mOWPl1YCI622IV5qpV0Lyt5oalEksSfMxvpdCcoUvwJxeQByqF5_xaKsl53FAHn3UykRdyd3mm5Vo9Xnw&response-X-Checksum-Sha1=db6e6ed21965214d5f9fba1b180517bb2587ef59&response-X-Checksum-Sha2=c0e2656fd10d57281280d20ce8bf9a060cf8714f4283dd1dfde383b3688d9ed1
🍺  /usr/local/Cellar/swig/3.0.12: 755 files, 5.5MB
travis_time:end:0180d123:start=1554793851302252000,finish=1554794291983964000,duration=440681712000
travis_fold:end:install
travis_fold:start:before_script.1
---
[00:03:35]       Memory: 8 GB
[00:03:35]       Boot ROM Version: VMW71.00V.7581552.B64.1801142334
[00:03:35]       Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
[00:03:35]       SMC Version (system): 2.8f0
[00:03:35]       Serial Number (system): VMtWWh7rwhGH
[00:03:35] 
[00:03:35] hw.ncpu: 4
[00:03:35] hw.byteorder: 1234
[00:03:35] hw.memsize: 8589934592
---

[02:49:47] [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin", tool: "fabricate", path: "src/tools/rust-installer", mode: ToolBootstrap, is_optional_tool: false, source_type: Submodule, extra_features: [] } -- 62.641
[02:51:08] [TIMING] Docs { stage: 2, host: "x86_64-apple-darwin" } -- 85.531
[02:51:08] Dist docs (aarch64-apple-ios)
The job exceeded the maximum time limit for jobs, and has been terminated.

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 Apr 9, 2019
@kennytm
Copy link
Member

kennytm commented Apr 10, 2019

@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 Apr 10, 2019
cramertj added a commit to cramertj/rust that referenced this pull request Apr 11, 2019
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
@Mark-Simulacrum
Copy link
Member

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Apr 12, 2019
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019
Rollup of 18 pull requests

Successful merges:

 - rust-lang#59612 (Use normal newtype_index macro for MIR dataflows)
 - rust-lang#59675 (Stabilize the `alloc` crate.)
 - rust-lang#59708 (Mark variables captured by reference as mutable correctly)
 - rust-lang#59735 (remove lookup_char_pos_adj)
 - rust-lang#59747 (Copy book.toml unstable book generator)
 - rust-lang#59796 (Retire `IsNotConst` naming)
 - rust-lang#59804 (Clean up jobserver integration)
 - rust-lang#59818 (Eliminate `FnBox` usages from libstd.)
 - rust-lang#59830 (Fix links on keyword docs.)
 - rust-lang#59835 (Re-export NonZero signed variant in std)
 - rust-lang#59852 (std: Add `{read,write}_vectored` for more types)
 - rust-lang#59855 (Fix attributes position in type declaration)
 - rust-lang#59858 (Make duplicate matcher bindings a hard error)
 - rust-lang#59879 (Use SecRandomCopyBytes instead of /dev/urandom on MacOS)
 - rust-lang#59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - rust-lang#59912 (MaybeUninit: remove deprecated functions)
 - rust-lang#59925 (Fix paste error in split_ascii_whitespace docs.)
 - rust-lang#59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Apr 13, 2019
Rollup of 18 pull requests

Successful merges:

 - #59612 (Use normal newtype_index macro for MIR dataflows)
 - #59675 (Stabilize the `alloc` crate.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59796 (Retire `IsNotConst` naming)
 - #59804 (Clean up jobserver integration)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59879 (Use SecRandomCopyBytes instead of /dev/urandom on MacOS)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)
 - #59925 (Fix paste error in split_ascii_whitespace docs.)
 - #59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019
…-mut, r=pnkfelix

Mark variables captured by reference as mutable correctly

Closes rust-lang#59620

r? @pnkfelix
bors added a commit that referenced this pull request Apr 13, 2019
Rollup of 16 pull requests

Successful merges:

 - #59675 (Stabilize the `alloc` crate.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59796 (Retire `IsNotConst` naming)
 - #59804 (Clean up jobserver integration)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)
 - #59925 (Fix paste error in split_ascii_whitespace docs.)
 - #59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost
@bors bors merged commit 968ea1c into rust-lang:master Apr 14, 2019
@matthewjasper matthewjasper deleted the double-closure-unused-mut branch April 14, 2019 07:00
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.

False positive "variable does not need to be mutable" with two closures
6 participants