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 help rather than span note for no method error; a slight rephrasing #39441

Commits on Feb 1, 2017

  1. use help rather than span note for no method error; a slight rephrasing

    The use of the `span_note` diagnostic method resulted in error messages
    that some users (including the present author) found very confusing: the
    code snippet and highlighted span displayed with the "did you mean" note
    was easy to interpret as a suggested edit (as if it had been set by
    `span_suggestion`), but was in fact identical to the snippet/span
    displayed just above, indicating the error in the original code, making
    it look as if the compiler was suggesting a no-op change.
    
    To remedy this, we use `help` instead of `span_note`, and reword one of
    the affected messages to emphasize the concept of accessing a field
    being different from calling a method (when the message just said, "did
    you mean to write `self.foo`", it was not immediately obvious that this
    was meant in contrast to `self.foo()`, with method-call parens).
    
    Resolves rust-lang#38321.
    zackmdavis committed Feb 1, 2017
    Configuration menu
    Copy the full SHA
    17bfd14 View commit details
    Browse the repository at this point in the history