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

Expr walking structural match #66120

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Nov 5, 2019

Long awaited fix to #62614

The structural-match check is meant to ensure that consts used in patterns only have types that derive(PartialEq) (see RFC 1445).

Unfortunately the initial code to enforce structural-match was not quite correct, which led to the creation of the indirect_structural_match compatibility lint; see #62411

Doubly unfortunately the initial code to enforce the lint was not quite correct, which led to it being downgraded to allow-by-default and the filing of #62614.

This PR implements a scheme I outlined on #62614: Instead of basing the analysis solely on the type of the given const, it first attempts to prove the const adheres to the structural-match rules by analysis of the HIR representing the const's right-hand side (RHS). It only falls back to analyzing the type when it encounters a sub-expression on the RHS that it deems too complicated to analyze, such as const fn invocations; in such cases it then resorts to a type-based analysis.

Note: It is entirely possible that we will decide that even this analysis is not as precise as what we would like. (For example, we may wish to instead perform the analysis by inspecting the actual MIR value that you get from evaluating the const in question. However, it is not obvious to me that such an approach is superior from a UX point of view.) So I decided that there was no harm in trying to put this version up for review.

@rust-highfive
Copy link
Collaborator

r? @eddyb

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

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

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-05T13:29:45.2088465Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-05T13:29:45.2279224Z ##[command]git config gc.auto 0
2019-11-05T13:29:45.2348401Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-05T13:29:45.2407328Z ##[command]git config --get-all http.proxy
2019-11-05T13:29:45.2585701Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66120/merge:refs/remotes/pull/66120/merge
---
2019-11-05T14:29:51.2202262Z .................................................................................................... 1600/9280
2019-11-05T14:29:57.2773720Z ..............................F..................................................................... 1700/9280
2019-11-05T14:30:09.8698631Z ...................................................................i...............i................ 1800/9280
2019-11-05T14:30:17.2075189Z .................................................................................................... 1900/9280
2019-11-05T14:30:32.9423890Z .........................................................iiiii...................................... 2000/9280
2019-11-05T14:30:44.3342920Z .................................................................................................... 2200/9280
2019-11-05T14:30:46.8759902Z .................................................................................................... 2300/9280
2019-11-05T14:30:50.2716930Z .................................................................................................... 2400/9280
2019-11-05T14:31:14.0988437Z .................................................................................................... 2500/9280
---
2019-11-05T14:34:06.1850737Z .........................................................i...............i.......................... 4800/9280
2019-11-05T14:34:14.8083867Z .................................................................................................... 4900/9280
2019-11-05T14:34:23.8281663Z .................................................................................................... 5000/9280
2019-11-05T14:34:29.8897624Z .................................................................................................... 5100/9280
2019-11-05T14:34:40.8707456Z ..........................................................ii.ii...........i......................... 5200/9280
2019-11-05T14:34:50.3537106Z .................................................................................................... 5400/9280
2019-11-05T14:35:00.9885780Z .................................................................................................... 5500/9280
2019-11-05T14:35:08.3684304Z ...............................i.................................................................... 5600/9280
2019-11-05T14:35:15.0950569Z .................................................................................................... 5700/9280
2019-11-05T14:35:15.0950569Z .................................................................................................... 5700/9280
2019-11-05T14:35:27.1082748Z .................................................................................................... 5800/9280
2019-11-05T14:35:38.5693009Z ................ii...i..ii...........i.............................................................. 5900/9280
2019-11-05T14:35:59.4434046Z .................................................................................................... 6100/9280
2019-11-05T14:36:07.9606192Z .................................................................................................... 6200/9280
2019-11-05T14:36:07.9606192Z .................................................................................................... 6200/9280
2019-11-05T14:36:23.8072233Z ...................................i..ii............................................................ 6300/9280
2019-11-05T14:36:44.5898132Z .................................................................................................... 6500/9280
2019-11-05T14:36:46.7504434Z ..i................................................................................................. 6600/9280
2019-11-05T14:36:48.9462069Z ................................................................................i................... 6700/9280
2019-11-05T14:36:51.6431367Z .................................................................................................... 6800/9280
---
2019-11-05T14:41:35.8177315Z ....................................................................................i............... 9200/9280
2019-11-05T14:41:47.3424248Z ................................................................................
2019-11-05T14:41:47.3424522Z failures:
2019-11-05T14:41:47.3460037Z 
2019-11-05T14:41:47.3460584Z ---- [ui] ui/consts/const_in_pattern/warn_corner_cases.rs stdout ----
2019-11-05T14:41:47.3460651Z 
2019-11-05T14:41:47.3461164Z error: /checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs:26: unexpected warning: '26:47: 26:52: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!'
2019-11-05T14:41:47.3461415Z 
2019-11-05T14:41:47.3461949Z error: /checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs:31: unexpected warning: '31:47: 31:51: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!'
2019-11-05T14:41:47.3462022Z 
2019-11-05T14:41:47.3462479Z error: /checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs:36: unexpected warning: '36:47: 36:58: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!'
2019-11-05T14:41:47.3462604Z error: 3 unexpected errors found, 0 expected errors not found
2019-11-05T14:41:47.3462656Z status: exit code: 0
2019-11-05T14:41:47.3462656Z status: exit code: 0
2019-11-05T14:41:47.3463528Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs" "-Zthreads=1" "--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/consts/const_in_pattern/warn_corner_cases/a" "-Crpath" "-O" "-Cdebuginfo=0" "-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/consts/const_in_pattern/warn_corner_cases/auxiliary"
2019-11-05T14:41:47.3463653Z unexpected errors (from JSON output): [
2019-11-05T14:41:47.3463772Z         line_num: 26,
2019-11-05T14:41:47.3463820Z         kind: Some(
2019-11-05T14:41:47.3463867Z             Warning,
2019-11-05T14:41:47.3463929Z         ),
2019-11-05T14:41:47.3463929Z         ),
2019-11-05T14:41:47.3463993Z         msg: "26:47: 26:52: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!",
2019-11-05T14:41:47.3464242Z     Error {
2019-11-05T14:41:47.3464288Z         line_num: 31,
2019-11-05T14:41:47.3464335Z         kind: Some(
2019-11-05T14:41:47.3464390Z             Warning,
2019-11-05T14:41:47.3464390Z             Warning,
2019-11-05T14:41:47.3464453Z         ),
2019-11-05T14:41:47.3464516Z         msg: "31:47: 31:51: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!",
2019-11-05T14:41:47.3464635Z     Error {
2019-11-05T14:41:47.3464681Z         line_num: 36,
2019-11-05T14:41:47.3464728Z         kind: Some(
2019-11-05T14:41:47.3464793Z             Warning,
2019-11-05T14:41:47.3464793Z             Warning,
2019-11-05T14:41:47.3464838Z         ),
2019-11-05T14:41:47.3464901Z         msg: "36:47: 36:58: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!",
2019-11-05T14:41:47.3465026Z ]
2019-11-05T14:41:47.3465056Z 
2019-11-05T14:41:47.3465056Z 
2019-11-05T14:41:47.3465461Z thread '[ui] ui/consts/const_in_pattern/warn_corner_cases.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1520:13
2019-11-05T14:41:47.3465593Z 
2019-11-05T14:41:47.3465621Z 
2019-11-05T14:41:47.3465665Z failures:
2019-11-05T14:41:47.3465665Z failures:
2019-11-05T14:41:47.3465732Z     [ui] ui/consts/const_in_pattern/warn_corner_cases.rs
2019-11-05T14:41:47.3466081Z test result: FAILED. 9236 passed; 1 failed; 43 ignored; 0 measured; 0 filtered out
2019-11-05T14:41:47.3466122Z 
2019-11-05T14:41:47.3492834Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-05T14:41:47.3508625Z 
2019-11-05T14:41:47.3508625Z 
2019-11-05T14:41:47.3508795Z 
2019-11-05T14:41:47.3516058Z 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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-05T14:41:47.3516369Z 
2019-11-05T14:41:47.3516419Z 
2019-11-05T14:41:47.3528516Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-05T14:41:47.3528597Z Build completed unsuccessfully in 1:05:40
2019-11-05T14:41:47.3528597Z Build completed unsuccessfully in 1:05:40
2019-11-05T14:41:47.3596749Z == clock drift check ==
2019-11-05T14:41:47.8894536Z   local time: Tue Nov  5 14:41:47 UTC 2019
2019-11-05T14:41:47.8895607Z   network time: Tue, 05 Nov 2019 14:41:47 GMT
2019-11-05T14:41:47.8895822Z == end clock drift check ==
2019-11-05T14:41:48.8779955Z 
2019-11-05T14:41:48.8915788Z ##[error]Bash exited with code '1'.
2019-11-05T14:41:48.8949613Z ##[section]Starting: Checkout
2019-11-05T14:41:48.8951471Z ==============================================================================
2019-11-05T14:41:48.8951694Z Task         : Get sources
2019-11-05T14:41:48.8951747Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

// abstraction barrier for non-trivial expression; traverse
// `typeof(expr)` instead of expression itself.
debug!("SearchHirExpr switch to type analysis for expr: {:?} ty: {:?}", ex, ty);
self.search_for_structural_match_violation(ty);
Copy link
Member

Choose a reason for hiding this comment

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

Heh, this is a lot like const-qualification (cc @oli-obk @RalfJung @ecstatic-morse).

Maybe one day we'll have an unified system for refining a trait bound based on values.

@@ -207,3 +301,186 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for Search<'a, 'tcx> {
false
}
}

struct SearchHirExpr<'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.

Not sure how I feel about this code being in rustc::ty, but that's neither here nor there.

What I might expect is to find this is in rustc_mir::hair, perhaps even operating on patterns extracted from the const expressions (to avoid having to reason about "expressions as patterns" in more than one place).

However, that might actually be a cyclic dependency of sorts, so potentially there's nothing to do here, for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll look into this. (I had thought there was some motivation for making this accessible more broadly than would be possible if it lived in rustc_mir, but I should double-check that.)

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I just realized something - are we removing that Expr -> Pat conversion / was it already removed, on the basis that if we enforce #[structural_match] we can just use == instead?

Because then I think mir_const_qualif is probably the way to go, and then we don't have to look at HIR expressions and/or try to convert them into patterns.

Copy link
Member Author

Choose a reason for hiding this comment

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

We have not removed the Expr -> Pat conversion, and we cannot use == instead in all cases, at least not today due to compiler bugs and/or language limitations.

The particular case I am thinking of is that we cannot implement a blanket PartialEq over all for <'a> fn(...), but we do allow those to appear in patterns.

This leads to some cases where we ICE today, and other cases where we just rely on the Expr -> Pat conversion to deal with the codegen.

References:

self.recur_into_const_rhs(const_def_id);
} else {
// abstraction barrer for non-local definition;
// traverse `typeof(expr)` instead.
Copy link
Member

Choose a reason for hiding this comment

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

mir_const_qualif gets around this by encoding the relevant bits (literally, 2 bits) cross-crate, perhaps something similar could be done here?

You could almost just use mir_const_qualif directly (and add the analysis to it), but with everything being in flux that's terrible advice for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll file a bug suggesting this change for longer-term.

Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

Overall seems good, I left some comments regarding the general approach but for now it's more likely we'll land this as-is.

@pnkfelix
Copy link
Member Author

pnkfelix commented Nov 8, 2019

(I don't understand why the test fails; I deliberately put in //~^ WARN ... annotations, and I'm pretty sure they're being used in my own local testing. I'll try to look into it further.)

@JohnCSimon
Copy link
Member

Ping from triage:
@eddyb Can you address the question from @pnkfelix or ping someone who can?
Thanks.

@JohnCSimon JohnCSimon closed this Nov 16, 2019
@JohnCSimon JohnCSimon reopened this Nov 16, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-16T23:59:54.8145285Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-16T23:59:54.8314728Z ##[command]git config gc.auto 0
2019-11-16T23:59:54.8377221Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-16T23:59:54.8410077Z ##[command]git config --get-all http.proxy
2019-11-16T23:59:54.8553503Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66120/merge:refs/remotes/pull/66120/merge
---
2019-11-17T00:54:46.5093087Z .................................................................................................... 1500/9250
2019-11-17T00:54:52.7723959Z ....................................................................F............................... 1600/9250
2019-11-17T00:55:00.8353957Z .................................................................................................... 1700/9250
2019-11-17T00:55:09.6483634Z .........i.......................................................................................... 1800/9250
2019-11-17T00:55:15.8808113Z .............................................................................................iiiii.. 1900/9250
2019-11-17T00:55:36.0232616Z .................................................................................................... 2100/9250
2019-11-17T00:55:38.1814112Z .................................................................................................... 2200/9250
2019-11-17T00:55:40.5087381Z .................................................................................................... 2300/9250
2019-11-17T00:55:46.4314452Z .................................................................................................... 2400/9250
---
2019-11-17T00:59:21.0748803Z .................................................................................................... 5400/9250
2019-11-17T00:59:31.3364875Z ...............................................................................i.................... 5500/9250
2019-11-17T00:59:39.0984016Z .................................................................................................... 5600/9250
2019-11-17T00:59:45.4823974Z .................................................................................................... 5700/9250
2019-11-17T00:59:55.7728216Z .................................................................ii...i..ii...........i............. 5800/9250
2019-11-17T01:00:17.4276489Z .................................................................................................... 6000/9250
2019-11-17T01:00:25.4112260Z .................................................................................................... 6100/9250
2019-11-17T01:00:25.4112260Z .................................................................................................... 6100/9250
2019-11-17T01:00:30.5496346Z ....................................................................................i..ii........... 6200/9250
2019-11-17T01:00:57.7480154Z .................................................................................................... 6400/9250
2019-11-17T01:01:02.4726458Z ....................................................i............................................... 6500/9250
2019-11-17T01:01:04.6945326Z .................................................................................................... 6600/9250
2019-11-17T01:01:07.1510730Z ........................................i........................................................... 6700/9250
---
2019-11-17T01:05:31.0624519Z ......................................................i............................................. 9200/9250
2019-11-17T01:05:40.8602862Z ..................................................
2019-11-17T01:05:40.8603074Z failures:
2019-11-17T01:05:40.8634540Z 
2019-11-17T01:05:40.8635863Z ---- [ui] ui/consts/const_in_pattern/warn_corner_cases.rs stdout ----
2019-11-17T01:05:40.8636090Z 
2019-11-17T01:05:40.8636683Z error: /checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs:26: unexpected warning: '26:47: 26:52: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!'
2019-11-17T01:05:40.8636860Z 
2019-11-17T01:05:40.8637962Z error: /checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs:31: unexpected warning: '31:47: 31:51: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!'
2019-11-17T01:05:40.8638285Z 
2019-11-17T01:05:40.8638935Z error: /checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs:36: unexpected warning: '36:47: 36:58: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!'
2019-11-17T01:05:40.8639251Z error: 3 unexpected errors found, 0 expected errors not found
2019-11-17T01:05:40.8639397Z status: exit code: 0
2019-11-17T01:05:40.8639397Z status: exit code: 0
2019-11-17T01:05:40.8640350Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const_in_pattern/warn_corner_cases.rs" "-Zthreads=1" "--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/consts/const_in_pattern/warn_corner_cases/a" "-Crpath" "-O" "-Cdebuginfo=0" "-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/consts/const_in_pattern/warn_corner_cases/auxiliary"
2019-11-17T01:05:40.8640620Z unexpected errors (from JSON output): [
2019-11-17T01:05:40.8640907Z         line_num: 26,
2019-11-17T01:05:40.8641026Z         kind: Some(
2019-11-17T01:05:40.8641143Z             Warning,
2019-11-17T01:05:40.8641290Z         ),
2019-11-17T01:05:40.8641290Z         ),
2019-11-17T01:05:40.8641422Z         msg: "26:47: 26:52: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!",
2019-11-17T01:05:40.8641685Z     Error {
2019-11-17T01:05:40.8641800Z         line_num: 31,
2019-11-17T01:05:40.8641939Z         kind: Some(
2019-11-17T01:05:40.8642060Z             Warning,
2019-11-17T01:05:40.8642060Z             Warning,
2019-11-17T01:05:40.8642173Z         ),
2019-11-17T01:05:40.8642320Z         msg: "31:47: 31:51: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!",
2019-11-17T01:05:40.8642560Z     Error {
2019-11-17T01:05:40.8642691Z         line_num: 36,
2019-11-17T01:05:40.8642805Z         kind: Some(
2019-11-17T01:05:40.8643066Z             Warning,
2019-11-17T01:05:40.8643066Z             Warning,
2019-11-17T01:05:40.8643206Z         ),
2019-11-17T01:05:40.8643334Z         msg: "36:47: 36:58: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!",
2019-11-17T01:05:40.8643589Z ]
2019-11-17T01:05:40.8643688Z 
2019-11-17T01:05:40.8643688Z 
2019-11-17T01:05:40.8644116Z thread '[ui] ui/consts/const_in_pattern/warn_corner_cases.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1520:13
2019-11-17T01:05:40.8644433Z 
2019-11-17T01:05:40.8644533Z 
2019-11-17T01:05:40.8644665Z failures:
2019-11-17T01:05:40.8644665Z failures:
2019-11-17T01:05:40.8644787Z     [ui] ui/consts/const_in_pattern/warn_corner_cases.rs
2019-11-17T01:05:40.8645468Z test result: FAILED. 9206 passed; 1 failed; 43 ignored; 0 measured; 0 filtered out
2019-11-17T01:05:40.8645611Z 
2019-11-17T01:05:40.8664369Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-17T01:05:40.8678938Z 
2019-11-17T01:05:40.8678938Z 
2019-11-17T01:05:40.8679258Z 
2019-11-17T01:05:40.8681126Z 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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-17T01:05:40.8682956Z 
2019-11-17T01:05:40.8683148Z 
2019-11-17T01:05:40.8685584Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-17T01:05:40.8685916Z Build completed unsuccessfully in 0:59:46
2019-11-17T01:05:40.8685916Z Build completed unsuccessfully in 0:59:46
2019-11-17T01:05:40.8737092Z == clock drift check ==
2019-11-17T01:05:41.8598418Z   local time: Sun Nov 17 01:05:40 UTC 2019
2019-11-17T01:05:41.8607928Z   network time: Sun, 17 Nov 2019 01:05:41 GMT
2019-11-17T01:05:41.8607991Z == end clock drift check ==
2019-11-17T01:05:43.2500944Z 
2019-11-17T01:05:43.2607695Z ##[error]Bash exited with code '1'.
2019-11-17T01:05:43.2654782Z ##[section]Starting: Checkout
2019-11-17T01:05:43.2656343Z ==============================================================================
2019-11-17T01:05:43.2656390Z Task         : Get sources
2019-11-17T01:05:43.2656431Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

@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 Nov 19, 2019
@JohnCSimon
Copy link
Member

Ping from triage:
@pnkfelix any updates on the failing test?
#66120 (comment)

@pnkfelix
Copy link
Member Author

pnkfelix commented Nov 28, 2019

I haven't managed to replicate the test failure locally.

And meanwhile other people have been exploring how to implement this analogous to how we do mir_const_qualif (which means that this PR might be made obsolete by that work).

@pnkfelix
Copy link
Member Author

I will just close this PR for now. If I decide to invest time in figuring out the warning then I'll revive it, but it no longer seems like a high priority item, and keeping the PR open is just making headaches for others.

@pnkfelix pnkfelix closed this Nov 28, 2019
@pnkfelix
Copy link
Member Author

pnkfelix commented Dec 6, 2019

(heh, weird; I finally managed to replicate the warnings, but I don't think I did anything differently... except maybe I rebased? I wonder if that was the problem the whole time...)

@pnkfelix
Copy link
Member Author

pnkfelix commented Dec 6, 2019

(reopened in #67088. I've started looking at how the const-qualif based analysis would work, thanks to @ecstatic-morse for assistance there. But progress there has been not been quite as fast as I thought it would be, so figure I'm better off trying to land this now and doing the const-qualif stuff myself as follow-up.)

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.

4 participants