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

update diagnostics E0282 #26877

Closed
wants to merge 1 commit into from
Closed

update diagnostics E0282 #26877

wants to merge 1 commit into from

Conversation

liigo
Copy link
Contributor

@liigo liigo commented Jul 8, 2015

No description provided.

@rust-highfive
Copy link
Collaborator

r? @brson

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

@Aatch
Copy link
Contributor

Aatch commented Jul 8, 2015

@liigo could you please combine these simple PRs (i.e. this #26876) into a single PR? If you're planning on doing any more similar changes, please make those part of the same PR as well.

@arielb1
Copy link
Contributor

arielb1 commented Jul 8, 2015

This is badly worded and not-particularly helpful.

@brson
Copy link
Contributor

brson commented Jul 8, 2015

Thanks @liigo. I also think this isn't as illuminating as it might be - why is the None case so special that it is mentioned explicitly? What is it trying to illustrate - the ::<T> syntax?

@liigo
Copy link
Contributor Author

liigo commented Jul 9, 2015

@brson Just a hint to the correct syntax of None::<T>, like what compiler sometime says "do you means …" or "try to do …", to help people resolve this compile error. I hint this because I think it's a typical E0282 error, but maybe I'm wrong. Feel free to ignore this pr if it's not helpful.

@Gankra
Copy link
Contributor

Gankra commented Jul 27, 2015

I think this has some value -- None can be a pretty common case of this problem in my experience. But it might be too marginal.

@Gankra
Copy link
Contributor

Gankra commented Jul 27, 2015

I think it might be sufficient to change the first sentence to something like:

A common form of this error is to use an enum variant that doesn't provide enough information to determine the type of if the overall enum. For instance, None is a valid variant for all Options, and
Ok(0) does not determine the type of Err a Result has.

@liigo
Copy link
Contributor Author

liigo commented Jul 27, 2015

This just explains why the compile error occurs, but doesn't answer how
to fix that error. So I think it's not enough helpful.
On Jul 27, 2015 10:57 AM, "Alexis Beingessner" notifications@github.com
wrote:

I think it might be sufficient to change the first sentence to something
like:

A common form of this error is to use an enum variant that doesn't provide
enough information to determine the type of if the overall enum. For
instance, None is a valid variant for all Options, and
Ok(0) does not determine the type of Err as Result has.


Reply to this email directly or view it on GitHub
#26877 (comment).

@Gankra
Copy link
Contributor

Gankra commented Jul 27, 2015

@liigo Yes, I was still intending that you include the example invalid/valid situations. But I suppose you could expand the text.

@liigo
Copy link
Contributor Author

liigo commented Aug 9, 2015

Closing. This may be addressed out of here in another way.

@liigo liigo closed this Aug 9, 2015
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

Successfully merging this pull request may close these issues.

None yet

6 participants