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

Use multiline note for trait suggestion #42383

Merged
merged 2 commits into from
Jun 5, 2017

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Jun 2, 2017

No description provided.

@rust-highfive
Copy link
Collaborator

r? @arielb1

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

= help: items from traits can only be used if the trait is implemented and in scope; the following traits define an item `is_empty`, perhaps you need to implement one of them:
candidate #1: `std::iter::ExactSizeIterator`
candidate #2: `core::slice::SliceExt`
candidate #3: `core::str::StrExt`
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we should rephrase this to something more like this:

   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `is_empty`, perhaps you need to implement one?
           `std::iter::ExactSizeIterator`
           `core::slice::SliceExt`
           `core::str::StrExt`

@shepmaster shepmaster added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 2, 2017
@arielb1
Copy link
Contributor

arielb1 commented Jun 4, 2017

Travis failure:

[00:47:37] error: /checkout/src/test/compile-fail/method-call-err-msg.rs:34: unexpected "note": '34:7: 34:11: the following traits define an item `take`, perhaps you need to implement one of them:'

[00:47:37] 

[00:47:37] error: 1 unexpected errors found, 0 expected errors not found

[00:47:37] status: exit code: 101

[00:47:37] command: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc /checkout/src/test/compile-fail/method-call-err-msg.rs -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail --target=x86_64-unknown-linux-gnu --error-format json -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/method-call-err-msg.stage2-x86_64-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o /checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/method-call-err-msg.stage2-x86_64-unknown-linux-gnu -Crpath -O -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers

[00:47:37] unexpected errors (from JSON output): [

[00:47:37]     Error {

[00:47:37]         line_num: 34,

[00:47:37]         kind: Some(

[00:47:37]             Note

[00:47:37]         ),

[00:47:37]         msg: "34:7: 34:11: the following traits define an item `take`, perhaps you need to implement one of them:"

[00:47:37]     }

[00:47:37] ]

[00:47:37] 

[00:47:37] thread '[compile-fail] compile-fail/method-call-err-msg.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:1129

[00:47:37] 

[00:47:37] 

[00:47:37] failures:

[00:47:37]     [compile-fail] compile-fail/method-call-err-msg.rs

[00:47:37] 

[00:47:37] test result: FAILED. 2653 passed; 1 failed; 13 ignored; 0 measured; 0 filtered out

r+ with that fixed.

@estebank estebank force-pushed the candidate-newline branch from fde6df0 to 397972f Compare June 4, 2017 19:57
@estebank
Copy link
Contributor Author

estebank commented Jun 5, 2017

@bors r=arielb1

@bors
Copy link
Contributor

bors commented Jun 5, 2017

📌 Commit 397972f has been approved by arielb1

@bors
Copy link
Contributor

bors commented Jun 5, 2017

⌛ Testing commit 397972f with merge 13eb0ec...

bors added a commit that referenced this pull request Jun 5, 2017
Use multiline note for trait suggestion
@bors
Copy link
Contributor

bors commented Jun 5, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing 13eb0ec to master...

@bors bors merged commit 397972f into rust-lang:master Jun 5, 2017
@estebank estebank deleted the candidate-newline branch November 9, 2023 05:26
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