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

[WIP] remove Location::All #50938

Conversation

nikomatsakis
Copy link
Contributor

When adding the facts for the new analysis, I added this idea of a Locations::All which enforces an outlives relation at all points in the CFG. This was kind of a hack to deal with a problem in the return slot _0. What would happen is this. We would unify the type of _0 with the return type from the signature at the entry point of the function. Then later, we would write to _0:

...
_0 = ...
RETURN

This means that _0 — which is otherwise treated like a regular local variable — would be dead at the entry point. In the existing analysis, in part because of its imprecision, this still works out ok, but in the new analysis it did not: in effect, the type of _0 was severed from the signature. So the hack I added basically re-equates the type of _0 (and all parameters) with the signature at all points in the CFG. But this winds up adding a ton of redundant outlives relations (hence rust-lang/polonius#24).

So now I am taking a different approach. I equate the return type with the type from the signature only at the return location. This has the same soundness effect but without a hacky notion like Location::All. In the case of yields, I equate at all points. The argument types are equated on function entry.

I think this is the right general direction; we may want to think about the use of liveness in general, as it does mean that something like this will type-check:

fn foo(mut x: &'static u32) {
    let p = 22;
    x = &p; // here the old value of `x` is dead hence the region takes on a new, shorter value
    println!("x = {}", x);
}

This might seem surprising, since the type of x is declared as &'static u32, but &p cannot live for 'static lifetime. But it works because x is dead at the point x = &p and hence it effectively gets a "fresh set of regions" from its initial value.

I think we can address this concern in other ways, though, and not via the Locations::All hack (e.g., perhaps we should not use liveness to decide when regions in local variable types go dead, but rather going out of scope?). But anyway I'd rather we focus on that question in a separate PR.

I'm marking this PR as WIP, because IIRC it still had a few problems in travis, but I wanted to get it posted for feedback purposes.

r? @pnkfelix
cc @rust-lang/wg-compiler-nll

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 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:44:38] ....................................................................................................
[00:44:43] ....................................................................................................
[00:44:48] ....................................................................................................
[00:44:53] .....................................................................i..............................
[00:44:57] ..........F...................................i.....................................................
[00:45:07] ....................................................................................................
[00:45:14] ...................................................................i................................
[00:45:16] .............................................
[00:45:16] failures:
[00:45:16] failures:
[00:45:16] 
[00:45:16] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:45:16] ---- [ui] ui/nll/generator-distinct-lifetime.rs stdout ----
[00:45:16] 
[00:45:16] error: test compilation failed although it shouldn't!
[00:45:16] status: exit code: 101
[00:45:16] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/generator-distinct-lifetime.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/nll/generator-distinct-lifetime/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/nll/generator-distinct-lifetime/auxiliary" "-A" "unused"
[00:45:16] ------------------------------------------
[00:45:16] 
[00:45:16] ------------------------------------------
[00:45:16] stderr:
[00:45:16] stderr:
[00:45:16] ------------------------------------------
[00:45:16] {"message":"librustc_mir/transform/generator.rs:494: Broken MIR: generator contains type std::ops::GeneratorState<(), ()> in MIR, but typeck only knows about for<'r, 's, 't0> {&'r mut u32, u32, &'s mut u32, (), &'t0 mut u32}","code":null,"level":"error: internal compiler error","spans":[{"file_name":"/checkout/src/test/ui/nll/generator-distinct-lifetime.rs","byte_start":835,"byte_end":965,"line_start":22,"line_end":30,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    move || {","highlight_start":5,"highlight_end":14},{"text":"        let s = &mut *x;","highlight_start":1,"highlight_end":25},{"text":"        yield;","highlight_start":1,"highlight_end":15},{"text":"        *s += 1;","highlight_start":1,"highlight_end":17},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        let t = &mut *x;","highlight_start":1,"highlight_end":25},{"text":"        yield;","highlight_start":1,"highlight_end":15},{"text":"        *t += 1;","highlight_start":1,"highlight_end":17},{"text":"    };","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":"error: internal compiler error: librustc_mir/transform/generator.rs:494: Broken MIR: generator contains type std::ops::GeneratorState<(), ()> in MIR, but typeck only knows about for<'r, 's, 't0> {&'r mut u32, u32, &'s mut u32, (), &'t0 mut u32}\n  --> /checkout/src/test/ui/nll/generator-distinct-lifetime.rs:22:5\n   |\nLL | /     move || {\nLL | |         let s = &mut *x;\nLL | |         yield;\nLL | |         *s += 1;\n...  |\nLL | |         *t += 1;\nLL | |     };\n   | |_____^\n\n"}
[00:45:16] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:45:16] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:45:16] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:16] 
[00:45:16] note: the compiler unexpectedly panicked. this is a bug.
[00:45:16] 
[00:45:16] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:45:16] note: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
[00:45:16] 
[00:45:16] 
[00:45:16] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:45:16] 
[00:45:16] ------------------------------------------
[00:45:16] 
[00:45:16] thread '[ui] ui/nll/generator-distinct-lifetime.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3042:9
---
[00:45:16] test result: FAILED. 1437 passed; 1 failed; 7 ignored; 0 measured; 0 filtered out
[00:45:16] 
[00:45:16] 
[00:45:16] 
[00:45:16] 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-

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0eb197a8
$ 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)

@nikomatsakis nikomatsakis force-pushed the nll-alias-analysis-no-loc-all branch from 377430c to a904c55 Compare May 23, 2018 19:32
@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:47:11] ....................................................................................................
[00:47:16] ....................................................................................................
[00:47:20] ....................................................................................................
[00:47:26] ...........................................................................i........................
[00:47:30] ................F...................................i...............................................
[00:47:40] ....................................................................................................
[00:47:46] ............................................................................i.................iiiiii
[00:47:48] iii...................................................
[00:47:48] failures:
[00:47:48] failures:
[00:47:48] 
[00:47:48] ---- [ui] ui/nll/generator-distinct-lifetime.rs stdout ----
[00:47:48] 
[00:47:48] error: test compilation failed although it shouldn't!
[00:47:48] status: exit code: 101
[00:47:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/generator-distinct-lifetime.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/nll/generator-distinct-lifetime/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/nll/generator-distinct-lifetime/auxiliary" "-A" "unused"
[00:47:48] ------------------------------------------
[00:47:48] 
[00:47:48] ------------------------------------------
[00:47:48] stderr:
[00:47:48] stderr:
[00:47:48] ------------------------------------------
[00:47:48] {"message":"librustc_mir/transform/generator.rs:494: Broken MIR: generator contains type std::ops::GeneratorState<(), ()> in MIR, but typeck only knows about for<'r, 's, 't0> {&'r mut u32, u32, &'s mut u32, (), &'t0 mut u32}","code":null,"level":"error: internal compiler error","spans":[{"file_name":"/checkout/src/test/ui/nll/generator-distinct-lifetime.rs","byte_start":835,"byte_end":965,"line_start":22,"line_end":30,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    move || {","highlight_start":5,"highlight_end":14},{"text":"        let s = &mut *x;","highlight_start":1,"highlight_end":25},{"text":"        yield;","highlight_start":1,"highlight_end":15},{"text":"        *s += 1;","highlight_start":1,"highlight_end":17},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        let t = &mut *x;","highlight_start":1,"highlight_end":25},{"text":"        yield;","highlight_start":1,"highlight_end":15},{"text":"        *t += 1;","highlight_start":1,"highlight_end":17},{"text":"    };","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: internal compiler error: librustc_mir/transform/generator.rs:494: Broken MIR: generator contains type std::ops::GeneratorState<(), ()> in MIR, but typeck only knows about for<'r, 's, 't0> {&'r mut u32, u32, &'s mut u32, (), &'t0 mut u32}\n  --> /checkout/src/test/ui/nll/generator-distinct-lifetime.rs:22:5\n   |\nLL | /     move || {\nLL | |         let s = &mut *x;\nLL | |         yield;\nLL | |         *s += 1;\n...  |\nLL | |         *t += 1;\nLL | |     };\n   | |_____^\n\n"}
[00:47:48] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:48] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:48] 
[00:47:48] note: the compiler unexpectedly panicked. this is a bug.
[00:47:48] 
[00:47:48] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:48] note: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
[00:47:48] 
[00:47:48] 
[00:47:48] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:48] 
[00:47:48] ------------------------------------------
[00:47:48] 
[00:47:48] thread '[ui] ui/nll/generator-distinct-lifetime.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3044:9
---
[00:47:48] 
[00:47:48] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:47:48] 
[00:47:48] 
[00:47:48] 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:47:48] 
[00:47:48] 
[00:47:48] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:47:48] Build completed unsuccessfully in 0:02:34
[00:47:48] Build completed unsuccessfully in 0:02:34
[00:47:48] Makefile:58: recipe for target 'check' failed
[00:47:48] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1ab378ec
$ 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)

@bors
Copy link
Contributor

bors commented May 26, 2018

☔ The latest upstream changes (presumably #51082) made this pull request unmergeable. Please resolve the merge conflicts.

@pnkfelix
Copy link
Member

This might seem surprising, since the type of x is declared as &'static u32, but &p cannot live for 'static lifetime. But it works because x is dead at the point x = &p and hence it effectively gets a "fresh set of regions" from its initial value.

I think we can address this concern in other ways, though, and not via the Locations::All hack (e.g., perhaps we should not use liveness to decide when regions in local variable types go dead, but rather going out of scope?). But anyway I'd rather we focus on that question in a separate PR.

I found the above interesting.

Do you think the way we might address that concern is perhaps related to finding a complete resolution to #47184 ?

@@ -112,23 +108,19 @@ impl<'cx, 'tcx> SubtypeConstraintGenerator<'cx, 'tcx> {
// reverse direction, because `regioncx` talks about
// "outlives" (`>=`) whereas the region constraints
// talk about `<=`.
self.regioncx.add_outlives(span, b_vid, a_vid, at_location);
self.regioncx.add_outlives(span, b_vid, a_vid);
Copy link
Member

Choose a reason for hiding this comment

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

Am I right in my understanding that one side-effect of no longer passing at_location into add_outlives is that our diagnostics stop being able to point to this location as the place where a particular constraint was introduced, which is what is leading to problems like the regression in diagnostic quality for e.g. a904c55#diff-40124ba66f06953794b406e3bb131b95L6 ?)

(And if that hypothesis is correct, is your thinking that we're going to have to solve that problem more generally anyway, perhaps as part of #51188, but that finding a solution to that problem should not block landing PR's like this one?)

Copy link
Member

Choose a reason for hiding this comment

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

hey @nikomatsakis do you have an answer to my Q above ?

);
if let Some(mir_yield_ty) = mir.yield_ty {
let ur_yield_ty = universal_regions.yield_ty.unwrap();
self.equate_normalized_input_or_output(ur_yield_ty, mir_yield_ty);
self.equate_normalized_input_or_output(Locations::Yield, ur_yield_ty, mir_yield_ty);
Copy link
Member

Choose a reason for hiding this comment

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

I think I need a comment here saying this is the place where effectively you are equating at all points. (or am I even right about that?)

Copy link
Member

@pnkfelix pnkfelix Jun 4, 2018

Choose a reason for hiding this comment

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

@nikomatsakis I still would like to see a comment in the source code about the effect of this change. (Either my hypothesis is right, which means its a subtle effect. Or my hypothesis is wrong, which means I need to figure out where the equate-at-all-points is happening for Yield...)

@pnkfelix
Copy link
Member

So this all seems acceptable to me.

Its a shame about the regressions in diagnostic quality, but we have big problems to solve there on other test cases anyway, and thus I'm willing to assume we'll work on getting the quality back in these cases when we address those.

@nikomatsakis nikomatsakis force-pushed the nll-alias-analysis-no-loc-all branch from a904c55 to fd78a2f Compare May 30, 2018 14:16
@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:47:39] ....................................................................................................
[00:47:44] ....................................................................................................
[00:47:48] ....................................................................................................
[00:47:54] .............................................................................................i......
[00:48:00] ..................................F...................................i.............................
[00:48:10] ....................................................................................................
[00:48:16] ...................................................................................................i
[00:48:16] ...................................................................................................i
[00:48:19] .................iiiiiiiii...................................................
[00:48:19] 
[00:48:19] ---- [ui] ui/nll/generator-distinct-lifetime.rs stdout ----
[00:48:19] 
[00:48:19] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:48:19] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:48:19] error: test compilation failed although it shouldn't!
[00:48:19] status: exit code: 101
[00:48:19] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/generator-distinct-lifetime.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/nll/generator-distinct-lifetime/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/nll/generator-distinct-lifetime/auxiliary" "-A" "unused"
[00:48:19] ------------------------------------------
[00:48:19] 
[00:48:19] ------------------------------------------
[00:48:19] stderr:
[00:48:19] stderr:
[00:48:19] ------------------------------------------
[00:48:19] {"message":"librustc_mir/transform/generator.rs:494: Broken MIR: generator contains type std::ops::GeneratorState<(), ()> in MIR, but typeck only knows about for<'r, 's, 't0> {&'r mut u32, u32, &'s mut u32, (), &'t0 mut u32}","code":null,"level":"error: internal compiler error","spans":[{"file_name":"/checkout/src/test/ui/nll/generator-distinct-lifetime.rs","byte_start":835,"byte_end":965,"line_start":22,"line_end":30,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    move || {","highlight_start":5,"highlight_end":14},{"text":"        let s = &mut *x;","highlight_start":1,"highlight_end":25},{"text":"        yield;","highlight_start":1,"highlight_end":15},{"text":"        *s += 1;","highlight_start":1,"highlight_end":17},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        let t = &mut *x;","highlight_start":1,"highlight_end":25},{"text":"        yield;","highlight_start":1,"highlight_end":15},{"text":"        *t += 1;","highlight_start":1,"highlight_end":17},{"text":"    };","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: internal compiler error: librustc_mir/transform/generator.rs:494: Broken MIR: generator contains type std::ops::GeneratorState<(), ()> in MIR, but typeck only knows about for<'r, 's, 't0> {&'r mut u32, u32, &'s mut u32, (), &'t0 mut u32}\n  --> /checkout/src/test/ui/nll/generator-distinct-lifetime.rs:22:5\n   |\nLL | /     move || {\nLL | |         let s = &mut *x;\nLL | |         yield;\nLL | |         *s += 1;\n...  |\nLL | |         *t += 1;\nLL | |     };\n   | |_____^\n\n"}
[00:48:19] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:48:19] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:48:19] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:19] 
[00:48:19] note: the compiler unexpectedly panicked. this is a bug.
[00:48:19] 
[00:48:19] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:48:19] note: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
[00:48:19] 
[00:48:19] 
[00:48:19] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:48:19] 
[00:48:19] ------------------------------------------
[00:48:19] 
[00:48:19] thread '[ui] ui/nll/generator-distinct-lifetime.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---
[00:48:19] test result: FAILED. 1462 passed; 1 failed; 14 ignored; 0 measured; 0 filtered out
[00:48:19] 
[00:48:19] 
[00:48:19] 
[00:48:19] 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:48:19] 
[00:48:19] 
[00:48:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:48:19] Build completed unsuccessfully in 0:02:40
[00:48:19] Build completed unsuccessfully in 0:02:40
[00:48:19] make: *** [check] Error 1
[00:48:19] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00b1c4dc
$ 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)

@pietroalbini
Copy link
Member

Ping from triage @pnkfelix! The author pushed new commits.

LL | &*x
| ^^^ lifetime `ReStatic` required
LL | fn foo(x: &u32) -> &'static u32 {
| ^ - consider changing the type of `x` to `&ReStatic u32`
Copy link
Member

Choose a reason for hiding this comment

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

(this sort of thing is the reason I'm not really thrilled with ui/ tests that use -Z verbose ... though I guess seeing ReStatic in supposed user output is not as egregious as other potential leakage of internal details...)

LL | x
| ^ lifetime `ReEarlyBound(0, 'a)` required
LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
| ^ - consider changing the type of `x` to `&ReEarlyBound(0, 'a) T`
Copy link
Member

Choose a reason for hiding this comment

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

Like a similar comment elsewhere: this sort of thing is the reason I'm not really thrilled with ui/ tests that use -Z verbose

I recognize its a pre-existing issue with the test, but I think it would clean things up if you took the -Z verbose out the test file. (Unless you think the output is serving a useful purpose here? Provides hint to compiler devs about the internal region structure in play?)

@pnkfelix
Copy link
Member

pnkfelix commented Jun 4, 2018

This all still seems fine. I had some questions about the code. and of course travis is faillng (I think due to a panic from ui/nll/generator-distinct-lifetime.rs?), so that needs to be addressed.

But mostly I think the PR is still in @nikomatsakis 's court. Its still marked as WIP.

@pnkfelix pnkfelix added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 4, 2018
@TimNN TimNN added A-allocators Area: Custom and system allocators and removed A-allocators Area: Custom and system allocators labels Jun 12, 2018
@pietroalbini
Copy link
Member

Ping from triage @nikomatsakis! It's been a while since we heard from you on this, will you have time to work on this again?

@bors
Copy link
Contributor

bors commented Jun 18, 2018

☔ The latest upstream changes (presumably #51460) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor Author

I will get back to it, but right now it's relatively low priority as this is more concerned with polonius than anything else I guess.

@pietroalbini
Copy link
Member

Ping from triage @nikomatsakis! Are you ok with closing this until you have time for it?

@nikomatsakis
Copy link
Contributor Author

I'm going to close this PR until I have time to get back to it 😿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants