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

Add lint message for unexpected and/or in if statement #54179

Closed
wants to merge 3 commits into from

Conversation

csmoe
Copy link
Member

@csmoe csmoe commented Sep 13, 2018

Closes #54109
r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 13, 2018
@vi
Copy link
Contributor

vi commented Sep 13, 2018

It's just happened that I was also trying to solve it.

Competing pull request: #54181

@csmoe
Copy link
Member Author

csmoe commented Sep 13, 2018

@vi your approach is more clever than me actually.

@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
[00:45:08] ....................................................................................................
[00:45:10] ....................................................................................................
[00:45:12] ....................................................................................................
[00:45:15] ...............................i..................................................................i.
[00:45:18] ..................................F.F...............................................................
[00:45:24] ......................................................................................i.............
[00:45:26] ....................................................................................................
[00:45:29] ....................................................................................................
[00:45:32] ....................................................................................................
---
[00:50:46] .............................................................i......................................
[00:50:49] ....................................................................................................
[00:50:52] ....................................................................................................
[00:50:55] ....................................................................................................
at" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/if/if-with-and/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/if/if-with-and/auxiliary" "-A" "unused"
[00:50:57]     Error {
[00:50:57]         line_num: 14,
[00:50:57]         kind: Some(
[00:50:57]             Error
[00:50:57]             Error
[00:50:57]         ),
[00:50:57]         msg: "14:15: 14:18: expected `{`, found `and`"
[00:50:57] ]
[00:50:57] 
[00:50:57] not found errors (from test file): [
[00:50:57]     Error {
[00:50:57]     Error {
[00:50:57]         line_num: 16,
[00:50:57]         kind: Some(
[00:50:57]             Error
[00:50:57]         ),
[00:50:57]         msg: "expected `{`, found `}`"
[00:50:57] ]
[00:50:57] 
[00:50:57] thread '[ui] ui/if/if-with-and.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1283:13
[00:50:57] 
---
[00:50:57] 
[00:50:57] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:496:22
[00:50:57] 
[00:50:57] 
[00:50:57] 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-5.0/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" "5.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"
[00:50:57] 
[00:50:57] 
[00:50:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:50:57] Build completed unsuccessfully in 0:07:27
[00:50:57] Build completed unsuccessfully in 0:07:27
[00:50:57] Makefile:58: recipe for target 'check' failed
[00:50:57] make: *** [check] Error 1
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:14d03fc2
$ 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)

@estebank
Copy link
Contributor

Closing in lieu of #54181. Thanks for the contribution regardless!

@estebank estebank closed this Sep 13, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 16, 2018
Suggest && and || instead of 'and' and 'or'

Resolves rust-lang#54109.

Note: competing pull reqeust: rust-lang#54179

r? @csmoe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants