Skip to content

Exporting a nonexistent item does not cause compilation to fail #2938

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
bstrie opened this issue Jul 17, 2012 · 4 comments
Closed

Exporting a nonexistent item does not cause compilation to fail #2938

bstrie opened this issue Jul 17, 2012 · 4 comments
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically
Milestone

Comments

@bstrie
Copy link
Contributor

bstrie commented Jul 17, 2012

Here's the revised test case from #1908. It used to just crash with a poor error message, but now it doesn't fail at all despite the lack of anything named output_styl.

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

Compiled with rustc --lib 1908.rs.

@jdm
Copy link
Contributor

jdm commented Jul 17, 2012

Traditionally that has simply triggered a warning message, not a failure as far as I know.

@ghost ghost assigned catamorphism Jul 17, 2012
@catamorphism
Copy link
Contributor

I'll look at this too. I know it has been just a warning in the past, but IMO it should be a failure.

@catamorphism
Copy link
Contributor

Postponed because we're replacing exports with pub qualifiers on individual items, as per #1893.

@catamorphism
Copy link
Contributor

Obsolete now that #1893 is implemented. You can't export a non-existent item, since an export is part of an item itself. What joy!

RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 29, 2023
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
This migration was fairly straight forward, most constructs have a 1:1
map from internal APIs to StableMIR APIs. I've also removed the
`is_coroutine()` and the `is_box()` methods from `ty_stable`, since they
were added to the StableMIR APIs together with other type methods here:
rust-lang#118846.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically
Projects
None yet
Development

No branches or pull requests

3 participants