You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code that compiles fine with rustc is causing an internal compiler error: unexpected panic with rustdoc.
I tried this code (bug.rs):
typeFoo = isize;pubuseself::Foo::*;
The second line is essentially a typo, which can happen if Foo used to be an Enum for instance.
Again, the following works fine (although I'm not sure why, can you even add anything to the Foo namespace?):
rustc bug.rs --crate-type lib
However, if I run:
rustdoc bug.rs
I get the error:
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'glob not mapped to a module or enum', ../src/librustdoc/visit_ast.rs:246
This actually happened on a version of a package already pushed to crates.io (hdf5-sys 0.3.0), so anything that depends on the erroneous version and runs cargo doc will see this error.
Meta
Run on rustdoc 1.7.0-nightly (4ce1dafd1 2015-12-23).
The text was updated successfully, but these errors were encountered:
gustavla
changed the title
rustdoc: panic caused by a "reexport" of a type alias (compiles fine with rustc)
rustdoc: panic caused by a "reexport" of a type alias
Dec 26, 2015
…atsakis
Forbid glob-importing from a type alias
This PR forbids glob-importing from a type alias or trait (fixes#30560):
```rust
type Alias = ();
use Alias::*; // This is currently allowed but shouldn't be
```
This is a [breaking-change]. Since the disallowed glob imports don't actually import anything, any breakage can be fixed by removing the offending glob import.
r? @alexcrichton
Code that compiles fine with rustc is causing an internal compiler error: unexpected panic with rustdoc.
I tried this code (
bug.rs
):The second line is essentially a typo, which can happen if
Foo
used to be an Enum for instance.Again, the following works fine (although I'm not sure why, can you even add anything to the
Foo
namespace?):However, if I run:
I get the error:
This actually happened on a version of a package already pushed to crates.io (hdf5-sys 0.3.0), so anything that depends on the erroneous version and runs
cargo doc
will see this error.Meta
Run on
rustdoc 1.7.0-nightly (4ce1dafd1 2015-12-23)
.Backtrace:
The text was updated successfully, but these errors were encountered: