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

Omitted the walks in visit_expr() and visit_stmt() #51993

Merged
merged 2 commits into from
Jul 7, 2018

Conversation

TheDarkula
Copy link
Contributor

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

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

The job x86_64-gnu-llvm-3.9 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:18:39]    Compiling rustc_tsan v0.0.0 (file:///checkout/src/librustc_tsan)
[00:18:39]    Compiling rustc_asan v0.0.0 (file:///checkout/src/librustc_asan)
[00:18:40]    Compiling rustc_msan v0.0.0 (file:///checkout/src/librustc_msan)
[00:18:40]    Compiling rustc_lsan v0.0.0 (file:///checkout/src/librustc_lsan)
[00:19:08] error[E0597]: borrowed value does not live long enough
[00:19:08]   --> libcore/panic.rs:58:31
[00:19:08]    |
[00:19:08] 58 |         PanicInfo { payload: &NoPayload, location, message }
[00:19:08]    |                               ^^^^^^^^^ temporary value does not live long enough
[00:19:08] 59 |     }
[00:19:08]    |     - temporary value only lives until here
[00:19:08]    |
[00:19:08] note: borrowed value must be valid for the lifetime 'a as defined on the impl at 47:6...
[00:19:08]   --> libcore/panic.rs:47:6
[00:19:08] 47 | impl<'a> PanicInfo<'a> {
[00:19:08]    |      ^^
[00:19:08] 
[00:19:13] error: aborting due to previous error
[00:19:13] error: aborting due to previous error
[00:19:13] 
[00:19:13] For more information about this error, try `rustc --explain E0597`.
[00:19:13] error: Could not compile `core`.
[00:19:13] 
[00:19:13] Caused by:
[00:19:13]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name core libcore/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=9d37d95f0c4f2954 -C extra-filename=-9d37d95f0c4f2954 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps` (exit code: 101)
[00:19:13] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:19:13] expected success, got: exit code: 101
[00:19:13] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:19:13] travis_fold:end:stage1-std

[00:19:13] travis_time:end:stage1-std:start=1530553676908148709,finish=1530553721731750493,duration=44823601784


[00:19:13] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:19:13] Build completed unsuccessfully in 0:14:41
[00:19:13] Makefile:28: recipe for target 'all' failed
[00:19:13] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:031c1e80
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Jul  2 17:48:42 UTC 2018
/modules
158412 ./.git/modules/src
149120 ./src/llvm-emscripten/test
144408 ./obj/build/bootstrap/debug/incremental
129896 ./obj/build/bootstrap/debug/incremental/bootstrap-146vjsckowoo9
129892 ./obj/build/bootstrap/debug/incremental/bootstrap-146vjsckowoo9/s-f2ja76iejg-hbe8rr-3ah8kbogwyk4h
89812 ./src/llvm/test/CodeGen
88916 ./obj/build/x86_64-unknown-linux-gnu/stage1
88892 ./obj/build/x86_64-unknown-linux-gnu/stage1/lib
76232 ./.git/modules/src/tools

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:03:59] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:59] tidy error: /checkout/src/librustc_passes/rvalue_promotion.rs:282: line longer than 100 chars
[00:04:01] some tidy checks failed
[00:04:01] 
[00:04:01] 
[00:04:01] 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:01] 
[00:04:01] 
[00:04:01] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:01] Build completed unsuccessfully in 0:01:23
[00:04:01] Build completed unsuccessfully in 0:01:23
[00:04:01] make: *** [tidy] Error 1
[00:04:01] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0794d489
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:19064325:start=1530571963180017757,finish=1530571963184975876,duration=4958119
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:084354c4
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:116ce920
$ 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:03:36] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:36] tidy error: /checkout/src/librustc_passes/rvalue_promotion.rs:282: line longer than 100 chars
[00:03:38] some tidy checks failed
[00:03:38] 
[00:03:38] 
[00:03:38] 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:03:38] 
[00:03:38] 
[00:03:38] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:38] Build completed unsuccessfully in 0:01:11
[00:03:38] Build completed unsuccessfully in 0:01:11
[00:03:38] Makefile:79: recipe for target 'tidy' failed
[00:03:38] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06043098
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0ac0d2da:start=1530625632582330355,finish=1530625632586746654,duration=4416299
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:07f0bb91
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0126f770
$ 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:05:11] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:05:11] tidy error: /checkout/src/librustc_passes/rvalue_promotion.rs:282: line longer than 100 chars
[00:05:13] some tidy checks failed
[00:05:13] 
[00:05:13] 
[00:05:13] 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:05:13] 
[00:05:13] 
[00:05:13] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:05:13] Build completed unsuccessfully in 0:01:52
[00:05:13] Build completed unsuccessfully in 0:01:52
[00:05:13] Makefile:79: recipe for target 'tidy' failed
[00:05:13] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1b05a4ec
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:2ac0b7c4:start=1530638890810598720,finish=1530638890817473716,duration=6874996
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:066e1926
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0c5b451c
$ 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:04:45] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:45] tidy error: /checkout/src/librustc_passes/rvalue_promotion.rs:282: line longer than 100 chars
[00:04:47] some tidy checks failed
[00:04:47] 
[00:04:47] 
[00:04:47] 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:47] 
[00:04:47] 
[00:04:47] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:47] Build completed unsuccessfully in 0:01:38
[00:04:47] Build completed unsuccessfully in 0:01:38
[00:04:47] make: *** [tidy] Error 1
[00:04:47] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00b8a92d
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:1a513f42:start=1530642665890315072,finish=1530642665897785099,duration=7470027
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:05ad860d
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:266dafda
$ 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:04:22] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:22] tidy error: /checkout/src/librustc_passes/rvalue_promotion.rs:280: line longer than 100 chars
[00:04:24] some tidy checks failed
[00:04:24] 
[00:04:24] 
[00:04:24] 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:24] 
[00:04:24] 
[00:04:24] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:24] Build completed unsuccessfully in 0:01:30
[00:04:24] Build completed unsuccessfully in 0:01:30
[00:04:24] make: *** [tidy] Error 1
[00:04:24] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1ecc820d
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:01b99974:start=1530650955526321848,finish=1530650955532845102,duration=6523254
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0346a412
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:09f1e900
$ 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/b5/dd/84d32d2275ea16daf09d561858dd0e615c56c9e8afb2e9b42d02bc45e417/awscli-1.15.51-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 16.8MB/s eta 0:00:01
    1% |▌                               | 20kB 1.9MB/s eta 0:00:01
    2% |▊                               | 30kB 2.2MB/s eta 0:00:01
    3% |█                               | 40kB 2.0MB/s eta 0:00:01
---
    100% |████████████████████████████████| 552kB 1.9MB/s 
Collecting botocore==1.10.50 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/d5/9f/2e701a365b5ff0e8b664d6c393f3c61c20e52bb5148bbc2e27d737b890db/botocore-1.10.50-py2.py3-none-any.whl (4.4MB)
    0% |                                | 10kB 35.7MB/s eta 0:00:01
    0% |▏                               | 20kB 34.1MB/s eta 0:00:01
    0% |▎                               | 30kB 40.8MB/s eta 0:00:01
    0% |▎                               | 40kB 44.5MB/s eta 0:00:01
---
[00:21:04]    Compiling std_unicode v0.0.0 (file:///checkout/src/libstd_unicode)
[00:21:05]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:21:06]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:21:10]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]     |
[00:21:16]     |
[00:21:16] 701 |     print_to(args, &LOCAL_STDOUT, stdout, "stdout");
[00:21:16]     |                     ^^^^^^^^^^^^                   - temporary value only lives until here
[00:21:16]     |                     |
[00:21:16]     |                     temporary value does not live long enough
[00:21:16]     |
[00:21:16]     = note: borrowed value must be valid for the static lifetime...
[00:21:16]     = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]     |
[00:21:16]     |
[00:21:16] 710 |     print_to(args, &LOCAL_STDERR, stderr, "stderr");
[00:21:16]     |                     ^^^^^^^^^^^^                   - temporary value only lives until here
[00:21:16]     |                     |
[00:21:16]     |                     temporary value does not live long enough
[00:21:16]     |
[00:21:16]     = note: borrowed value must be valid for the static lifetime...
[00:21:16]     = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]   --> libstd/future.rs:61:9
[00:21:16]    |
[00:21:16] 61 |         TLS_CX.with(|tls_cx| {
[00:21:16]    |         ^^^^^^ temporary value does not live long enough
[00:21:16] 62 |             tls_cx.set(self.0.take());
[00:21:16] 63 |         });
[00:21:16]    |           - temporary value only lives until here
[00:21:16]    |
[00:21:16]    = note: borrowed value must be valid for the static lifetime...
[00:21:16]    = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]   --> libstd/future.rs:73:18
[00:21:16]    |
[00:21:16] 73 |     let old_cx = TLS_CX.with(|tls_cx| {
[00:21:16]    |                  ^^^^^^ temporary value does not live long enough
[00:21:16] 80 |     });
[00:21:16] 80 |     });
[00:21:16]    |       - temporary value only lives until here
[00:21:16]    |
[00:21:16]    = note: borrowed value must be valid for the static lifetime...
[00:21:16]    = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]    --> libstd/future.rs:96:18
[00:21:16]     |
[00:21:16] 96  |     let cx_ptr = TLS_CX.with(|tls_cx| {
[00:21:16]     |                  ^^^^^^ temporary value does not live long enough
[00:21:16] 100 |     });
[00:21:16] 100 |     });
[00:21:16]     |       - temporary value only lives until here
[00:21:16]     |
[00:21:16]     = note: borrowed value must be valid for the static lifetime...
[00:21:16]     = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]    |
[00:21:16]    |
[00:21:16] 47 |     THREAD_INFO.with(|c| assert!(c.borrow().is_none()));
[00:21:16]    |     ^^^^^^^^^^^                                        - temporary value only lives until here
[00:21:16]    |     |
[00:21:16]    |     temporary value does not live long enough
[00:21:16]    |
[00:21:16]    = note: borrowed value must be valid for the static lifetime...
[00:21:16]    = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]    |
[00:21:16]    |
[00:21:16] 48 |     THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo{
[00:21:16]    |     ^^^^^^^^^^^ temporary value does not live long enough
[00:21:16] 51 |     }));
[00:21:16] 51 |     }));
[00:21:16]    |        - temporary value only lives until here
[00:21:16]    |
[00:21:16]    = note: borrowed value must be valid for the static lifetime...
[00:21:16]    = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]    |
[00:21:16]    |
[00:21:16] 55 |     THREAD_INFO.with(move |c| c.borrow_mut().as_mut().unwrap().stack_guard = stack_guard);
[00:21:16]    |     ^^^^^^^^^^^ temporary value does not live long enough                                - temporary value only lives until here
[00:21:16]    |
[00:21:16]    = note: borrowed value must be valid for the static lifetime...
[00:21:16]    = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]     |
[00:21:16]     |
[00:21:16] 218 |     let prev = LOCAL_STDERR.with(|s| s.borrow_mut().take());
[00:21:16]     |                ^^^^^^^^^^^^                                - temporary value only lives until here
[00:21:16]     |                |
[00:21:16]     |                temporary value does not live long enough
[00:21:16]     |
[00:21:16]     = note: borrowed value must be valid for the static lifetime...
[00:21:16]     = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]     |
[00:21:16]     |
[00:21:16] 223 |            LOCAL_STDERR.with(|slot| {
[00:21:16]     |            ^^^^^^^^^^^^ temporary value does not live long enough
[00:21:16] 224 |                *slot.borrow_mut() = s.take();
[00:21:16] 225 |            });
[00:21:16]     |              - temporary value only lives until here
[00:21:16]     |
[00:21:16]     = note: borrowed value must be valid for the static lifetime...
[00:21:16]     = note: consider using a `let` binding to increase its lifetime
[00:21:16] 
[00:21:16] error[E0597]: borrowed value does not live long enough
[00:21:16]     m| |             }
[00:21:16] 435 | |         }
[00:21:16]     | |_________^
[00:21:16] 
[00:21:16] 
[00:21:17] error: aborting due to 11 previous errors
[00:21:17] 
[00:21:17] For more information about this error, try `rustc --explain E0597`.
[00:21:17] error: Could not compile `std`.
[00:21:17] 
[00:21:17] Caused by:
[00:21:17]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=84c7fbfce53d7ef5 -C extra-filename=-84c7fbfce53d7ef5 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc-c69d0f052402a17c.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc_jemalloc-07d26af630202296.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc_system-4df9e82ac7dca73d.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-30cc8e27b6fe75eb.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-9d37d95f0c4f2954.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-f8b3dd8e60562e7e.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libpanic_abort-d58b9a962a6b502c.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libpanic_unwind-44d3e8b90f7d78f1.rlib --extern rustc_asan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_asan-457ec772a506b6ac.rlib --extern rustc_lsan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_lsan-0226c7120ae54e2a.rlib --extern rustc_msan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_msan-faa081c0f92f0e3b.rlib --extern rustc_tsan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_tsan-f430c0b2bfd2c0fa.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libstd_unicode-e5529cb27937bb7c.rlib --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libunwind-61a63a2307487562.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/libbacktrace/ -l static=backtrace -l dl -l rt -l pthread -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-0a2e62b135669011/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/jemalloc/lib` (exit code: 101)
[00:21:17] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:21:17] expected success, got: exit code: 101
[00:21:17] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:21:17] travis_fold:end:stage1-std

[00:21:17] travis_time:end:stage1-std:start=1530655862089009495,finish=1530655935962610544,duration=73873601049


[00:21:17] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:21:17] Build completed unsuccessfully in 0:16:19
[00:21:17] make: *** [all] Error 1
[00:21:17] Makefile:28: recipe for target 'all' failed
342268 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu
315048 ./src/llvm
241184 ./src/llvm-emscripten
210228 ./src/llvm/test
---
158324 ./.git/modules/src
149120 ./src/llvm-emscripten/test
144328 ./obj/build/bootstrap/debug/incremental
129816 ./obj/build/bootstrap/debug/incremental/bootstrap-146vjsckowoo9
129812 ./obj/build/bootstrap/debug/incremental/bootstrap-146vjsckowoo9/s-f2kl3vv06w-dk09c0-2cm8xlrxnbnm8
97524 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
89820 ./src/llvm/test/CodeGen
88912 ./obj/build/x86_64-unknown-linux-gnu/stage1
88888 ./obj/build/x86_64-unknown-linux-gnu/stage1/lib

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)

@oli-obk
Copy link
Contributor

oli-obk commented Jul 4, 2018

Hmm... curious, it fails on paths. Try adding visitor.visit_qpath(qpath, expression.id, expression.span); to the ExprPath arm.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:19:59]    Compiling std_unicode v0.0.0 (file:///checkout/src/libstd_unicode)
[00:20:00]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:20:00]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:20:05]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]     |
[00:20:11]     |
[00:20:11] 701 |     print_to(args, &LOCAL_STDOUT, stdout, "stdout");
[00:20:11]     |                     ^^^^^^^^^^^^                   - temporary value only lives until here
[00:20:11]     |                     |
[00:20:11]     |                     temporary value does not live long enough
[00:20:11]     |
[00:20:11]     = note: borrowed value must be valid for the static lifetime...
[00:20:11]     = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]     |
[00:20:11]     |
[00:20:11] 710 |     print_to(args, &LOCAL_STDERR, stderr, "stderr");
[00:20:11]     |                     ^^^^^^^^^^^^                   - temporary value only lives until here
[00:20:11]     |                     |
[00:20:11]     |                     temporary value does not live long enough
[00:20:11]     |
[00:20:11]     = note: borrowed value must be valid for the static lifetime...
[00:20:11]     = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]   --> libstd/future.rs:61:9
[00:20:11]    |
[00:20:11] 61 |         TLS_CX.with(|tls_cx| {
[00:20:11]    |         ^^^^^^ temporary value does not live long enough
[00:20:11] 62 |             tls_cx.set(self.0.take());
[00:20:11] 63 |         });
[00:20:11]    |           - temporary value only lives until here
[00:20:11]    |
[00:20:11]    = note: borrowed value must be valid for the static lifetime...
[00:20:11]    = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]   --> libstd/future.rs:73:18
[00:20:11]    |
[00:20:11] 73 |     let old_cx = TLS_CX.with(|tls_cx| {
[00:20:11]    |                  ^^^^^^ temporary value does not live long enough
[00:20:11] 80 |     });
[00:20:11] 80 |     });
[00:20:11]    |       - temporary value only lives until here
[00:20:11]    |
[00:20:11]    = note: borrowed value must be valid for the static lifetime...
[00:20:11]    = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]    --> libstd/future.rs:96:18
[00:20:11]     |
[00:20:11] 96  |     let cx_ptr = TLS_CX.with(|tls_cx| {
[00:20:11]     |                  ^^^^^^ temporary value does not live long enough
[00:20:11] 100 |     });
[00:20:11] 100 |     });
[00:20:11]     |       - temporary value only lives until here
[00:20:11]     |
[00:20:11]     = note: borrowed value must be valid for the static lifetime...
[00:20:11]     = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]    |
[00:20:11]    |
[00:20:11] 47 |     THREAD_INFO.with(|c| assert!(c.borrow().is_none()));
[00:20:11]    |     ^^^^^^^^^^^                                        - temporary value only lives until here
[00:20:11]    |     |
[00:20:11]    |     temporary value does not live long enough
[00:20:11]    |
[00:20:11]    = note: borrowed value must be valid for the static lifetime...
[00:20:11]    = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]    |
[00:20:11]    |
[00:20:11] 48 |     THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo{
[00:20:11]    |     ^^^^^^^^^^^ temporary value does not live long enough
[00:20:11] 51 |     }));
[00:20:11] 51 |     }));
[00:20:11]    |        - temporary value only lives until here
[00:20:11]    |
[00:20:11]    = note: borrowed value must be valid for the static lifetime...
[00:20:11]    = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]    |
[00:20:11]    |
[00:20:11] 55 |     THREAD_INFO.with(move |c| c.borrow_mut().as_mut().unwrap().stack_guard = stack_guard);
[00:20:11]    |     ^^^^^^^^^^^ temporary value does not live long enough                                - temporary value only lives until here
[00:20:11]    |
[00:20:11]    = note: borrowed value must be valid for the static lifetime...
[00:20:11]    = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]     |
[00:20:11]     |
[00:20:11] 218 |     let prev = LOCAL_STDERR.with(|s| s.borrow_mut().take());
[00:20:11]     |                ^^^^^^^^^^^^                                - temporary value only lives until here
[00:20:11]     |                |
[00:20:11]     |                temporary value does not live long enough
[00:20:11]     |
[00:20:11]     = note: borrowed value must be valid for the static lifetime...
[00:20:11]     = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]     |
[00:20:11]     |
[00:20:11] 223 |            LOCAL_STDERR.with(|slot| {
[00:20:11]     |            ^^^^^^^^^^^^ temporary value does not live long enough
[00:20:11] 224 |                *slot.borrow_mut() = s.take();
[00:20:11] 225 |            });
[00:20:11]     |              - temporary value only lives until here
[00:20:11]     |
[00:20:11]     = note: borrowed value must be valid for the static lifetime...
[00:20:11]     = note: consider using a `let` binding to increase its lifetime
[00:20:11] 
[00:20:11] error[E0597]: borrowed value does not live long enough
[00:20:11]     |
[00:20:11] 433 |                 None => &(),
[00:20:11]     |                          ^-
[00:20:11]     |                          ||
[00:20:11]     |                          ||
[00:20:11]     |                          |temporary value only lives until here
[00:20:11]     |                          temporary value does not live long enough
[00:20:11]     |
[00:20:11] note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 430:9...
[00:20:11]     |
[00:20:11]     |
[00:20:11] 430 | /         fn get(&mut self) -> &(Any + Send) {
[00:20:11] 431 | |             match self.inner {
[00:20:11] 432 | |                 Some(ref a) => a,
[00:20:11] 433 | |                 None => &(),
[00:20:11] 435 | |         }
[00:20:11]     | |_________^
[00:20:11] 
bj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-0a2e62b135669011/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/jemalloc/lib` (exit code: 101)
bj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-0a2e62b135669011/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/jemalloc/lib` (exit code: 101)
[00:20:11] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:20:11] expected success, got: exit code: 101
[00:20:11] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:20:11] travis_fold:end:stage1-std

[00:20:11] travis_time:end:stage1-std:start=1530707165801669172,finish=1530707237582668503,duration=71780999331


[00:20:11] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:20:11] Build completed unsuccessfully in 0:15:42
[00:20:11] make: *** [all] Error 1
[00:20:11] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:33a84b6f
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:2bf75e24:start=1530707238231134085,finish=1530707238239295912,duration=8161827
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:000c6730
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:31e2b54b
$ 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)

hir::ExprArray(_) |
hir::ExprType(..) |
hir::ExprTup(..) => {}
hir::ExprBlock(ref box_block, ref _option_label) => {

This comment was marked as resolved.


hir::ExprArray(ref hirvec) => {
for index in hirvec.iter() {
match *index {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this match, it should be fine to call v.visit_expr(index) directly, if that fails, use v.visit_expr(&**index) to force a deref.

That transformation can be applied to all the match statements you used for reference conversions

@@ -293,27 +293,38 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>, e: &hir::Expr, node
hir::ExprIndex(..) if v.tables.is_method_call(e) => {
v.promotable = false;
}
hir::ExprBox(_) => {
hir::ExprBox(ref expr) => {
match *expr {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this match is also unnecessary

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:22:53]    Compiling std_unicode v0.0.0 (file:///checkout/src/libstd_unicode)
[00:22:55]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:22:55]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:23:00]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:23:08] error[E0597]: borrowed value does not live long enough
[00:23:08]     |
[00:23:08]     |
[00:23:08] 223 |            LOCAL_STDERR.with(|slot| {
[00:23:08]     |            ^^^^^^^^^^^^ temporary value does not live long enough
[00:23:08] 224 |                *slot.borrow_mut() = s.take();
[00:23:08] 225 |            });
[00:23:08]     |              - temporary value only lives until here
[00:23:08]     |
[00:23:08]     = note: borrowed value must be valid for the static lifetime...
[00:23:08]     = note: consider using a `let` binding to increase its lifetime
[00:23:08] 
[00:23:08] error[E0597]: borrowed value does not live long enough
[00:23:08]     |
[00:23:08] 433 |                 None => &(),
[00:23:08]     |                          ^-
[00:23:08]     |                          ||
[00:23:08]     |                          ||
[00:23:08]     |                          |temporary value only lives until here
[00:23:08]     |                          temporary value does not live long enough
[00:23:08]     |
[00:23:08] note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 430:9...
[00:23:08]     |
[00:23:08]     |
[00:23:08] 430 | /         fn get(&mut self) -> &(Any + Send) {
[00:23:08] 431 | |             match self.inner {
[00:23:08] 432 | |                 Some(ref a) => a,
[00:23:08] 433 | |                 None => &(),
[00:23:08] 435 | |         }
[00:23:08]     | |_________^
[00:23:08] 
[00:23:08] error: aborting due to 2 previous errors
[00:23:08] error: aborting due to 2 previous errors
[00:23:08] 
[00:23:08] For more information about this error, try `rustc --explain E0597`.
[00:23:08] error: Could not compile `std`.
[00:23:08] 
[00:23:08] Caused by:
[00:23:08]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=84c7fbfce53d7ef5 -C extra-filename=-84c7fbfce53d7ef5 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc-c69d0f052402a17c.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc_jemalloc-07d26af630202296.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc_system-4df9e82ac7dca73d.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-30cc8e27b6fe75eb.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-9d37d95f0c4f2954.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-f8b3dd8e60562e7e.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libpanic_abort-d58b9a962a6b502c.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libpanic_unwind-44d3e8b90f7d78f1.rlib --extern rustc_asan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_asan-457ec772a506b6ac.rlib --extern rustc_lsan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_lsan-0226c7120ae54e2a.rlib --extern rustc_msan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_msan-faa081c0f92f0e3b.rlib --extern rustc_tsan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_tsan-f430c0b2bfd2c0fa.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libstd_unicode-e5529cb27937bb7c.rlib --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libunwind-61a63a2307487562.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/libbacktrace/ -l static=backtrace -l dl -l rt -l pthread -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-0a2e62b135669011/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/jemalloc/lib` (exit code: 101)
[00:23:08] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:23:08] expected success, got: exit code: 101
[00:23:08] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:23:08] travis_fold:end:stage1-std

[00:23:08] travis_time:end:stage1-std:start=1530712455383138453,finish=1530712537328120176,duration=81944981723


[00:23:08] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:23:08] Build completed unsuccessfully in 0:18:10
[00:23:08] make: *** [all] Error 1
[00:23:08] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0240968c
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:02c5e233:start=1530712538050908960,finish=1530712538061549308,duration=10640348
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:18dabfe8
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:028ae30b
$ 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)

@@ -293,27 +293,36 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>, e: &hir::Expr, node
hir::ExprIndex(..) if v.tables.is_method_call(e) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to recurse into the fields of these three matches, too

v.visit_expr(expr);
for index in hirvec_arm.iter() {
match *index {
ref arm => match arm.guard {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also need to recurse into the other fields of arm

v.visit_expr(expr);
match **box_block {
ref block => {
match block.expr {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to visit all block statements, too. it would probably be better to create a visit_block function and call that one with the block as an argument, because then you can reuse it below in ExprLoop and above in ExprBlock


hir::ExprContinue(_) => {}

hir::ExprRet(ref option_expr) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can merge ExprBreak and ExprRet by making ref _destination be _

hir::ExprAssign(..) |
hir::ExprAssignOp(..) |
hir::ExprInlineAsm(..) => {
hir::ExprAssign(ref lhs, ref rhs) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can merge this with ExprAssignOp by making ref _binop be _

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:15]    Compiling std_unicode v0.0.0 (file:///checkout/src/libstd_unicode)
[00:20:16]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:20:17]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:20:21]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:20:27] error[E0597]: borrowed value does not live long enough
[00:20:27]     |
[00:20:27]     |
[00:20:27] 223 |            LOCAL_STDERR.with(|slot| {
[00:20:27]     |            ^^^^^^^^^^^^ temporary value does not live long enough
[00:20:27] 224 |                *slot.borrow_mut() = s.take();
[00:20:27] 225 |            });
[00:20:27]     |              - temporary value only lives until here
[00:20:27]     |
[00:20:27]     = note: borrowed value must be valid for the static lifetime...
[00:20:27]     = note: consider using a `let` binding to increase its lifetime
[00:20:27] 
[00:20:27] error[E0597]: borrowed value does not live long enough
[00:20:27]     |
[00:20:27] 433 |                 None => &(),
[00:20:27]     |                          ^-
[00:20:27]     |                          ||
[00:20:27]     |                          ||
[00:20:27]     |                          |temporary value only lives until here
[00:20:27]     |                          temporary value does not live long enough
[00:20:27]     |
[00:20:27] note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 430:9...
[00:20:27]     |
[00:20:27]     |
[00:20:27] 430 | /         fn get(&mut self) -> &(Any + Send) {
[00:20:27] 431 | |             match self.inner {
[00:20:27] 432 | |                 Some(ref a) => a,
[00:20:27] 433 | |                 None => &(),
[00:20:27] 435 | |         }
[00:20:27]     | |_________^
[00:20:27] 
[00:20:27] 
iler_builtins-30cc8e27b6fe75eb.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-9d37d95f0c4f2954.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-f8b3dd8e60562e7e.rlib --extern panic_abort=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libpanic_abort-d58b9a962a6b502c.rlib --extern panic_unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libpanic_unwind-44d3e8b90f7d78f1.rlib --extern rustc_asan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_asan-457ec772a506b6ac.rlib --extern rustc_lsan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_lsan-0226c7120ae54e2a.rlib --extern rustc_msan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_msan-faa081c0f92f0e3b.rlib --extern rustc_tsan=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_tsan-f430c0b2bfd2c0fa.rlib --extern std_unicode=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libstd_unicode-e5529cb27937bb7c.rlib --extern unwind=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libunwind-61a63a2307487562.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/libbacktrace/ -l static=backtrace -l dl -l rt -l pthread -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-0a2e62b135669011/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/native/jemalloc/lib` (exit code: 101)
[00:20:28] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:20:28] expected success, got: exit code: 101
[00:20:28] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:20:28] travis_fold:end:stage1-std

[00:20:28] travis_time:end:stage1-std:start=1530714635005514670,finish=1530714709494729621,duration=74489214951


[00:20:28] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:20:28] Build completed unsuccessfully in 0:15:50
[00:20:28] Makefile:28: recipe for target 'all' failed
[00:20:28] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:17e6c31e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:21:30]    Compiling rustc_data_structures v0.0.0 (file:///checkout/src/librustc_data_structures)
[00:21:33]    Compiling arena v0.0.0 (file:///checkout/src/libarena)
[00:21:33]    Compiling syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:21:37]    Compiling rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:21:54] error[E0597]: borrowed value does not live long enough
[00:21:54]     |
[00:21:54]     |
[00:21:54] 223 |                                     let expected = &[ $( stringify!($name) ),+ ];
[00:21:54]     |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:21:54] 229 |                                 }
[00:21:54] 229 |                                 }
[00:21:54]     |                                 - temporary value only lives until here
[00:21:54] ...
[00:21:54] 247 |                     get_meta!(since, reason);
[00:21:54]     |
[00:21:54]     |
[00:21:54]     = note: borrowed value must be valid for the static lifetime...
[00:21:54] 
[00:21:54] error[E0597]: borrowed value does not live long enough
[00:21:54]     |
[00:21:54]     |
[00:21:54] 223 |                                     let expected = &[ $( stringify!($name) ),+ ];
[00:21:54]     |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:21:54] 229 |                                 }
[00:21:54] 229 |                                 }
[00:21:54]     |                                 - temporary value only lives until here
[00:21:54] ...
[00:21:54] 273 |                     get_meta!(feature);
[00:21:54]     |
[00:21:54]     |
[00:21:54]     = note: borrowed value must be valid for the static lifetime...
[00:21:54] 
[00:21:54] error[E0597]: borrowed value does not live long enough
[00:21:54]     |
[00:21:54]     |
[00:21:54] 304 |                                             &["feature", "reason", "issue"]
[00:21:54]     |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:21:54] 306 |                                     );
[00:21:54] 306 |                                     );
[00:21:54]     |                                      - temporary value only lives until here
[00:21:54]     |
[00:21:54]     = note: borrowed value must be valid for the static lifetime...
[00:21:54]     = note: consider using a `let` binding to increase its lifetime
[00:21:54] 
[00:21:54] error[E0597]: borrowed value does not live long enough
[00:21:54]     |
[00:21:54]     |
[00:21:54] 363 |                                         AttrError::UnknownMetaItem(mi.name(), &["since", "note"]),
[00:21:54]     |                                                                                ^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:21:54] 364 |                                     );
[00:21:54]     |                                      - temporary value only lives until here
[00:21:54]     |
[00:21:54]     = note: borrowed value must be valid for the static lifetime...
[00:21:54]     = note: consider using a `let` binding to increase its lifetime
[00:21:54] 
[00:21:54] error[E0597]: borrowed value does not live long enough
[00:21:54]     |
[00:21:54]     |
[00:21:54] 545 |                                 AttrError::UnknownMetaItem(mi.name(), &["since", "note"]),
[00:21:54]     |                                                                        ^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:21:54] 546 |                             );
[00:21:54]     |                              - temporary value only lives until here
[00:21:54]     |
[00:21:54]     = note: borrowed value must be valid for the static lifetime...
[00:21:54]     = note: consider using a `let` binding to increase its lifetime
[00:21:56] error: aborting due to 5 previous errors
[00:21:56] 
[00:21:56] For more information about this error, try `rustc --explain E0597`.
[00:21:56] error: Could not compile `syntax`.
[00:21:56] error: Could not compile `syntax`.
[00:21:56] 
[00:21:56] Caused by:
[00:21:56]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name syntax libsyntax/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=6520f21211d1c6e4 -C extra-filename=-6520f21211d1c6e4 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-1d65b3b5f2314396.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-babaf616bce40eec.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-6581c00e27569018.so --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-b18c765052ec79ac.so --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-98bbb0bd2515be61.so --extern scoped_tls=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-a8440fe8f7c793aa.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-4b189baa036bcbee.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-4b189baa036bcbee.rlib --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-ec3cf21378a53dee.so` (exit code: 101)
[00:21:56] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:21:56] expected success, got: exit code: 101
[00:21:56] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:21:56] travis_fold:end:stage1-rustc

[00:21:56] travis_time:end:stage1-rustc:start=1530720183059121983,finish=1530720247338541848,duration=64279419865


[00:21:56] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:21:56] Build completed unsuccessfully in 0:17:26
[00:21:56] make: *** [all] Error 1
[00:21:56] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:003b5e66
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:22:17]    Compiling rustc_data_structures v0.0.0 (file:///checkout/src/librustc_data_structures)
[00:22:20]    Compiling arena v0.0.0 (file:///checkout/src/libarena)
[00:22:20]    Compiling syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:22:23]    Compiling rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:22:41] error[E0597]: borrowed value does not live long enough
[00:22:41]     |
[00:22:41]     |
[00:22:41] 223 |                                     let expected = &[ $( stringify!($name) ),+ ];
[00:22:41]     |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:22:41] 229 |                                 }
[00:22:41] 229 |                                 }
[00:22:41]     |                                 - temporary value only lives until here
[00:22:41] ...
[00:22:41] 247 |                     get_meta!(since, reason);
[00:22:41]     |
[00:22:41]     |
[00:22:41]     = note: borrowed value must be valid for the static lifetime...
[00:22:41] 
[00:22:41] error[E0597]: borrowed value does not live long enough
[00:22:41]    --> libsyntax/at               &["feature", "reason", "issue"]
[00:22:41]     |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:22:41] 306 |                                     );
[00:22:41] 306 |                                     );
[00:22:41]     |                                      - temporary value only lives until here
[00:22:41]     |
[00:22:41]     = note: borrowed value must be valid for the static lifetime...
[00:22:41]     = note: consider using a `let` binding to increase its lifetime
[00:22:41] 
[00:22:41] error[E0597]: borrowed value does not live long enough
[00:22:41]     |
[00:22:41]     |
[00:22:41] 363 |                                         AttrError::UnknownMetaItem(mi.name(), &["since", "note"]),
[00:22:41]     |                                                                                ^^^^^^^^^^^^^^^^^ temporary value does0m= note: borrowed value must be valid for the static lifetime...
[00:22:41]     = note: consider using a `let` binding to increase its lifetime
[00:22:43] error: aborting due to 5 previous errors
[00:22:43] 
[00:22:43] For more information about this error, try `rustc --explain E0597`.
[00:22:43] error: Could not compile `syntax`.
[00:22:43] error: Could not compile `syntax`.
[00:22:43] 
[00:22:43] Caused by:
[00:22:43]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name syntax libsyntax/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=6520f21211d1c6e4 -C extra-filename=-6520f21211d1c6e4 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-1d65b3b5f2314396.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-babaf616bce40eec.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-6581c00e27569018.so --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-b18c765052ec79ac.so --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-98bbb0bd2515be61.so --extern scoped_tls=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-a8440fe8f7c793aa.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-4b189baa036bcbee.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-4b189baa036bcbee.rlib --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-ec3cf21378a53dee.so` (exit code: 101)
[00:22:43] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:22:43] expected success, got: exit code: 101
[00:22:43] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:22:43] travis_fold:end:stage1-rustc

[00:22:43] travis_time:end:stage1-rustc:start=1530747139412990227,finish=1530747205558881184,duration=66145890957


[00:22:43] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:22:43] Build completed unsuccessfully in 0:17:52
[00:22:43] Makefile:28: recipe for target 'all' failed
[00:22:43] make: *** [all] Error 1

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:23:25]    Compiling syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:23:29]    Compiling rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:24:33]    Compiling proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:24:45]    Compiling syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:26:33] error[E0597]: borrowed value does not live long enough
[00:26:33]     --> librustc/ty/context.rs:1767:37
[00:26:33]      |
[00:26:33] 1767 |         let _reset = OnDrop(move || TLV.with(|tlv| tlv.set(old)));
[00:26:33]      |                                     ^^^                        - temporary value only lives until here
[00:26:33]      |                                     |
[00:26:33]      |                                     temporary value does not live long enough
[00:26:33]      |
[00:26:33]      = note: borrowed value must be valid for the static lifetime...
[00:26:33] 
[00:26:33] error[E0597]: borrowed value does not live long enough
[00:26:33]     --> librustc/ty/context.rs:1811:13
[00:26:33]      |
[00:26:33] 1811 |             TRACK_DIAGNOSTICS.with(|current| {
[00:26:33]      |             ^^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:26:33] 1821 |         })
[00:26:33] 1821 |         })
[00:26:33]      |         - temporary value only lives until here
[00:26:33]      |
[00:26:33]      = note: borrowed value must be valid for the static lifetime...
elease/build/backtrace-sys-36987d8923861156/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-b497c8cb5a7907ba/out` (exit code: 101)
[00:26:35] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:26:35] expected success, got: exit code: 101
[00:26:35] expected success, got: exit code: 101
[00:26:35] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1114:9
[00:26:35] travis_fold:end:stage1-rustc

[00:26:35] travis_time:end:stage1-rustc:start=1530749450076749667,finish=1530749684221167782,duration=234144418115


[00:26:35] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:26:35] Build completed unsuccessfully in 0:21:43
[00:26:35] make: *** [all] Error 1
[00:26:35] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06cf43d4
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

hir::ExprInlineAsm(..) => {
hir::ExprAssignOp(_, ref lhs, ref rhs) | hir::ExprAssign(ref lhs, ref rhs) => {
v.visit_expr(lhs);
v.visit_expr(rhs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you lost the v.promotable = false; here


// Generator expressions
hir::ExprYield(_) |
hir::ExprYield(ref expr) => {
v.visit_expr(&expr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v.promotable = false; missing here

}
}

hir::ExprContinue(_) => {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you lost the v.promotable = false; here

hir::ExprBreak(..) |
hir::ExprContinue(_) |
hir::ExprRet(_) |
hir::ExprBreak(_, ref option_expr) | hir::ExprRet(ref option_expr) => {

This comment was marked as resolved.

}

hir::ExprLoop(ref box_block, ref _option_label, ref _loop_source) => {
v.visit_block(box_block);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v.promotable = false; missing here

hir::ExprWhile(..) |
hir::ExprLoop(..) |
hir::ExprWhile(ref expr, ref box_block, ref _option_label) => {
v.visit_expr(expr);

This comment was marked as resolved.

match option_expr {
Some(ref expr) => v.visit_expr(&expr),
None => {},
}

This comment was marked as resolved.

None => {},
} }
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v.promotable = false; missing here

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:45:12] 
[00:45:12] running 1548 tests
[00:45:18] ......................................................F..........................................i..
[00:45:29] ....................................................................................................
[00:45:32] ....................................................................................................
[00:45:36] ....................................................................................................
[00:45:39] ....................................................................................................
---
[00:46:35] 
[00:46:35] ---- [ui] ui/borrowck/promote-ref-mut-in-let-issue-46557.rs stdout ----
[00:46:35] diff of stderr:
[00:46:35] 
[00:46:35] 21    = note: borrowed value must be valid for the static lifetime...
[00:46:35] 22 
[00:46:35] 23 error[E0597]: borrowed value does not live long enough
[00:46:35] -    |
[00:46:35] -    |
[00:46:35] - LL |         ref mut x => x //~ ERROR
[00:46:35] -    |         ^^^^^^^^^ temporary value does not live long enough
[00:46:35] - LL |     }
[00:46:35] - LL | }
[00:46:35] -    | - temporary value only lives until here
[00:46:35] -    |
[00:46:35] -    = note: borrowed value must be valid for the static lifetime...
[00:46:35] - 
[00:46:35] - error[E0597]: borrowed value does not live long enough
[00:46:35] -    |
[00:46:35] -    |
[00:46:35] - LL |         (ref mut x,) => x, //~ ERROR
[00:46:35] -    |          ^^^^^^^^^ borrowed value does not live long enough
[00:46:35] - LL |     }
[00:46:35] - LL | }
[00:46:35] -    | - borrowed value only lives until here
[00:46:35] -    |
[00:46:35] -    = note: borrowed value must be valid for the static lifetime...
[00:46:35] - 
[00:46:35] - error[E0597]: borrowed value does not live long enough
[00:46:35] 47    |
[00:46:35] 47    |
[00:46:35] 48 LL |     &mut 1234543 //~ ERROR
[00:46:35] 52    |
[00:46:35] 52    |
[00:46:35] 53    = note: borrowed value must be valid for the static lifetime...
[00:46:35] - error: aborting due to 5 previous errors
[00:46:35] + error: aborting due to 3 previous errors
[00:46:35] 56 
[00:46:35] 57 For more information about this error, try `rustc --explain E0597`.
[00:46:35] 57 For more information about this error, try `rustc --explain E0597`.
[00:46:35] 58 
[00:46:35] 
[00:46:35] 
[00:46:35] The actual stderr differed from the expected stderr.
[00:46:35] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/promote-ref-mut-in-let-issue-46557/promote-ref-mut-in-let-issue-46557.stderr
[00:46:35] To update references, rerun the tests and pass the `--bless` flag
[00:46:35] To only update this specific test, also pass `--test-args borrowck/promote-ref-mut-in-let-issue-46557.rs`
[00:46:35] error: 1 errors occurred comparing output.
[00:46:35] status: exit code: 101
[00:46:35] status: exit code: 101
[00:46:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/bore\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":711,"byte_end":720,"line_start":20,"line_end":20,"column_start":10,"column_end":19,"is_primary":true,"text":[{"text":"    let (ref mut x, ) = (1234543, ); //~ ERROR","highlight_start":10,"highlight_end":19}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":755,"byte_end":756,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"borrowed value only lives until here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: borrowed value does not live long enough\n  --> /checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs:20:10\n   |\nLL |     let (ref mut x, ) = (1234543, ); //~ ERROR\n   |          ^^^^^^^^^ borrowed value does not live long enough\nLL |     x\nLL | }\n   | - borrowed value only lives until here\n   |\n   = note: borrowed value must be valid for the static lifetime...\n\n"}
[00:46:35] {"message":"borrowed value does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":1058,"byte_end":1065,"line_start":37,"line_end":37,"column_start":10,"column_end":17,"is_primary":true,"text":[{"text":"    &mut 1234543 //~ ERROR","highlight_start":10,"highlight_end":17}],"label":"temporary value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":1076,"byte_end":1077,"line_start":38,"line_end":38,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"temporary value only lives until here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: borrowed value does not live long enough\n  --> /checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs:37:10\n   |\nLL |     &mut 1234543 //~ ERROR\n   |          ^^^^^^^ temporary value does not live long enough\nLL | }\n   | - temporary value only lives until here\n   |\n   = note: borrowed value must be valid for the static lifetime...\n\n"}
[00:46:35] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:46:35] {"message":"For more information about this error, try `rustc --explain E0597`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0597`.\n"}
[00:46:35] ------------------------------------------
[00:46:35] 
[00:46:35] thread '[ui] ui/borrowck/promote-ref-mut-in-let-issue-46557.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3140:9
[00:46:35] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[00:46:35] 
[00:46:35] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:46:35] 
[00:46:35] 
[00:46:35] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:46:35] 
[00:46:35] 
[00:46:35] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:46:35] Build completed unsuccessfully in 0:02:11
[00:46:35] Build completed unsuccessfully in 0:02:11
[00:46:35] make: *** [check] Error 1
[00:46:35] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:08d09f82
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

match block.expr {
Some(ref box_expr) => { self.visit_expr(&*box_expr) },
None => {},
} }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a line-break between those two closing bracket?

@@ -271,6 +269,19 @@ impl<'a, 'tcx> Visitor<'tcx> for CheckCrateVisitor<'a, 'tcx> {
}
self.promotable &= outer;
}

fn visit_block(&mut self, box_block: &'tcx hir::Block) {
match *box_block {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename argument to block and remove the match

v.promotable = false;
}
hir::ExprUnary(op, _) => {
hir::ExprUnary(op, ref expr) => {
match *expr {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still a nop-match left


v.promotable = false;
}
_ => {}
}
}
hir::ExprCast(ref from, _) => {
match *from {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another nop-match

@@ -379,7 +397,13 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>, e: &hir::Expr, node
}
}
}
hir::ExprCall(ref callee, _) => {
hir::ExprCall(ref callee, ref hirvec) => {
match **callee {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and another

hir::ExprStruct(..) => {
hir::ExprStruct(ref _qpath, ref hirvec, ref option_expr) => {
for index in hirvec.iter() {
match *index {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

hir::ExprField(ref expr, _) => {
hir::ExprField(ref expr, _ident) => {
match *expr {
ref expr => { v.visit_expr(&expr) },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

hir::ExprMatch(ref expr, ref hirvec_arm, ref _match_source) => {
v.visit_expr(expr);
for index in hirvec_arm.iter() {
match *index {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove nop match

for index in hirvec_arm.iter() {
match *index {
ref arm => {
match arm.body {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this nop-match, too. just use v.visit_expr(&arm.body)

ref expr => v.visit_expr(&*expr),
}
match arm.guard {
Some(ref expr) => v.visit_expr(&expr),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation and newlines here

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:39:12] 
[00:39:12] running 1548 tests
[00:39:18] .....................................................F...........................................i..
[00:39:24] ...........................................F.................i......................................
[00:39:31] ....................................................................................................
[00:39:35] ....................................................................................................
[00:39:38] ....................................................................................................
[00:39:43] ....................................................................................................
---
[00:40:29] 
[00:40:29] ---- [ui] ui/borrowck/promote-ref-mut-in-let-issue-46557.rs stdout ----
[00:40:29] diff of stderr:
[00:40:29] 
[00:40:29] 21    = note: borrowed value must be valid for the static lifetime...
[00:40:29] 22 
[00:40:29] 23 error[E0597]: borrowed value does not live long enough
[00:40:29] -    |
[00:40:29] -    |
[00:40:29] - LL |         ref mut x => x //~ ERROR
[00:40:29] -    |         ^^^^^^^^^ temporary value does not live long enough
[00:40:29] - LL |     }
[00:40:29] - LL | }
[00:40:29] -    | - temporary value only lives until here
[00:40:29] -    |
[00:40:29] -    = note: borrowed value must be valid for the static lifetime...
[00:40:29] - 
[00:40:29] - error[E0597]: borrowed value does not live long enough
[00:40:29] -    |
[00:40:29] -    |
[00:40:29] - LL |         (ref mut x,) => x, //~ ERROR
[00:40:29] -    |          ^^^^^^^^^ borrowed value does not live long enough
[00:40:29] - LL |     }
[00:40:29] - LL | }
[00:40:29] -    | - borrowed value only lives until here
[00:40:29] -    |
[00:40:29] -    = note: borrowed value must be valid for the static lifetime...
[00:40:29] - 
[00:40:29] - error[E0597]: borrowed value does not live long enough
[00:40:29] 47    |
[00:40:29] 47    |
[00:40:29] 48 LL |     &mut 1234543 //~ ERROR
[00:40:29] 52    |
[00:40:29] 52    |
[00:40:29] 53    = note: borrowed value must be valid for the static lifetime...
[00:40:29] - error: aborting due to 5 previous errors
[00:40:29] + error: aborting due to 3 previous errors
[00:40:29] 56 
[00:40:29] 57 For more information about this error, try `rustc --explain E0597`.
[00:40:29] 57 For more information about this error, try `rustc --explain E0597`.
[00:40:29] 58 
[00:40:29] 
[00:40:29] 
[00:40:29] The actual stderr differed from the expected stderr.
[00:40:29] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/promote-ref-mut-in-let-issue-46557/promote-ref-mut-in-let-issue-46557.stderr
[00:40:29] To update references, rerun the tests and pass the `--bless` flag
[00:40:29] To only update this specific test, also pass `--test-args borrowck/promote-ref-mut-in-let-issue-46557.rs`
[00:40:29] error: 1 errors occurred comparing output.
[00:40:29] status: exit code: 101
[00:40:29] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:40:29] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:40:29] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/promote-ref-mut-in-let-issue-46557/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/promote-ref-mut-in-let-issue-46557/auxiliary" "-A" "unused"
[00:40:29] ------------------------------------------
[00:40:29] 
[00:40:29] ------------------------------------------
[00:40:29] stderr:
[00:40:29] stderr:
[00:40:29] ------------------------------------------
[00:40:29] {"message":"borrowed value does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":607,"byte_end":616,"line_start":15,"line_end":15,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":"    let ref mut x = 1234543; //~ ERROR","highlight_start":9,"highlight_end":18}],"label":"temporary value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":644,"byte_end":645,"line_start":17,"line_end":17,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"temporary value only lives until here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: borrowed value does not live long enough\n  --> /checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs:15:9\n   |\nLL |     let ref mut x = 1234543; //~ ERROR\n   |         ^^^^^^^^^ temporary value does not live long enough\nLL |     x\nLL | }\n   | - temporary value only lives until here\n   |\n   = note: borrowed value must be valid for the static lifetime...\n\n"}
[00:40:29] {"message":"borrowed value does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":711,"byte_end":720,"line_start":20,"line_end":20,"column_start":10,"column_end":19,"is_primary":true,"text":[{"text":"    let (ref mut x, ) = (1234543, ); //~ ERROR","highlight_start":10,"highlight_end":19}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs","byte_start":755,"byte_end":756,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"borrowed value only lives until here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: borrowed value does not live long enough\n  --> /checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs:20:10\n   |\nLL |     let (ref mut x, ) = (1234543, ); //~ ERROR\n   |          ^^^^^^^^^ borrowed value does not live long enough\nLL |     x\nLL | }\n   | - borrowed value only lives until here\replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: borrowed value does not live long enough\n  --> /checkout/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs:37:10\n   |\nLL |     &mut 1234543 //~ ERROR\n   |          ^^^^^^^ temporary value does not live long enough\nLL | }\n   | - temporary value only lives until here\n   |\n   = note: borrowed value must be valid for the static lifetime...\n\n"}
[00:40:29] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:40:29] {"message":"For more information about this error, try `rustc --explain E0597`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0597`.\n"}
[00:40:29] ------------------------------------------
[00:40:29] 
[00:40:29] thread '[ui] ui/borrowck/promote-ref-mut-in-let-issue-46557.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3140:9
[00:40:29] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:40:29] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:40:29] 
[00:40:29] ---- [ui] ui/const-eval/promoted_const_fn_fail.rs stdout ----
[00:40:29] diff of stderr:
[00:40:29] 
[00:40:29] - error: this expression will panic at runtime
[00:40:29] -   --> $DIR/promoted_const_fn_fail.rs:25:9
[00:40:29] + error[E0597]: borrowed value does not live long enough
[00:40:29] +   --> $DIR/promoted_const_fn_fail.rs:35:27
[00:40:29] 3    |
[00:40:29] - LL |         Bar { a: &42 }.b as u8
[00:40:29] -    |         ^^^^^^^^^^^^^^^^^^^^^^ a raw memory access tried to access part of a pointer value as raw bytes
[00:40:29] + LL |     let x: &'static u8 = &(bar() + 1);
[00:40:29] +    |                           ^^^^^^^^^^^ temporary value does not live long enough
[00:40:29] + ...
[00:40:29] + LL | }
[00:40:29] +    | - temporary value only lives until here
[00:40:29] - note: lint level defined here
[00:40:29] -   --> $DIR/promoted_const_fn_fail.rs:13:9
[00:40:29] -    |
[00:40:29] -    |
[00:40:29] - LL | #![deny(const_err)]
[00:40:29] -    |         ^^^^^^^^^
[00:40:29] +    = note: borrowed value must be valid for the static lifetime...
[00:40:29] 12 
[00:40:29] - error: this expression will panic at runtime
[00:40:29] -    |
[00:40:29] -    |
[00:40:29] - LL |         Bar { a: &42 }.b as u8
[00:40:29] -    |         ^^^^^^^^^^^^^^^^^^^^^^ a raw memory access tried to access part of a pointer value as raw bytes
[00:40:29] + error: aborting due to previous error
[00:40:29] - error: aborting due to 2 previous errors
[00:40:29] - 
[00:40:29] + For more information about this error, try `rustc --explain E0597`.
[00:40:29] 21 
[00:40:29] 21 
[00:40:29] 
[00:40:29] 
[00:40:29] The actual stderr differed from the expected stderr.
[00:40:29] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-eval/promoted_const_fn_fail/promoted_const_fn_fail.stderr
[00:40:29] To update references, rerun the tests and pass the `--bless` flag
[00:40:29] To only up\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/const-eval/promoted_const_fn_fail.rs","byte_start":1104,"byte_end":1115,"line_start":35,"line_end":35,"column_start":27,"column_end":38,"is_primary":true,"text":[{"text":"    let x: &'static u8 = &(bar() + 1);","highlight_start":27,"highlight_end":38}],"label":"temporary value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/const-eval/promoted_const_fn_fail.rs","byte_start":1153,"byte_end":1154,"line_start":38,"line_end":38,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"temporary value only lives until here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: borrowed value does not live long enough\n  --> /checkout/src/test/ui/const-eval/promoted_const_fn_fail.rs:35:27\n   |\nLL |     let x: &'static u8 = &(bar() + 1);\n   |                           ^^^^^^^^^^^ temporary value does not live long enough\n...\nLL | }\n   | - temporary value only lives until here\n   |\n   = note: borrowed value must be valid for the static lifetime...\n\n"}
[00:40:29] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"erro64-unknown-linux-gnu/stage0-std/release/build
33884 ./src/llvm-emscripten/lib/Target
32156 ./obj/build/x86_64-unknown-linux-gnu/doc/src
31532 ./src/libcompiler_builtins/compiler-rt/test
30852 ./.git/modules/src/tools/lld

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)

@@ -523,6 +511,17 @@ fn check_expr<'a, 'tcx>(

// Conditional control flow (possible to implement).
hir::ExprMatch(ref expr, ref hirvec_arm, ref _match_source) => {
if let hir::ExprMatch(ref discr, ref arms, _) = e.node {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh.... please don't match again, just reuse the arguments you already pattern matched (expr and hirvec_arm), or rename these to discr and arms


v.promotable = false;
}
_ => {}
}
v.promotable = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhm... what is this line doing here?

if op == hir::UnDeref {
v.promotable = false;
}
v.promotable = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this one?

}
hir::ExprCast(ref from, _) => {
match *from {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still a nop-match left

}
v.visit_expr(lhs);
v.visit_expr(rhs);
v.promotable = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This v.promotable = false is wrong

if op == hir::UnDeref {
v.promotable = false;
}
}
hir::ExprBinary(op, ref lhs, _) => {
hir::ExprBinary(op, ref lhs, ref rhs) => {
v.visit_expr(lhs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here wrt method call

@@ -324,6 +324,7 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>, e: &hir::Expr, node
}
}
hir::ExprPath(ref qpath) => {
v.visit_qpath(qpath, e.id, e.span);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary

v.visit_expr(expr);
}

hir::ExprRepeat(ref expr, ref _anon_cast) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge with ExprAddrOf


v.visit_expr(expr);
for index in hirvec_arm.iter() {
match *index {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nop match

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
    97% |███████████████████████████████▍| 532kB 49.1MB/s eta 0:00:01
    99% |████████████████████████████████| 542kB 44.3MB/s eta 0:00:01
    100% |████████████████████████████████| 552kB 2.4MB/s 
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
/usr/local/lib/python2[K    14% |████▌                           | 10kB 41.1MB/s eta 0:00:01
    42% |█████████████▌                  | 30kB 50.8MB/s eta 0:00:01
    56% |██████████████████              | 40kB 53.6MB/s eta 0:00:01
    70% |██████████████████████▋         | 51kB 55.2MB/s eta 0:00:01
    84% |███████████████████████████     | 61kB 58.1MB/s eta 0:00:01
---
[00:19:53]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:19:53]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:19:58]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
2m...
[00:20:04] 100 |     });
[00:20:04]     |       - temporary value only lives until here
[00:20:04]     |
[00:20:04]     = note: borrowed value must be valid for the static lifetime...
[00:20:04]     = note: consider using a `let` binding to increase its lifetime
[00:20:04] 
[00:20:04] error[E0597]: borrowed value does not live long enough
[00:20:04]     |
[00:20:04]     |
[00:20:04] 218 |     let prev = LOCAL_STDERR.with(|s| s.borrow_mut().take());
[00:20:04]     |                ^^^^^^^^^^^^                                - temporary value only lives until here
[00:20:04]     |                |
[00:20:04]     |                temporary value does not live long enough
[00:20:04]     |
[00:20:04]     = note: borrowed value must be valid for the static lifetime...
[00:20:04]     = note:[00:20:04] error: aborting due to 3 previous errors
[00:20:04] For more information about this error, try `rustc --explain E0597`.
[00:20:04] error: Could not compile `std`.
[00:20:04] 
[00:20:04] Caused by:
[00:20:04] Caused by:
[00:20:04]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name std libstd/lib.rs --color always --error-format json --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="alloc_jemalloc" --cfg feature="backtrace" --cfg feature="jemalloc" --cfg feature="panic-unwind" --cfg feature="panic_unwind" -C metadata=03a946e021ed5d37 -C extra-filename=-03a946e021ed5d37 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc-2bf84ccb717c3c05.rlib --extern alloc_jemalloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc_jemalloc-b3b878d9b3919b74.rlib --extern alloc_system=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc_system-e485a43971c20bb9.rlib --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcomp

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:046d7f6e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:347a62e2:start=1530919042059136075,finish=1530919042066823128,duration=7687053
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0c5d2869
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
tr

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)

NestedVisitorMap::None
}

impl<'a, 'tcx>CheckCrateVisitor<'a, 'tcx> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: add a space before the Check

@oli-obk
Copy link
Contributor

oli-obk commented Jul 7, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Jul 7, 2018

📌 Commit f629eb3 has been approved by oli-obk

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

bors commented Jul 7, 2018

⌛ Testing commit f629eb3 with merge 6b5e396c75db3b28c842d88d39af65afd516fb9b...

@bors
Copy link
Contributor

bors commented Jul 7, 2018

💔 Test failed - status-travis

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

The job x86_64-gnu-aux 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.
  0     0    0     0    0     0      0      0 --:--:--  0:00:51 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:52 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:53 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:54 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:55 --:--:--     0curl: (6) Could not resolve host: s3-us-west-1.amazonaws.com
[01:08:55] thread 'main' panicked at 'failed to download openssl source: exit code: 6', bootstrap/native.rs:589:17
[01:08:55] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:08:55] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:08:55] Build completed unsuccessfully in 0:15:18
[01:08:55] Makefile:60: recipe for target 'check-aux' failed
[01:08:55] make: *** [check-aux] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:003a6be4
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0fcf03c6:start=1530947143518061999,finish=1530947143523520981,duration=5458982
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:024074f3
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:07c2f1d8
$ 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)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux 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.
  0     0    0     0    0     0      0      0 --:--:--  0:00:51 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:52 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:53 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:54 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:55 --:--:--     0curl: (6) Could not resolve host: s3-us-west-1.amazonaws.com
[01:08:55] thread 'main' panicked at 'failed to download openssl source: exit code: 6', bootstrap/native.rs:589:17
[01:08:55] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:08:55] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:08:55] Build completed unsuccessfully in 0:15:18
[01:08:55] Makefile:60: recipe for target 'check-aux' failed
[01:08:55] make: *** [check-aux] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:003a6be4
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0fcf03c6:start=1530947143518061999,finish=1530947143523520981,duration=5458982
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:024074f3
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:07c2f1d8
$ 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)

@RalfJung
Copy link
Member

RalfJung commented Jul 7, 2018

Looks like a spurious network failure.

@kennytm
Copy link
Member

kennytm commented Jul 7, 2018

@bors retry travis-ci/travis-ci#9696

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

bors commented Jul 7, 2018

⌛ Testing commit f629eb3 with merge 5a7e0f8...

bors added a commit that referenced this pull request Jul 7, 2018
Omitted the walks in visit_expr() and visit_stmt()

@oli-obk
@bors
Copy link
Contributor

bors commented Jul 7, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: oli-obk
Pushing 5a7e0f8 to master...

@bors bors merged commit f629eb3 into rust-lang:master Jul 7, 2018
@@ -169,12 +168,7 @@ impl<'a, 'gcx> CheckCrateVisitor<'a, 'gcx> {
}
}

impl<'a, 'tcx> Visitor<'tcx> for CheckCrateVisitor<'a, 'tcx> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should note that this part of the change makes no sense without #52318.
Please motivate such changes better in the future, using the PR description.

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.

7 participants