Skip to content

does the note for E0369 need to repeat the entire span? #39650

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

Closed
durka opened this issue Feb 8, 2017 · 1 comment
Closed

does the note for E0369 need to repeat the entire span? #39650

durka opened this issue Feb 8, 2017 · 1 comment

Comments

@durka
Copy link
Contributor

durka commented Feb 8, 2017

I got this error (I missed a ?):

error[E0369]: binary operation `!=` cannot be applied to type `std::result::Result<flow::EventContour, flow::Error>`
   --> crates/front/cli/src/lib.rs:245:23
    |
245 |                 while found.run(ParkState::None, &self.tx, CLIComms) != flow::EventContour::Finishing {}
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: an implementation of `std::cmp::PartialEq` might be missing for `std::result::Result<flow::EventContour, flow::Error>`
   --> crates/front/cli/src/lib.rs:245:23
    |
245 |                 while found.run(ParkState::None, &self.tx, CLIComms) != flow::EventContour::Finishing {}
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There's no information gained by printing the span again. Maybe there is some situation where it isn't the same?

@durka durka changed the title does the note for E0369 need to repeat the entire span does the note for E0369 need to repeat the entire span? Feb 8, 2017
@durka
Copy link
Contributor Author

durka commented Feb 8, 2017

It seems to be always the same span (namely lhs_expr.span).

frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 10, 2017
…athandturner

change span_notes to notes in E0368/E0369

Fixes rust-lang#39650.

All the uses of `span_note` in these errors were reusing the same span as the original error, which causes unnecessary repetition.

For an example, see the changes to [src/test/ui/span/issue-39018.stderr](https://github.com/rust-lang/rust/pull/39707/files?diff=unified#diff-46336f62958fdb34233db414cb9914a1R4).

r? @jonathandturner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant