mozilla/rust — Issue #1908: Misleading error message for bad export statement
Author: brson
Created: 2012-02-27 00:28:10+00:00
State: open
Labels: A-frontend, E-easy, I-wrong

```
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
};
```

```
../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.