Skip to content

Misleading error message for bad export statement #1908

Closed
@brson

Description

@brson
export output_format::{};
export output_styl::{};
export config;

#[doc = "The type of document to output"]
enum output_format {
    #[doc = "Markdown"]
    markdown,
    #[doc = "HTML, via markdown and pandoc"]
    pandoc_html
}

#[doc = "How to organize the output"]
enum output_style {
    #[doc = "All in a single document"]
    one_doc,
    #[doc = "Each module in its own document"]
    doc_per_mod
}

#[doc = "The configuration for this rustdoc session"]
type config = {
    output_dir: str,
    output_format: output_format,
    output_style: output_style,
    pandoc_cmd: option<str>
};
../src/rustdoc/config.rs:2:7: 2:23 error: error: undefined id output_styl in an export
../src/rustdoc/config.rs:2 export output_styl::{};

An 'id' isn't a language concept so probably shouldn't appear in the UI. Maybe 'identifier', or even 'enum' if we actually know this is checking enums.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions