Skip to content

Error E0019 is undocumented #43308

Closed
Closed
@Michael-F-Bryan

Description

@Michael-F-Bryan

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?

Activity

kennytm

kennytm commented on Jul 18, 2017

@kennytm
Member

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).

Michael-F-Bryan

Michael-F-Bryan commented on Jul 18, 2017

@Michael-F-Bryan
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kennytm@Michael-F-Bryan

        Issue actions

          Error E0019 is undocumented · Issue #43308 · rust-lang/rust