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

in which the must-use additional messaging is tucked into a note #50437

Merged
merged 1 commit into from
May 7, 2018

Conversation

zackmdavis
Copy link
Member

I think it looks better this way! What do you think??

must_use_note

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 4, 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:56:39] ....................................................................................................
[00:56:47] .....................................................................i..............................
[00:56:56] ..............i.....................................................................................
[00:57:05] ....................................................................................................
[00:57:13] ...........................................................................................F........
n=3442167733178

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:07acb340

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)

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

Great improvement! I wonder if it would be reasonable to unify src/test/compile-fail/unused-result.rs and src/test/ui/fn_must_use.stderr...

@@ -14,35 +14,27 @@
#[must_use]
enum MustUse { Test }

#[must_use = "some message"]
enum MustUseMsg { Test2 }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this being removed?


#[allow(unused_results)]
fn test() {
foo::<isize>();
foo::<MustUse>(); //~ ERROR: unused `MustUse` which must be used
foo::<MustUseMsg>(); //~ ERROR: unused `MustUseMsg` which must be used: some message
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of removing, this can be

    foo::<MustUseMsg>(); //~ ERROR: unused `MustUseMsg` which must be used
    //~^ NOTE: some message

@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.
[01:00:40] ....................................................................................................
[01:00:47] ........................................................................i...........................
[01:00:56] .................i..................................................................................
[01:01:05] ....................................................................................................
[01:01:14] ..............................................................................................F.....
[01:01:23] failures:
[01:01:23] 
[01:01:23] ---- [compile-fail] compile-fail/unused-result.rs stdout ----
[01:01:23]  
[01:01:23]  
[01:01:23] error: /checkout/src/test/compile-fail/unused-result.rs:11: unexpected note: '11:25: 11:40: lint level defined here'
[01:01:23] 
[01:01:23] error: /checkout/src/test/compile-fail/unused-result.rs:11: unexpected note: '11:9: 11:23: lint level defined here'
[01:01:23] 
[01:01:23] error: 2 unexpected errors found, 0 expected errors not found
[01:01:23] status: exit code: 101
[01:01:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/unused-result.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/unused-result.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/unused-result.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:01:23] unexpected errors (from JSON output): [
[01:01:23]     Error {
[01:01:23]         line_num: 11,
[01:01:23]         kind: Some(
[01:01:23]         ),
[01:01:23]         ),
[01:01:23]         msg: "11:25: 11:40: lint level defined here"
[01:01:23]     Error {
[01:01:23]         line_num: 11,
[01:01:23]         kind: Some(
[01:01:23]             Note
[01:01:23]             Note
[01:01:23]         ),
[01:01:23]         msg: "11:9: 11:23: lint level defined here"
[01:01:23] ]
[01:01:23] 
[01:01:23] thread '[compile-fail] compile-fail/unused-result.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1312:13
[01:01:23] 
---
[01:01:23] 
[01:01:23] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:492:22
[01:01:23] 
[01:01:23] 
[01:01:23] 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/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--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"
[01:01:23] 
[01:01:23] 
[01:01:23] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:01:23] Build completed unsuccessfully in 0:16:53
[01:01:23] Build completed unsuccessfully in 0:16:53
[01:01:23] Makefile:58: recipe for target 'check' failed
[01:01:23] make: *** [check] 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)

Also, a comment is edited to reflect that spaces around the equals-sign in
attributes is the standard (q.v. rust-lang/style-team@bea80532e7).
@estebank
Copy link
Contributor

estebank commented May 7, 2018

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 7, 2018

📌 Commit 5a5a25c has been approved by estebank

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

bors commented May 7, 2018

⌛ Testing commit 5a5a25c with merge 9b97705...

bors added a commit that referenced this pull request May 7, 2018
in which the must-use additional messaging is tucked into a note

_I_ think it looks better this way! What do _you_ think??

![must_use_note](https://user-images.githubusercontent.com/1076988/39612597-b6dd2dae-4f15-11e8-87ec-ab9da21ef062.png)

r? @estebank
@bors
Copy link
Contributor

bors commented May 7, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: estebank
Pushing 9b97705 to master...

@bors bors merged commit 5a5a25c into rust-lang:master May 7, 2018
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.

4 participants