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

Fix try-op diagnostic in E0277 for methods #68425

Merged
merged 3 commits into from
Jan 23, 2020
Merged

Commits on Jan 21, 2020

  1. Handle methods in try diagnostic

    The diagnostic for diagnostic for methods and trait provided
    methods would only show the empty string:
    
        error[E0277]: the `?` operator can only be used in  that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
    
    Handle the missing cases so it reads ``a method'' / ``an async
    method'' / ``a trait method'' respectively.
    
    Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
    phi-gamma committed Jan 21, 2020
    Configuration menu
    Copy the full SHA
    5dee7dd View commit details
    Browse the repository at this point in the history
  2. Test try diagnostics for impl and trait methods

    Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
    phi-gamma committed Jan 21, 2020
    Configuration menu
    Copy the full SHA
    02e66ba View commit details
    Browse the repository at this point in the history
  3. Cleanup: rewrite conditional as match

    As suggested by @Centril.
    
    Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
    phi-gamma committed Jan 21, 2020
    Configuration menu
    Copy the full SHA
    db3b40c View commit details
    Browse the repository at this point in the history