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

Better error for swapping period and :: #57316

Closed
ayende opened this issue Jan 3, 2019 · 1 comment
Closed

Better error for swapping period and :: #57316

ayende opened this issue Jan 3, 2019 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@ayende
Copy link

ayende commented Jan 3, 2019

I wrote the following code, and got this error.

sslb.set_verify_callback(openssl::ssl::SslVerifyMode.PEER, |_, _| true);// accept all certificates
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ did you mean `openssl::ssl::SslVerifyMode { /* fields */ }`?

A better error would be to suggest openssl::ssl::SslVerifyMode::PEER, because if the type has a member of this name, it is very likely a typo

@sfackler sfackler added the A-diagnostics Area: Messages for errors, warnings, and lints label Jan 3, 2019
@estebank
Copy link
Contributor

estebank commented Jan 3, 2019

CC #47666. Not the same parser code, but similar type of enhancement to user experience.

Centril added a commit to Centril/rust that referenced this issue Mar 26, 2019
…vidtwco

Provide suggestion when using field access instead of path

When trying to access an associated constant as if it were a field of
an instance, provide a suggestion for the correct syntax.

Fix rust-lang#57316.
Centril added a commit to Centril/rust that referenced this issue Mar 26, 2019
…vidtwco

Provide suggestion when using field access instead of path

When trying to access an associated constant as if it were a field of
an instance, provide a suggestion for the correct syntax.

Fix rust-lang#57316.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

3 participants