Skip to content

Error E0019 is undocumented #43308

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
Michael-F-Bryan opened this issue Jul 18, 2017 · 2 comments
Closed

Error E0019 is undocumented #43308

Michael-F-Bryan opened this issue Jul 18, 2017 · 2 comments

Comments

@Michael-F-Bryan
Copy link

I was just playing with conditions in const functions and came across an error code (*E0019) which isn't yet documented in the error index.

(playground)


For example, trying to compile this:

#![feature(const_fn)]
const fn foo() -> u8 {
    if bar() == 1 { 5 } else { 3 }
}

const fn bar() -> u8 {
    1
}
fn main() {}

Gives you

 Compiling playground v0.0.1 (file:///playground)
error[E0019]: constant function contains unimplemented expression type
 --> src/main.rs:3:5
  |
3 |     if bar() == 1 { 5 } else { 3 }
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `playground`.

Where E0019 just sends you to the top of the page because the E0019 section doesn't exist.


What would be the best way for me to add an explanation of that error code to the compiler error index?

@kennytm
Copy link
Member

kennytm commented Jul 18, 2017

This is a bug in the error index generator. E0019, along with many other error codes, are documented yet not included.

Duplicate of #42170 (E0493 missing — E0493 and E0019 live in the same file), which is closed in favor of #34588 (error index generator is fragile).

@kennytm kennytm marked this as a duplicate of #42170 Jul 18, 2017
@Michael-F-Bryan
Copy link
Author

Cheers @kennytm, I'll close this in favor of #34588 as well.

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

2 participants